[asterisk-users] identifying channel for softhangup

Jeremy Kister asterisk-01 at jeremykister.com
Tue Dec 29 00:01:27 CST 2009


When I place an outbound call from asterisk 1.6.1.12 to a FXO port on 
my Cisco 1760V 12.4, the channel changes - seemingly incrementing:

e.g., in the first call, below, the channel name is 
"SIP/vgw1-00000075" -- the second call (on the same FXO port after a 
soft hangup on the CLI) is "SIP/vgw1-00000077"

How can I extract this information in the dialplan so that I can use 
the SoftHangup app in asterisk to disrupt an existing call ?

pbx1*CLI> soft hangup
SIP/vgw1-00000075  SIP/141-00000074
pbx1*CLI> soft hangup SIP/vgw1-00000075
Requested Hangup on channel 'SIP/vgw1-00000075'
     -- Executing [h at extensions:1] Hangup("SIP/141-00000074", "") in 
new stack
   == Spawn extension (extensions, h, 1) exited non-zero on 
'SIP/141-00000074'
   == Spawn extension (extensions, 09930267XXX0000, 1) exited 
non-zero on 'SIP/141-00000074'
     -- Executing [h at extensions:1] Hangup("SIP/141-00000074", "") in 
new stack
   == Spawn extension (extensions, h, 1) exited non-zero on 
'SIP/141-00000074'
   == Using SIP RTP CoS mark 5
   == Using UDPTL CoS mark 5
     -- Executing [09930267XXX0000 at extensions:1] 
Dial("SIP/141-00000076", "SIP/9930267XXX0000 at vgw1") in new stack
   == Using SIP RTP CoS mark 5
   == Using UDPTL CoS mark 5
     -- Called 9930267XXX0000 at vgw1
     -- SIP/vgw1-00000077 is making progress passing it to 
SIP/141-00000076
     -- SIP/vgw1-00000077 answered SIP/141-00000076
pbx1*CLI> soft hangup
SIP/vgw1-00000077  SIP/141-00000076
pbx1*CLI> soft hangup SIP/vgw1-00000077
Requested Hangup on channel 'SIP/vgw1-00000077'
     -- Executing [h at extensions:1] Hangup("SIP/141-00000076", "") in 
new stack
   == Spawn extension (extensions, h, 1) exited non-zero on 
'SIP/141-00000076'
   == Spawn extension (extensions, 09930267XXX0000, 1) exited 
non-zero on 'SIP/141-00000076'
     -- Executing [h at extensions:1] Hangup("SIP/141-00000076", "") in 
new stack
   == Spawn extension (extensions, h, 1) exited non-zero on 
'SIP/141-00000076'

-- 

Jeremy Kister
http://jeremy.kister.net./



More information about the asterisk-users mailing list