[asterisk-dev] [Code Review] 4257: chan_pjsip: Race condition between channel answer and bridge setup when using direct media

Kevin Harwell reviewboard at asterisk.org
Thu Dec 11 14:14:28 CST 2014

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 11, 2014, 2:14 p.m.)

Review request for Asterisk Developers.


Updated per suggestions.

Bugs: ASTERISK-24563

Repository: Asterisk


When direct media is enabled and a pjsip channel is answered a race would occur between the handling of the answer and bridge setup. Sometimes the media negotiation would take place after the native bridge was setup.  This resulted in a NULL media address, which in turn resulted in Asterisk using its address as the remote media address when sending a reinvite.  This patch makes the chan_pjsip answer handler synchronous thus alleviating the race condition (the bridge won't start setting things up until after it returns).

Diffs (updated)

  branches/13/channels/chan_pjsip.c 429386 

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


Made around 100 phones calls with and did not issue occur again.


Kevin Harwell

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

More information about the asterisk-dev mailing list