re: [asterisk-users] Asterisk outbound calling does not wait for answer before playback
Had the same issue time ago, but Eric shed good light on it, have a look at: http://lists.digium.com/pipermail/asterisk-users/2006-November/172079.html Summary: sorry, no nice work around. Alyed Return-Path: [EMAIL PROTECTED] Received: from digium-69-16-138-164.phx1.puregig.net [69.16.138.164] by maila11.webcontrolcenter.com with SMTP; Thu, 8 Feb 2007 13:54:53 -0700 Received: from digium-69-16-138-164.phx1.puregig.net (localhost [127.0.0.1]) by lists.digium.com (Postfix) with ESMTP id 2F6122FC4DD; Thu, 8 Feb 2007 12:35:23 -0700 (MST) Hello Asteriskers, :-) We're trying to set up an outbound notification calling for system alerts with Asterisk 1.4.0. We generate a call file in /var/spool/asterisk/outgoing and the outbound call is originated through Zap/1 (Sangoma A200D to a Canadian POTS line). The problem is that Asterisk does not wait for the other side to answer before it starts playing the message. So the person called answers the phone after the second or third ring and only hears the tail end of the message and the goodbye. Ideally, we want to deliver the message immediately after the person answers, or if an answering machine picks up, right after the beep. Any suggestions? (1) The call file generator script (works ok): #!/bin/sh TMPFILE=`mktemp /tmp/tmp.XXX` || exit 1 echo TMPFILE = $TMPFILE cat $TMPFILE Channel: Zap/g1/phone_number_here Callerid: SYSTEM MaxRetries: 2 RetryTime: 60 WaitTime: 30 Context: dialout Extension: s Priority: 1 EOT mv -v $TMPFILE /var/spool/asterisk/outgoing (2) The dialout context in extensions.conf (problem - starts playback before call is answered) [dialout] exten = s,1,NoOp(Dialout) exten = s,n,Set(TIMEOUT(digit)=5) exten = s,n,Set(TIMEOUT(response)=8) exten = s,n,Set(MACHINE=0) exten = s,n,Answer exten = s,n,BackgroundDetect(silence/5,1000,50) exten = s,n,NoOp(Ans Machine detected) exten = s,n,Set(MACHINE=1) exten = s,n,BackgroundDetect(silence/30,1000,50,30050) exten = s,n,NoOp(Ans Machine Message Too Long) exten = s,n,Hangup exten = talk,1,GotoIf($[${MACHINE}=1]?machine:human) exten = talk,2(machine),Goto(dialout-machine,s,1) exten = talk,3(human),Goto(dialout-human,s,1) [dialout-machine] exten = s,1,NoOp(Dialout to Ans Machine) exten = s,n,Playback(/tmp/asterisk-recording) exten = s,n,Wait(1) ; we'd like to do something to wait for the beep here... exten = s,n,Playback(vm-goodbye) exten = s,n,Hangup [dialout-human] exten = s,1,NoOp(Dialout to Human) exten = s,n,Playback(/tmp/asterisk-recording) exten = s,n,Wait(1) exten = s,n,Playback(vm-goodbye) exten = s,n,Hangup (3) *CLI -- Attempting call on Zap/1/1234567 for [EMAIL PROTECTED]:1 (Retry 1) Channel Zap/1-1 was answered. -- Executing [EMAIL PROTECTED]:1] NoOp(Zap/1-1, Dialout) in new stack -- Executing [EMAIL PROTECTED]:2] Set(Zap/1-1, TIMEOUT(digit)=5) in new stack -- Digit timeout set to 5 -- Executing [EMAIL PROTECTED]:3] Set(Zap/1-1, TIMEOUT(response)=8) in new stack -- Response timeout set to 8 -- Executing [EMAIL PROTECTED]:4] Set(Zap/1-1, MACHINE=0) in new stack -- Executing [EMAIL PROTECTED]:5] Answer(Zap/1-1, ) in new stack (Problem: Asterisk does not wait until the call is answered on the far end!) -- Executing [EMAIL PROTECTED]:6] BackgroundDetect(Zap/1-1, silence/5|1000|50) in new stack -- Playing 'silence/5' (language 'en') -- Executing [EMAIL PROTECTED]:1] GotoIf(Zap/1-1, 0?machine:human) in new stack -- Goto (dialout,talk,3) -- Executing [EMAIL PROTECTED]:3] Goto(Zap/1-1, dialout-human|s|1) in new stack -- Goto (dialout-human,s,1) -- Executing [EMAIL PROTECTED]:1] NoOp(Zap/1-1, Dialout to Human) in new stack -- Executing [EMAIL PROTECTED]:2] Playback(Zap/1-1,/tmp/asterisk-recording) in new stack -- Playing '/tmp/asterisk-recording' (language 'en') -- Executing [EMAIL PROTECTED]:3] Wait(Zap/1-1, 1) in new stack -- Executing [EMAIL PROTECTED]:4] Playback(Zap/1-1, vm-goodbye) in new stack -- Playing 'vm-goodbye' (language 'en') -- Executing [EMAIL PROTECTED]:5] Hangup(Zap/1-1, ) in new stack == Spawn extension (dialout-human, s, 5) exited non-zero on 'Zap/1-1' -- Hungup 'Zap/1-1' [Feb 8 13:29:37] NOTICE[32512]: pbx_spool.c:351 attempt_thread: Call completed to Zap/1/1234567 Thanks for any ideas on this! Alvin ___ --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 ___ --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
Re: [asterisk-users] Asterisk outbound calling does not wait for answer before playback
Although probably not what you want to hear, I don't think there is any way that Asterisk will detect answering supervision on an analog POTS line (I believe that there used to be an option with some Telcos to get a polarity reversal upon answering, but I don't think that is possible any more.) If you were willing to make the calls using a VOIP provider like Voipjet you would not have this problem, but that might not meet your needs for other reasons. On 2/8/07, Alvin Austin [EMAIL PROTECTED] wrote: Hello Asteriskers, :-) We're trying to set up an outbound notification calling for system alerts with Asterisk 1.4.0. We generate a call file in /var/spool/asterisk/outgoing and the outbound call is originated through Zap/1 (Sangoma A200D to a Canadian POTS line). The problem is that Asterisk does not wait for the other side to answer before it starts playing the message. So the person called answers the phone after the second or third ring and only hears the tail end of the message and the goodbye. Ideally, we want to deliver the message immediately after the person answers, or if an answering machine picks up, right after the beep. Any suggestions? (1) The call file generator script (works ok): #!/bin/sh TMPFILE=`mktemp /tmp/tmp.XXX` || exit 1 echo TMPFILE = $TMPFILE cat EOT $TMPFILE Channel: Zap/g1/phone_number_here Callerid: SYSTEM MaxRetries: 2 RetryTime: 60 WaitTime: 30 Context: dialout Extension: s Priority: 1 EOT mv -v $TMPFILE /var/spool/asterisk/outgoing (2) The dialout context in extensions.conf (problem - starts playback before call is answered) [dialout] exten = s,1,NoOp(Dialout) exten = s,n,Set(TIMEOUT(digit)=5) exten = s,n,Set(TIMEOUT(response)=8) exten = s,n,Set(MACHINE=0) exten = s,n,Answer exten = s,n,BackgroundDetect(silence/5,1000,50) exten = s,n,NoOp(Ans Machine detected) exten = s,n,Set(MACHINE=1) exten = s,n,BackgroundDetect(silence/30,1000,50,30050) exten = s,n,NoOp(Ans Machine Message Too Long) exten = s,n,Hangup exten = talk,1,GotoIf($[${MACHINE}=1]?machine:human) exten = talk,2(machine),Goto(dialout-machine,s,1) exten = talk,3(human),Goto(dialout-human,s,1) [dialout-machine] exten = s,1,NoOp(Dialout to Ans Machine) exten = s,n,Playback(/tmp/asterisk-recording) exten = s,n,Wait(1) ; we'd like to do something to wait for the beep here... exten = s,n,Playback(vm-goodbye) exten = s,n,Hangup [dialout-human] exten = s,1,NoOp(Dialout to Human) exten = s,n,Playback(/tmp/asterisk-recording) exten = s,n,Wait(1) exten = s,n,Playback(vm-goodbye) exten = s,n,Hangup (3) *CLI -- Attempting call on Zap/1/1234567 for [EMAIL PROTECTED]:1 (Retry 1) Channel Zap/1-1 was answered. -- Executing [EMAIL PROTECTED]:1] NoOp(Zap/1-1, Dialout) in new stack -- Executing [EMAIL PROTECTED]:2] Set(Zap/1-1, TIMEOUT(digit)=5) in new stack -- Digit timeout set to 5 -- Executing [EMAIL PROTECTED]:3] Set(Zap/1-1, TIMEOUT(response)=8) in new stack -- Response timeout set to 8 -- Executing [EMAIL PROTECTED]:4] Set(Zap/1-1, MACHINE=0) in new stack -- Executing [EMAIL PROTECTED]:5] Answer(Zap/1-1, ) in new stack (Problem: Asterisk does not wait until the call is answered on the far end!) -- Executing [EMAIL PROTECTED]:6] BackgroundDetect(Zap/1-1, silence/5|1000|50) in new stack -- Playing 'silence/5' (language 'en') -- Executing [EMAIL PROTECTED]:1] GotoIf(Zap/1-1, 0?machine:human) in new stack -- Goto (dialout,talk,3) -- Executing [EMAIL PROTECTED]:3] Goto(Zap/1-1, dialout-human|s|1) in new stack -- Goto (dialout-human,s,1) -- Executing [EMAIL PROTECTED]:1] NoOp(Zap/1-1, Dialout to Human) in new stack -- Executing [EMAIL PROTECTED]:2] Playback(Zap/1-1,/tmp/asterisk-recording) in new stack -- Playing '/tmp/asterisk-recording' (language 'en') -- Executing [EMAIL PROTECTED]:3] Wait(Zap/1-1, 1) in new stack -- Executing [EMAIL PROTECTED]:4] Playback(Zap/1-1, vm-goodbye) in new stack -- Playing 'vm-goodbye' (language 'en') -- Executing [EMAIL PROTECTED]:5] Hangup(Zap/1-1, ) in new stack == Spawn extension (dialout-human, s, 5) exited non-zero on 'Zap/1-1' -- Hungup 'Zap/1-1' [Feb 8 13:29:37] NOTICE[32512]: pbx_spool.c:351 attempt_thread: Call completed to Zap/1/1234567 Thanks for any ideas on this! Alvin ___ --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 ___ --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
Re: [asterisk-users] Asterisk outbound calling does not wait for answer before playback
Alyed Tzompa wrote: Had the same issue time ago, but Eric shed good light on it, have a look at: http://lists.digium.com/pipermail/asterisk-users/2006-November/172079.html Summary: sorry, no nice work around. At least, not in the analog TDM world. Personally, I'll advise everyone to use ISDN if you need to detect call progress for TDM circuits. Or if you're in North America, try the callprogress=yes option in zapata.conf. Analog lines are perfectly fine is you're happy with call progress detection in Wetware(TM) :). For automated call progress detection, you would be happier with a digital line or VOIP. Leo ___ --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