[asterisk-dev] Qualify OPTIONS messages
Kevin P. Fleming
kpfleming at digium.com
Tue Aug 15 10:34:33 MST 2006
----- Evan Borgström <evan.borgstrom at ca.mci.com> wrote:
> True, a lot of devices use OPTIONS for pings (we do it all over the
> place), but I think Jon's point is valid. After a quick skim through
> of
> chan_sip.c it doesn't look like having another check of resp in
> handle_response_peerpoke for >= 400 along with != 100 that sets the
> peer
> state to alive but would cause ChanIsAvail to see AST_DEVICE_BUSY
> might
> be a handy feature (as I see a lot of people are interested in it
> from
> comments on voip-info.org).
>
Seems like a reasonable thing to do, although AST_DEVICE_UNAVAILABLE might be better. I'm not sure how you are going to do that, though, since ChanIsAvail doesn't do anything different than Dial does to create a channel so there's no way that chan_sip can know the difference. I guess what you are proposing is storing a completely separate 'availability' flag for sip_request() to use to decide whether to make a channel available, as opposed to relying on the current peer_poke reachability results.
--
Kevin P. Fleming
Senior Software Engineer
Digium, Inc.
More information about the asterisk-dev
mailing list