[asterisk-users] Redirect with ExtraChannel on Bridged call give AMI event with second channel name AsyncGoto/...<ZOMBIE>

Prince Singh prince at drishti-soft.com
Tue Jun 30 05:51:38 CDT 2009


Originally posted on asterisk-dev with no response for 5 days, so posting it
to the wider audience now.


Asterisk Release 1.6.1.1
Scenario:-

   1. 2 SIP peers (Zoiper softphone, if it matters) registered as 901 and
   902
   2. Using AMI, 901 is Originated
   3. When 901 answers, it is Redirected to an extension "exten =>
   dial,1,Dial(SIP/902)"
   4. 902 rings, then answers
   5. AMI recieves the channel events for 902, followed by Bridge event
      1. Event: Bridge
      Privilege: call,all
      Bridgestate: Link
      Bridgetype: core
      Channel1: SIP/901-007f0e98
      Channel2: SIP/902-007fe948
      Uniqueid1: 1246031137.3
      Uniqueid2: 1246031140.4
      CallerID1: NODID
      CallerID2: dial


      6. 901 and 902 are perfectly bridged and can talk
   7. Now after some time, using AMI, both channels are Redirected to an
   extension "exten => calllegwait,1,Wait(60)"
   8. AMI recieves the event:-
   Event: Unlink
   Privilege: call,all
   Channel1: SIP/901-007f0e98
   Channel2: AsyncGoto/SIP/902-007fe948<ZOMBIE>
   Uniqueid1: 1246031137.3
   Uniqueid2: 1246031140.4
   CallerID1: NODID
   CallerID2: (null)

2 Issues here:-

   1. Why is the Channel2: "AsyncGoto/SIP/902-007fe948<ZOMBIE>" instead of
   just "SIP/902-007fe948"
   2. Why isn't there a "Bridge" event (with, ofcource, "Bridgestate:
   Unlink")


Log snippets below:-


*Dial application being launched*

[Jun 26 22:24:14] DEBUG[3668]: pbx.c:3179 pbx_extension_helper: Launching
'Dial'
    -- Executing [dial at from-manager-core:1] Dial("SIP/901-007f0e98",
"SIP/902,60000,60000") in new
stack


*902 answers*

[Jun 26 22:24:15] DEBUG[11643]: chan_sip.c:10862 build_route: build_route:
Contact hop: <sip:902 at 10.10.1.162:5060
;rinstance=9e5f63e47063d77c;transport=UDP>
[Jun 26 22:24:15] DEBUG[11643]: chan_sip.c:2872 __sip_xmit: Trying to put
'ACK sip:90' onto UDP socket destined for 10.10.1.162:5060
    -- SIP/902-007fe948 answered
SIP/901-007f0e98



*Bridge about to start. Notice the correct channel names*

[Jun 26 22:24:15] DEBUG[3668]: features.c:2483 ast_bridge_call: bridge
answer set, chan answer set
    -- Packet2Packet bridging SIP/901-007f0e98 and SIP/902-007fe948


*AMI Redirect received*

[Jun 26 22:24:19] DEBUG[11779]: manager.c:3007 process_message: Manager
received command 'Redirect'
[Jun 26 22:24:19] WARNING[11779]: channel.c:961
ast_channel_alloc_withId_withVaList: Sending Newchannel event with ActionID:
(null)
[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
[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
[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)
[Jun 26 22:24:19] DEBUG[11779]: channel.c:4111 ast_do_masquerade: Got clone
lock for masquerade on 'SIP/902-007fe948' at 0x805350
[Jun 26 22:24:19] DEBUG[11779]: channel.c:4292 ast_do_masquerade: Putting
channel SIP/902-007fe948 in 8/8 formats
[Jun 26 22:24:19] DEBUG[11779]: chan_sip.c:5512 sip_fixup: SIP Fixup: New
owner for dialogue 0a0362e626aa6b5a0b3f3b3862f649c5 at 10.10.1.213:
SIP/902-007fe948 (Old parent: AsyncGoto/SIP/902-007fe948<ZOMBIE>)
[Jun 26 22:24:19] DEBUG[11779]: channel.c:4338 ast_do_masquerade: Released
clone lock on 'AsyncGoto/SIP/902-007fe948<ZOMBIE>'
[Jun 26 22:24:19] DEBUG[11779]: channel.c:4347 ast_do_masquerade: Done
Masquerading SIP/902-007fe948 (6)
[Jun 26 22:24:19] DEBUG[11779]: channel.c:1576 ast_softhangup_nolock:
Soft-Hanging up channel 'SIP/901-007f0e98'
[Jun 26 22:24:19] DEBUG[3668]: rtp.c:4178 bridge_p2p_loop: p2p-rtp-bridge:
Ooh, got a hangup

*Returned from Bridge. Notice the incorrect channel name for the second
channel*

[Jun 26 22:24:19] DEBUG[3668]: channel.c:4921 ast_channel_bridge: Returning
from native bridge, channels: SIP/901-007f0e98,
AsyncGoto/SIP/902-007fe948<ZOMBIE>
[Jun 26 22:24:19] DEBUG[3668]: channel.c:1675 ast_hangup: Hanging up zombie
'AsyncGoto/SIP/902-007fe948<ZOMBIE>'
[Jun 26 22:24:19] DEBUG[3668]: rtp.c:2055 ast_rtp_early_bridge: Channel
'<unspecified>' has no RTP, not doing anything
[Jun 26 22:24:19] DEBUG[3668]: app_dial.c:2032 dial_exec_full: Exiting with
DIALSTATUS=ANSWER.
[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'
  == Spawn extension (from-manager-core, calllegwait, 1) exited non-zero on
'SIP/901-007f0e98'
[Jun 26 22:24:19] DEBUG[3668]: pbx.c:3179 pbx_extension_helper: Launching
'Wait'
    -- Executing [calllegwait at from-manager-core:1] Wait("SIP/901-007f0e98",
"3600") in new stack
[Jun 26 22:24:19] DEBUG[3670]: pbx.c:3179 pbx_extension_helper: Launching
'Wait'
    -- Executing [calllegwait at from-manager-core:1] Wait("SIP/902-007fe948",
"3600") in new stack



-- 
Regards,
Prince Singh
W: http://www.drishti-soft.com
B: http://blog.drishti-soft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090630/cb57bc39/attachment.htm 


More information about the asterisk-users mailing list