I've been beating myself up over this script but clearly I'm missing something. If I enter an extension like 101 it rings through fine, but if I pick 2 for sales it hangs up with this message: == Spawn extension (sales, s, 1) exited non-zero on `Zap/1-1' Since I'm not sure what that exacly means I cannot take appropriate action. Any help would be appreciated. [default] include => incoming include => parkedcalls [incoming] exten => s,1,Wait,1 exten => s,2,Answer exten => s,3,DigitTimeout,5 exten => s,4,ResponseTimeout,15 exten => s,5,SetMusicOnHold,Random exten => s,6,Background,tku4calling exten => s,7,Background,menu exten => 2,1,Goto(sales,s,1) exten => 3,1,Goto(finance,s,1) exten => 4,1,Goto(change,s,1) exten => 5,1,Goto(support,s,1) exten => 0,1,Dial,ZAP/2|10|mt exten => 100,1,Dial,Zap/2|20|m exten => 100,2,Voicemail,u100 exten => 100,102,Voicemail,b100 exten => 101,1,Dial,Zap/2|20|m exten => 101,2,WaitMusicOnHold,15 exten => 101,3,Voicemail,u101 exten => 101,102,Voicemail,b101 exten => 102,1,Dial,Zap/2|20|m exten => 102,2,Voicemail,u102 exten => 102,102,Voicemail,b102 exten => 103,1,Dial,Zap/2|20|m exten => 103,2,Voicemail,u103 exten => 103,102,Voicemail,b103 exten => 8500,1,VoicemailMain exten => i,1,Playback,pbx-invalid exten => t,1,Playback,demo-thanks exten => t,2,Hangup include => extensions [sales] exten => s,1,Background(welcome) exten => 1,1,Goto(default,101,1) [finance] exten => s,1,Background(welcome) exten => 1,1,Goto(default,101,1) [change] exten => s,1,Background(welcome) exten => 1,1,Goto(default,101,1) [support] exten => s,1,Background(welcome) exten => 1,1,Goto(default,101,1) [extensions] ; Main extension exten => 100,1,Goto,default|s|1 ; Steve's Extension exten => 101,1,Dial,Zap/2|30 exten => 101,2,VoiceMail,u101 exten => 101,102,VoiceMail,b101 ; Mo's Extension exten => 102,1,Dial,Zap/2|30 exten => 102,2,VoiceMail,u102 exten => 102,102,VoiceMail,b102 ; Natasha's Extension exten => 103,1,Dial,Zap/2|30 exten => 103,2,VoiceMail,u103 exten => 103,102,VoiceMail,b103 -- Steve Szmidt ___________________________________________________________ HTML in e-mail is not safe. It let's spammers know to spam you more, and sets you up for online attack through IE 4.x and above. Using HTML in e-mail only promotes it as safe to the uninitiated.
> I've been beating myself up over this script but clearly I'm missing > something. If I enter an extension like 101 it rings through fine, > but if I pick 2 for sales it hangs up with this message: > > == Spawn extension (sales, s, 1) exited non-zero on `Zap/1-1' > > Since I'm not sure what that exacly means I cannot take appropriate > action. Any help would be appreciated.Need the portion for several lines before that... Be sure to run asterisk -vvvgc Mark
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@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