[Asterisk-Users] Exited non-zero
Schochet, Wes
wes.schochet at selectcomfort.com
Sun Jan 15 22:59:31 MST 2006
I am working on this app to dial two external numbers the second after the
first hangs up. I have simplified things down to:
exten => 3852,1,Dial(zap/g1/3964,10,g)
exten => 3852,2,Wait(2)
exten => 3852,3,Dial(zap/g1/7757,10,g)
exten => 3852,4,Hangup
Here is the debug:
-- Accepting call from '0000000000' to '3852' on channel 0/23, span 1
-- Executing Dial("Zap/23-1", "zap/g1/3964|10|g") in new stack
-- Called g1/3964
-- Zap/1-1 is ringing
-- Zap/1-1 answered Zap/23-1
-- Attempting native bridge of Zap/23-1 and Zap/1-1
Everything is OK here when someone picks up x3964. Then when x3964 is hung
up, the first Dial command executes fine, returning -1 (as per the docs
since it is disconnected by the far end). This causes a debug message of:
-- Hungup 'Zap/1-1'
== Spawn extension (from-internal, 3852, 1) exited non-zero on 'Zap/23-1'
-- Hungup 'Zap/23-1'
And execution halts.
I need to figure out either how to get the dial command to return 0 or get
the system to continue execution of the script despite the non-zero return.
Has anyone dealt with this before?
Thanks in advance,
Wes
-----Original Message-----
From: Schochet, Wes
Sent: Friday, January 13, 2006 2:40 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [Asterisk-Users] Bridging app
OK - this is great! However, I'm showing my lack of depth / newness here.
Calls from internal SIP phones work perfectly. Calls from external sources
(my PBX) fail. Obviously, I have a dialplan / context problem, but I'd
appreciate a brief explanation and some direction from the group!
In extensions.conf, I have [from-pstn]. Under that section, I have included
[ext-postcall]. Then I have the following in an included file:
[ext-postcall]
exten => 3852,1,Answer
exten => 3852,2,Dial(zap/g1/8030,10,g)
exten => 3852,3,wait(5)
exten => 3852,4,Dial(zap/g1/8041,10,g)
exten => 3852,5,wait(5)
exten => 3852,6,NoOp(${DIALSTATUS})
exten => 3852,7,Hangup
The trunk group g1 is a T1 to my PBX and in the zapata.conf file I have the
entry
context = from-pstn
..
..
Group = g1
Here is the trace from both an internal extension (205) and an external
extension.
>From SIP/205 ( Context=from-internal in sip.conf ) asterisk*CLI>
-- Executing Answer("SIP/205-1d7b", "") in new stack
-- Executing Dial("SIP/205-1d7b", "zap/g1/8030|10|g") in new stack
-- Called g1/8030
-- Zap/1-1 is ringing
-- Zap/1-1 answered SIP/205-1d7b
-- Channel 0/1, span 1 got hangup
-- Hungup 'Zap/1-1'
-- Executing Wait("SIP/205-1d7b", "5") in new stack
-- Executing Dial("SIP/205-1d7b", "zap/g1/8041|10|g") in new stack
-- Called g1/8041
-- Zap/1-1 is ringing
-- Zap/1-1 answered SIP/205-1d7b
-- Channel 0/1, span 1 got hangup
-- Hungup 'Zap/1-1'
-- Executing Wait("SIP/205-1d7b", "5") in new stack
-- Executing NoOp("SIP/205-1d7b", "ANSWER") in new stack
-- Executing Hangup("SIP/205-1d7b", "") in new stack
== Spawn extension (from-internal, 3852, 7) exited non-zero on
'SIP/205-1d7b'
-- Executing Macro("SIP/205-1d7b", "hangupcall") in new stack
-- Executing ResetCDR("SIP/205-1d7b", "w") in new stack
-- Executing NoCDR("SIP/205-1d7b", "") in new stack
-- Executing Wait("SIP/205-1d7b", "5") in new stack
-- Executing Hangup("SIP/205-1d7b", "") in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on
'SIP/205-1d7b' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/205-1d7b'
asterisk*CLI>
>From External coming in Zap/g1 (from-pstn) :
asterisk*CLI>
-- Executing Answer("Zap/23-1", "") in new stack
-- Accepting call from '0000000000' to '3852' on channel 0/23, span 1
-- Executing Dial("Zap/23-1", "zap/g1/8030|10|g") in new stack
-- Called g1/8030
-- Zap/1-1 is ringing
-- Zap/1-1 answered Zap/23-1
-- Attempting native bridge of Zap/23-1 and Zap/1-1
-- Hungup 'Zap/1-1'
== Spawn extension (from-pstn, 3852, 2) exited non-zero on 'Zap/23-1'
-- Executing Macro("Zap/23-1", "hangupcall") in new stack
-- Executing ResetCDR("Zap/23-1", "w") in new stack
-- Executing NoCDR("Zap/23-1", "") in new stack
-- Executing Wait("Zap/23-1", "5") in new stack
== Spawn extension (macro-hangupcall, s, 3) exited non-zero on 'Zap/23-1'
in macro 'hangupcall'
== Spawn extension (from-pstn, h, 1) exited non-zero on 'Zap/23-1'
-- Hungup 'Zap/23-1'
asterisk*CLI>
-----Original Message-----
From: trixter aka Bret McDanel [mailto:trixter at 0xdecafbad.com]
Sent: Thursday, January 12, 2006 2:04 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Bridging app
There might be a simplier way. a channel variable that holds the users
response, and a gotoif. You should be able to pass 'g' to dial which
according to http://www.voip-info.org/wiki-Asterisk+cmd+Dial
g: When the called party hangs up, exit to execute more commands in the
current context.
So the agent just hangs up and the IVR will continue with the caller into
your survey if they so selected, if not it just hangs up. That might be the
easiest way to do this.
You could even have the agent instructed based on that channel var
(depending on your CRM integration) to tell the caller that they will be
connected to the survey they opted to do so they dont forget and hangup too.
On Thu, 2006-01-12 at 13:48 -0600, Schochet, Wes wrote:
> Hi All-
>
> I am trying to create a post call survey application. I would like
> to:
>
> 1. ask the caller if they want to take a survey after their call
> completes 2. If no, just transfer the call 3. if yes,
> 4. bridge up another extension
> 5. wait for that extension to hang-up
> 6. have the system (not the user) transfer the call to different
> extension
> that administers an IVR based survey.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list