Setting up a group of analog lines to use for outbound emergency calls (911). My current dial plan and debug output shown below. It appears that when the SoftHangup() is executed that the line does not really hang up. In the case shown, I had reduced the group to a single DAHDI (analog) channel and dialed in to that number from the outside. You can see in the output that the SoftHangup() was executed, but the call was not terminated - the outside caller stayed connected to something. Caller no longer heard the sounds from the menu he was in, but the call itself seemed to stay connected. Asterisk 1.8 on Ubuntu Any ideas? [emergency-services] exten =>911,1,Goto(dialpsap,1) exten =>9911,1,Goto(dialpsap,1) exten =>999,1,Goto(dialpsap,1) exten =>112,1,Goto(dialpsap,1) exten =>dialpsap,1,Verbose(1,Call initiated to PSAP!) same =>n(dialit),Dial(${LOCAL}/${EMERGENCY},30) same =>n,Verbose(2,DIALSTATUS=${DIALSTATUS}) same =>n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?good) same =>n(hu),SoftHangup(${EMERGENCY_CHANNEL},a) same =>n,Wait(5) same =>n,Goto(dialit) same =>n(good),NoOp(call good) same =>n,Hangup() == Using SIP RTP CoS mark 5 -- Executing [911 at LocalSets:1] Goto("SIP/mlcm800-00000000", "dialpsap,1") in new stack -- Goto (LocalSets,dialpsap,1) -- Executing [dialpsap at LocalSets:1] Verbose("SIP/mlcm800-00000000", "1,Call initiated to PSAP!") in new stack Call initiated to PSAP! -- Executing [dialpsap at LocalSets:2] Dial("SIP/mlcm800-00000000", "DAHDI/g20/19725232703,30") in new stack [Oct 11 19:30:13] WARNING[3740]: app_dial.c:2218 dial_exec_full: Unable to create channel of type 'DAHDI' (cause 34 - Circuit/channel congestion) == Everyone is busy/congested at this time (1:0/1/0) -- Executing [dialpsap at LocalSets:3] Verbose("SIP/mlcm800-00000000", "2,DIALSTATUS=CONGESTION") in new stack == DIALSTATUS=CONGESTION -- Executing [dialpsap at LocalSets:4] GotoIf("SIP/mlcm800-00000000", "0?good") in new stack -- Executing [dialpsap at LocalSets:5] SoftHangup("SIP/mlcm800-00000000", "DAHDI/49,a") in new stack [Oct 11 19:30:13] WARNING[3740]: app_softhangup.c:122 softhangup_exec: Soft hanging DAHDI/49-1 up. -- Executing [dialpsap at LocalSets:6] Wait("SIP/mlcm800-00000000", "5") in new stack == Spawn extension (MainMenu, s, 13) exited non-zero on 'DAHDI/49-1' -- Hanging up on 'DAHDI/49-1' -- Hungup 'DAHDI/49-1' -- Executing [dialpsap at LocalSets:7] Goto("SIP/mlcm800-00000000", "dialit") in new stack -- Goto (LocalSets,dialpsap,2) -- Executing [dialpsap at LocalSets:2] Dial("SIP/mlcm800-00000000", "DAHDI/g20/19725232703,30") in new stack -- Called DAHDI/g20/19725232703 -- DAHDI/49-1 answered SIP/mlcm800-00000000 -- Hanging up on 'DAHDI/49-1' -- Hungup 'DAHDI/49-1' == Spawn extension (LocalSets, dialpsap, 2) exited non-zero on 'SIP/mlcm800-00000000' -- Mitch
> Setting up a group of analog lines to use for outbound emergency > calls > (911). My current dial plan and debug output shown below. It > appears > that when the SoftHangup() is executed that the line does not really > hang up. In the case shown, I had reduced the group to a single > DAHDI > (analog) channel and dialed in to that number from the outside. You > can > see in the output that the SoftHangup() was executed, but the call > was > not terminated - the outside caller stayed connected to something. > Caller no longer heard the sounds from the menu he was in, but the > call > itself seemed to stay connected. > > Asterisk 1.8 on Ubuntu > > Any ideas?I think this behavior is country specific. I know in the UK, the caller controls the analog line. If the called party hangs up, the caller can stay online and keep the connection. You may need to limit these analog lines to outgoing only or reserve the emergency priority line for outgoing only. Richard> [emergency-services] > exten =>911,1,Goto(dialpsap,1) > exten =>9911,1,Goto(dialpsap,1) > exten =>999,1,Goto(dialpsap,1) > exten =>112,1,Goto(dialpsap,1) > > exten =>dialpsap,1,Verbose(1,Call initiated to PSAP!) > same =>n(dialit),Dial(${LOCAL}/${EMERGENCY},30) > same =>n,Verbose(2,DIALSTATUS=${DIALSTATUS}) > same =>n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?good) > same =>n(hu),SoftHangup(${EMERGENCY_CHANNEL},a) > same =>n,Wait(5) > same =>n,Goto(dialit) > same =>n(good),NoOp(call good) > same =>n,Hangup() > > > == Using SIP RTP CoS mark 5 > -- Executing [911 at LocalSets:1] Goto("SIP/mlcm800-00000000", > "dialpsap,1") in new stack > -- Goto (LocalSets,dialpsap,1) > -- Executing [dialpsap at LocalSets:1] > Verbose("SIP/mlcm800-00000000", > "1,Call initiated to PSAP!") in new stack > Call initiated to PSAP! > -- Executing [dialpsap at LocalSets:2] Dial("SIP/mlcm800-00000000", > "DAHDI/g20/19725232703,30") in new stack > [Oct 11 19:30:13] WARNING[3740]: app_dial.c:2218 dial_exec_full: > Unable > to create channel of type 'DAHDI' (cause 34 - Circuit/channel > congestion) > == Everyone is busy/congested at this time (1:0/1/0) > -- Executing [dialpsap at LocalSets:3] > Verbose("SIP/mlcm800-00000000", > "2,DIALSTATUS=CONGESTION") in new stack > == DIALSTATUS=CONGESTION > -- Executing [dialpsap at LocalSets:4] > GotoIf("SIP/mlcm800-00000000", > "0?good") in new stack > -- Executing [dialpsap at LocalSets:5] > SoftHangup("SIP/mlcm800-00000000", "DAHDI/49,a") in new stack > [Oct 11 19:30:13] WARNING[3740]: app_softhangup.c:122 > softhangup_exec: > Soft hanging DAHDI/49-1 up. > -- Executing [dialpsap at LocalSets:6] Wait("SIP/mlcm800-00000000", > "5") in new stack > == Spawn extension (MainMenu, s, 13) exited non-zero on > 'DAHDI/49-1' > -- Hanging up on 'DAHDI/49-1' > -- Hungup 'DAHDI/49-1' > -- Executing [dialpsap at LocalSets:7] Goto("SIP/mlcm800-00000000", > "dialit") in new stack > -- Goto (LocalSets,dialpsap,2) > -- Executing [dialpsap at LocalSets:2] Dial("SIP/mlcm800-00000000", > "DAHDI/g20/19725232703,30") in new stack > -- Called DAHDI/g20/19725232703 > -- DAHDI/49-1 answered SIP/mlcm800-00000000 > -- Hanging up on 'DAHDI/49-1' > -- Hungup 'DAHDI/49-1' > == Spawn extension (LocalSets, dialpsap, 2) exited non-zero on > 'SIP/mlcm800-00000000'
> Setting up a group of analog lines to use for outbound emergency calls > (911). My current dial plan and debug output shown below. It appears > that when the SoftHangup() is executed that the line does not really > hang up. In the case shown, I had reduced the group to a single DAHDI > (analog) channel and dialed in to that number from the outside. You can > see in the output that the SoftHangup() was executed, but the call was > not terminated - the outside caller stayed connected to something. > Caller no longer heard the sounds from the menu he was in, but the call > itself seemed to stay connected.That may be due to a common characteristic of PSTN lines (at least, it's common here in the U.S.) By design, most U.S. PSTN lines have a very asymmetrical response to a physical hangup: - If the calling party hangs up, the call is terminated immediately. - If the called party hangs up, and the calling party does not, the line remains "live" for some time (typically around 30 seconds, I believe). If the called party goes off-hook again during this period, they can resume the call. If I recall correctly, things were designed this way so that the called party could say "Oh, hang on, I answered this call in the bedroom and the stuff I need is in the living room", hang up the extension phone, go to another room, pick up the other phone and carry on with the call. If that's what you're running into here - if the line you are trying to SoftHangup() was handing an inbound call - then there may be no good solution. As far as I know, there is no way to force an incoming PSTN call to release the line, other than "go on-hook, and wait for 30 seconds to pass". Several possible workarounds, roughly in order of increasing complexity and decreasing reliability: (1) Keep one of your PSTN lines reserved for emergency calls only; remove it from your inbound hunt group and place it in a Dahdi line group of its own (or don't group it at all). (2) Keep one of your PSTN lines reserved for *outbound* calls only; you should be able to SoftHangup() an outbound call within a second or two. (3) Figure out a way to check the PSTN lines that are in use at the time of an emergency - if they're all in use, somehow find one which was in use for an outbound call, and select it as the one to SoftHangup() and dial upon. (4) If you must keep all of your PSTN lines in bidirectional use, you may have to *tell* the parties that the line is needed for an emergency call, and ask them to release the line. Do a barge-in on the channel, play an alert sound, play a message saying "Emergency call in progress, please hang up this line immediately, play the alert sound again for a few seconds, SoftHangup(), Wait(2), and then try dialing.