Hi All,
I have been struggling with the auto dial out in asterisk. I am
trying to get a call to be auto dialed and play back a message once the
line is answered. So far I have been unsuccessful.
Currently what happens is I have my .call file. I mv it
into /var/spool/asterisk/outgoing. The call is initiated and that all
works, my problem is that it does not wait for the line to be answered
before playing the message back. It immediately after dialing the
number begins playing the message and is done playing it before the
person even answers the phone.
Does anyone know what I can do to get this working.
I want to be able to launch a script from cron that will create
the .call file and mv it into the outgoing directory. That is all
working currently. Here is a sample of what my .call file looks like
and what my extensions.conf looks like.
.call
Channel: Zap/3/1234567890
Callerid: 1234567890
MaxRetries: 200
RetryTime: 30
WaitTime: 45
Context: outboundmsg1
Extension: s
Priority: 1
extensions.conf ----- snip ---------
[outboundmsg1]
exten => s,1,AbsoluteTimeout,40
exten => s,2,DigitTimeout,5
exten => s,3,ResponseTimeout,10
exten => s,4,Answer
exten => s,5,Wait(1)
exten => s,6,Playback(outboundmsgs/msg1) ; "play
outbound msg"
exten => s,7,Background(outboundmsgs/how_to_ack) ; "Press 1 to
replay or 2 to acknowledge receiving this message"
exten =>
1,1,Goto(s,5) ;
replay message
exten =>
2,1,Goto(msgack,s,1) ;
acknowledge message
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup
exten => T,1,Hangup
Thanks in advance for any suggestions.
Jon Scottorn
Systems Administrator
The Possibility Forge, Inc.
http://www.possibilityforge.com
435.635.0591 x.1004
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20060518/317da69c/attachment.htm
Jon Scottorn wrote:> Hi All, > > I have been struggling with the auto dial out in asterisk. I am > trying to get a call to be auto dialed and play back a message once > the line is answered. So far I have been unsuccessful. > Currently what happens is I have my .call file. I mv it into > /var/spool/asterisk/outgoing. The call is initiated and that all > works, my problem is that it does not wait for the line to be answered > before playing the message back. It immediately after dialing the > number begins playing the message and is done playing it before the > person even answers the phone.You can't. You'll need to setup a loop that asks the end user to press a key to play your recording. I have mine loop 6 times with a timeout value of 6 seconds, before giving up. Code follows: [voice-mail-callback] ; ************ ; Set timeouts ; ************ exten => s,1,Set(TIMEOUT(response)=6) exten => s,2,Set(TIMEOUT(digit)=3) exten => s,3,Wait(5) exten => s,4,Set(COUNT=0) ; ******************************************* ; Play, you attention is required, press 1 to ; collect voice mail ; ******************************************* exten => s,5,Background(attention-required) exten => s,6,Background(press-1) exten => s,7,Background(to-collect-voicemail) ; ***************************************** ; If 1 is pressed, then play transfer and ; then jump to voice-mail context. ; ***************************************** exten => 1,1,Playback(pbx-transfer) exten => 1,2,Goto(voice-mail,s,1) ; **************************************** ; Setup a variable to count the number of ; times the message has been played, when ; $COUNT reaches > 5, play you've taken ; to long to dial and hangup. ; **************************************** exten => t,1,Set(COUNT=$[${COUNT} + 1]) exten => t,2,NoOP(${COUNT}) exten => t,3,GotoIf($[ ${COUNT} > 5 ]?103) exten => t,4,Goto(voice-mail-callback,s,5) exten => t,103,Playback(local/tolong-todial) exten => t,104,Playback(goodbye) exten => t,105,Hangup() ; **************************************** ; Invalid extension plays invalid choice and adds ; 1 to $COUNT ; **************************************** exten => i,1,Playback(local/sorry-invalid-choice) exten => i,2,Set(COUNT=$[${COUNT} + 1]) exten => i,3,NoOP(${COUNT}) exten => i,4,Goto(voice-mail-callback,s,5) exten => h,1,NoOP(Hungup)
On Thu, May 18, 2006 at 10:38:14 -0600, Jon Scottorn <jscottorn@possibilityforge.com> wrote:> Hi All, > > I have been struggling with the auto dial out in asterisk. I am > trying to get a call to be auto dialed and play back a message once the > line is answered. So far I have been unsuccessful. > Currently what happens is I have my .call file. I mv it > into /var/spool/asterisk/outgoing. The call is initiated and that all > works, my problem is that it does not wait for the line to be answered > before playing the message back. It immediately after dialing the > number begins playing the message and is done playing it before the > person even answers the phone. > Does anyone know what I can do to get this working.You didn't provide information about your hardware or where you are located (different telephone systems use different signalling). I am having the same problem with a TDM400 and as best I can tell, I have to wait for improved software to detect when the phone is answered. Digital hardware should do what you want, and TDM400s may work in different circumstances than mine. Depending where you are you may see polarity reversal as a call progress indicator. There are config settings for that in zapata.conf. There is also a call progress setting that didn't work for me. Some people claim that problems can be caused by the phone company not providing a signal to you (sometimes called "forward disconnect") and that if you talk to them they may be able to turn it on for you. There is also an entry on voip-info.org where someone claims to have an app named nv_linedetect that will do call progress based on inband audio. The source hasn't been published and I haven't seen any recent references for anyone using it. It seems common for people to stick in a wait(2) to give people a chance to answer the phone. That isn't a real solution, but might make things not so bad.