[asterisk-dev] [Code Review] Skip endpoint lookup for in-dialog requests

Mark Michelson reviewboard at asterisk.org
Fri Mar 15 12:29:26 CDT 2013


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

Review request for Asterisk Developers and Joshua Colp.


Summary
-------

I noticed after the NAT merge that I encountered an issue when trying to hang up calls.

If the called party hung up, Asterisk would respond with a 403 Forbidden. The reason for this was that endpoint lookup was being done on the incoming BYE. Since Asterisk did not include a user name in the To header of the initial INVITE, the from header of the BYE therefore also did not have a user name in it. The lack of a user name meant that res_sip_endpoint_identifier_user could not recognize the endpoint and thus the request was rejected.

The solution here is to not do endpoint lookups for in-dialog requests if possible. A new API call, ast_sip_dialog_set_endpoint(), a sister function to ast_sip_dialog_set_serializer() has been added. This makes the distributor able to distinguish what endpoint the request is from in-dialog and place this endpoint in the request data. The endpoint lookup module will then skip endpoint lookup if there is an endpoint already in the request data.


Diffs
-----

  /team/group/pimp_my_sip/include/asterisk/res_sip.h 383227 
  /team/group/pimp_my_sip/res/res_sip.exports.in 383227 
  /team/group/pimp_my_sip/res/res_sip/sip_distributor.c 383227 
  /team/group/pimp_my_sip/res/res_sip_session.c 383227 

Diff: https://reviewboard.asterisk.org/r/2392/diff


Testing
-------

I have ensured that basic calls still function properly and now when the called party hangs up, everything performs smoothly.


Thanks,

Mark

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130315/203cc437/attachment.htm>


More information about the asterisk-dev mailing list