[asterisk-dev] [Code Review] 4532: PJSIP: Create transactions for out-of-dialog responses

Olle E Johansson reviewboard at asterisk.org
Fri Mar 27 05:45:07 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4532/#review14888
-----------------------------------------------------------


Just adding a note to the comment.


/branches/13/include/asterisk/res_pjsip.h
<https://reviewboard.asterisk.org/r/4532/#comment25514>

    ...and send the SAME answer to every retransmission...



/branches/13/res/res_pjsip.c
<https://reviewboard.asterisk.org/r/4532/#comment25515>

    


- Olle E Johansson


On March 26, 2015, 11:54 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4532/
> -----------------------------------------------------------
> 
> (Updated March 26, 2015, 11:54 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24920
>     https://issues.asterisk.org/jira/browse/ASTERISK-24920
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> A problem was found where a device was sending a MESSAGE request to a heavily loaded Asterisk system. Since Asterisk wasn't able to respond to the message within 500 ms, the device retransmitted the MESSAGE. Asterisk got around to handling the first MESSAGE, sent a 202 response and then sent the incoming MESSAGE into the dialplan to be handled. Asterisk then took the retransmission, sent a 202 response to it, and sent it into the dialplan to be handled as well.
> 
> This patch aims to fix the problem where retransmissions are being treated as new requests. This adds an API call to respond to an out of dialog request by creating a transaction and sending the response on that transaction. This way, when a retransmission arrives, the PJSIP transaction layer matches it to the transaction we created, re-sends the response, and Asterisk does not ever see the retransmission.
> 
> 
> Diffs
> -----
> 
>   /branches/13/res/res_pjsip_registrar.c 433494 
>   /branches/13/res/res_pjsip_messaging.c 433494 
>   /branches/13/res/res_pjsip/pjsip_options.c 433494 
>   /branches/13/res/res_pjsip.c 433494 
>   /branches/13/main/threadpool.c 433494 
>   /branches/13/include/asterisk/res_pjsip.h 433494 
> 
> Diff: https://reviewboard.asterisk.org/r/4532/diff/
> 
> 
> Testing
> -------
> 
> The test scenario where Asterisk was mishandling the retransmitted MESSAGE request has been confirmed to work correctly now. I also have started Asterisk and ensured that Asterisk has no errors responding to incoming REGISTER or OPTIONS requests, which are altered by this patch.
> 
> There is a testsuite review up at https://gerrit.asterisk.org/#/c/14/
> 
> 
> Thanks,
> 
> Mark Michelson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150327/7bd66016/attachment-0001.html>


More information about the asterisk-dev mailing list