Asterisk Release 1.6.1.1<br>Scenario:-<br><ol><li>2 SIP peers (Zoiper softphone, if it matters) registered as 901 and 902</li><li>Using AMI, 901 is Originated</li><li>When 901 answers, it is Redirected to an extension "exten => dial,1,Dial(SIP/902)"</li>
<li>902 rings, then answers<br></li><li>AMI recieves the channel events for 902, followed by Bridge event</li><ol><li><span style="font-family: courier new,monospace;">Event: Bridge</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Privilege: call,all</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Bridgestate: Link</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Bridgetype: core</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Channel1: SIP/901-007f0e98</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Channel2: </span><span style="background-color: rgb(255, 255, 0); font-family: courier new,monospace;">SIP/902-007fe948</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Uniqueid1: 1246031137.3</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Uniqueid2: 1246031140.4</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">CallerID1: NODID</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">CallerID2: dial</span><br style="font-family: courier new,monospace;">
<br><br></li></ol><li>901 and 902 are perfectly bridged and can talk</li><li>Now after some time, using AMI, both channels are Redirected to an extension "exten => calllegwait,1,Wait(60)"</li><li>AMI recieves the event:-<br>
<span style="font-family: courier new,monospace;">Event: Unlink</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Privilege: call,all</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Channel1: SIP/901-007f0e98</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Channel2: </span><span style="background-color: rgb(255, 255, 0); font-family: courier new,monospace;">AsyncGoto/SIP/902-007fe948<ZOMBIE></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Uniqueid1: 1246031137.3</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Uniqueid2: 1246031140.4</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">CallerID1: NODID</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">CallerID2: (null)</span></li></ol>2 Issues here:-<br>
<ol><li>Why is the Channel2: "AsyncGoto/SIP/902-007fe948<ZOMBIE>" instead of just "SIP/902-007fe948"</li><li>Why isn't there a "Bridge" event (with, ofcource, "Bridgestate: Unlink")<br>
</li></ol><br>Log snippets below:-<br><br><br><b><u>Dial application being launched</u></b><br><br><span style="font-family: courier new,monospace;">[Jun 26 22:24:14] DEBUG[3668]: pbx.c:3179 pbx_extension_helper: Launching 'Dial'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> -- Executing [dial@from-manager-core:1] Dial("SIP/901-007f0e98", "SIP/902,60000,60000") in new stack </span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><br><b><u>902 answers</u></b><br><br><span style="font-family: courier new,monospace;">[Jun 26 22:24:15] DEBUG[11643]: chan_sip.c:10862 build_route: build_route: Contact hop: <sip:902@10.10.1.162:5060;rinstance=9e5f63e47063d77c;transport=UDP></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:15] DEBUG[11643]: chan_sip.c:2872 __sip_xmit: Trying to put 'ACK sip:90' onto UDP socket destined for <a href="http://10.10.1.162:5060">10.10.1.162:5060</a></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> -- SIP/902-007fe948 answered SIP/901-007f0e98 </span><br style="font-family: courier new,monospace;">
<br><br><b><u>Bridge about to start. Notice the correct channel names</u></b><br><br><span style="font-family: courier new,monospace;">[Jun 26 22:24:15] DEBUG[3668]: features.c:2483 ast_bridge_call: bridge answer set, chan answer set</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> -- Packet2Packet bridging SIP/901-007f0e98 and <span style="background-color: rgb(255, 255, 0);">SIP/902-007fe948</span></span><br style="font-family: courier new,monospace;">
<br><br><b><u>AMI Redirect received</u></b><br><br><span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[11779]: manager.c:3007 process_message: Manager received command 'Redirect'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] WARNING[11779]: channel.c:961 ast_channel_alloc_withId_withVaList: Sending Newchannel event with ActionID: (null)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[11779]: channel.c:3980 ast_channel_masquerade: Planning to masquerade channel SIP/902-007fe948 into the structure of AsyncGoto/SIP/902-007fe948</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[11779]: channel.c:3992 ast_channel_masquerade: Done planning to masquerade channel SIP/902-007fe948 into the structure of AsyncGoto/SIP/902-007fe948</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[11779]: channel.c:4098 ast_do_masquerade: Actually Masquerading SIP/902-007fe948(6) into the structure of AsyncGoto/SIP/902-007fe948(6)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[11779]: channel.c:4111 ast_do_masquerade: Got clone lock for masquerade on 'SIP/902-007fe948' at 0x805350</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[11779]: channel.c:4292 ast_do_masquerade: Putting channel SIP/902-007fe948 in 8/8 formats</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[11779]: chan_sip.c:5512 sip_fixup: SIP Fixup: New owner for dialogue <a href="mailto:0a0362e626aa6b5a0b3f3b3862f649c5@10.10.1.213">0a0362e626aa6b5a0b3f3b3862f649c5@10.10.1.213</a>: SIP/902-007fe948 (Old parent: AsyncGoto/SIP/902-007fe948<ZOMBIE>)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[11779]: channel.c:4338 ast_do_masquerade: Released clone lock on 'AsyncGoto/SIP/902-007fe948<ZOMBIE>'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[11779]: channel.c:4347 ast_do_masquerade: Done Masquerading SIP/902-007fe948 (6)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[11779]: channel.c:1576 ast_softhangup_nolock: Soft-Hanging up channel 'SIP/901-007f0e98'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[3668]: rtp.c:4178 bridge_p2p_loop: p2p-rtp-bridge: Ooh, got a hangup</span><br><br><b><u>Returned from Bridge. Notice the incorrect channel name for the second channel</u></b><br>
<br><span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[3668]: channel.c:4921 ast_channel_bridge: Returning from native bridge, channels: SIP/901-007f0e98, <span style="background-color: rgb(255, 255, 0);">AsyncGoto/SIP/902-007fe948<ZOMBIE></span></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[3668]: channel.c:1675 ast_hangup: Hanging up zombie 'AsyncGoto/SIP/902-007fe948<ZOMBIE>'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[3668]: rtp.c:2055 ast_rtp_early_bridge: Channel '<unspecified>' has no RTP, not doing anything</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[3668]: app_dial.c:2032 dial_exec_full: Exiting with DIALSTATUS=ANSWER.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[3668]: pbx.c:3779 __ast_pbx_run: Spawn extension (from-manager-core,calllegwait,1) exited non-zero on 'SIP/901-007f0e98'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> == Spawn extension (from-manager-core, calllegwait, 1) exited non-zero on 'SIP/901-007f0e98'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[3668]: pbx.c:3179 pbx_extension_helper: Launching 'Wait'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> -- Executing [calllegwait@from-manager-core:1] Wait("SIP/901-007f0e98", "3600") in new stack</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">[Jun 26 22:24:19] DEBUG[3670]: pbx.c:3179 pbx_extension_helper: Launching 'Wait'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> -- Executing [calllegwait@from-manager-core:1] Wait("SIP/902-007fe948", "3600") in new stack</span><br style="font-family: courier new,monospace;">
<br><br><br>-- <br>Regards,<br>Prince Singh<br>W: <a href="http://www.drishti-soft.com">http://www.drishti-soft.com</a><br>B: <a href="http://blog.drishti-soft.com">http://blog.drishti-soft.com</a><br><br>