[asterisk-dev] [Code Review] Fix SEGFAULT in remote_bridge_loop after a SIP to SIP attended transfer with external IAX2 or DAHDI call

Alec Davis reviewboard at asterisk.org
Tue Mar 1 02:01:08 CST 2011


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

Review request for Asterisk Developers.


Summary
-------

Symptom:
When an external call originating from IAX2 a SEGFAULT (or from DAHDI a BAD MAGIC NUMBER) happens as the transfer between 2 internal SIP extensions completes.

Initially before the transfer is complete and the before masquerade happens the glue0 and glue1 pointers are pointing to update_peer (which is a reference to sip_set_rtp_peer)
Then after transfer completes and masquerading happens, glue0 and glue1 don't change, but the channel is now an IAX channel.
calling glue0->update_peer(c0, NULL, NULL, NULL, 0, 0)) is now fatal.

Solution:
If the channel condition is one of the following after breaking out of the loop, don't try to update_peer
 1). ZOMBIE
 2). cx->tech_pvt != pvtx
 3). gluex != ast_rtp_instance_get_glue(c0->tech->type))


This addresses bug 18781.
    https://issues.asterisk.org/view.php?id=18781


Diffs
-----

  trunk/main/rtp_engine.c 309081 

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


Testing
-------

Multiple transfers for now nearly 2 weeks, on a production 1.8.2.3 box handling ~ 800 calls a day.


Thanks,

Alec

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


More information about the asterisk-dev mailing list