[asterisk-dev] [Code Review]: add test to assert that asterisk replies 481 to an invite with a to-tag
Mark Michelson
reviewboard at asterisk.org
Mon May 21 09:46:03 CDT 2012
> On May 17, 2012, 10:43 a.m., Mark Michelson wrote:
> > I don't like the fact that Asterisk is not accepting your ACK. Any idea why that might be occurring? I agree that your scenario appears correct.
I figured out the problem here. Asterisk thinks there is a to-tag mismatch in the ACK. The initial INVITE causes Asterisk to create a new sip_pvt. When Asterisk creates a sip_pvt, it generates a local tag and stores that in the sip_pvt. The problem is that when Asterisk sends the 481 response, rather than using this generated to-tag, Asterisk reuses the To header from the initial INVITE since the header had a tag present. This means that when your scenario properly sends an ACK with the same to-tag as the initial request and the 481, Asterisk sees that this to-tag does not match the generated local tag Asterisk created for the sip_pvt.
- Mark
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1918/#review6237
-----------------------------------------------------------
On May 14, 2012, 4:11 p.m., wdoekes wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1918/
> -----------------------------------------------------------
>
> (Updated May 14, 2012, 4:11 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> I had been meaning to add a check for this, and now that Mark almost broke it with r1911, it was the right time.
>
>
> Diffs
> -----
>
> /asterisk/trunk/tests/channels/SIP/invite_no_totag/configs/ast1/extensions.conf PRE-CREATION
> /asterisk/trunk/tests/channels/SIP/invite_no_totag/configs/ast1/sip.conf PRE-CREATION
> /asterisk/trunk/tests/channels/SIP/invite_no_totag/run-test PRE-CREATION
> /asterisk/trunk/tests/channels/SIP/invite_no_totag/sipp/call.xml PRE-CREATION
> /asterisk/trunk/tests/channels/SIP/invite_no_totag/test-config.yaml PRE-CREATION
> /asterisk/trunk/tests/channels/SIP/tests.yaml 3218
>
> Diff: https://reviewboard.asterisk.org/r/1918/diff
>
>
> Testing
> -------
>
> Works with 1.4 and 1.8.
>
> Note that I did see asterisk attempt to re-send the 481 (not accept the ACK), but I don't think my scenario is wrong.
>
>
> Thanks,
>
> wdoekes
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120521/79cb3fa9/attachment.htm>
More information about the asterisk-dev
mailing list