[asterisk-dev] [Code Review] sip: how to hang up a channel before invite receives a response
David Vossel
dvossel at digium.com
Mon Aug 23 15:41:52 CDT 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/870/
-----------------------------------------------------------
Review request for Asterisk Developers and Tilghman Lesher.
Summary
-------
If an ast_channel with a SIP tech pvt hangs up before the sip dialog gets a response to its outgoing INVITE, Asterisk pretend_acks the INVITE. This is not rfc compliant and results in confusion at the other endpoint. sip_pretend_ack will ack and remove all the packets in the retransmit queue. This means that the INVITE will stop retransmitting, and that any response to that INVITE that comes after the pretend_ack occurs will be ignored.
Instead of faking any sort of acknowledgement for an outgoing INVITE during an internal hangup, we should let the protocol stack process the INVITE transaction and terminate the dialog properly. This is achieved by setting the PENDING_BYE flag. When this flag is used, once the dialog proceeds to an escapable state the transaction will either be canceled with a SIP_CANCEL or completed followed immediately by a BYE. Attempting to do this any other way is incorrect. If the endpoint is not responding to the INVITE request, the INVITE must continue to be retransmitted until it times out which will result in the dialog being destroyed.
Diffs
-----
/trunk/channels/chan_sip.c 283286
Diff: https://reviewboard.asterisk.org/r/870/diff
Testing
-------
Thanks,
David
More information about the asterisk-dev
mailing list