<HTML>
<HEAD>
<TITLE>Re: [asterisk-users] Call file structure and syntax</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>That’s a good start. In my case, I want it to dial a round-robin queue (set up separately) and if the user presses 2, stop dialing the queue and log which user acknowledged the alarm. If the user presses 1, repeat the message, if no key is pressed before a timeout, hang up and dial the next user in the queue. Or something like that. One of the things I also want to be able to do with this is echo out something to the shell, either a textfile or an actual command so that I can trigger some other actions not necessarily related to Asterisk.<BR>
<BR>
It’s a fun project except for the knowledge that successful completion is going to mean it wakes me up some night at 3am.<BR>
<BR>
<BR>
<BR>
On 6/22/10 10:31 AM, "Danny Nicholas" <<a href="danny@debsinc.com">danny@debsinc.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT COLOR="#000080"><FONT SIZE="2"><FONT FACE="Arial"><SPAN STYLE='font-size:10pt'>#1 – once you’ve got to this point, AMI would be a better option than a call file<BR>
#2 - using AMI or a call file, you are going to want to use the context-based method instead of application to get the most “bang for your buck”<BR>
<BR>
I use a bigger instance of this to play a message and accept 1 or 2 from the user<BR>
; this context is used by AMI to play a message<BR>
[accept]<BR>
exten => s,1,Answer<BR>
exten => s,n,Background(important)<BR>
exten => s,n,WaitExten(5,m)<BR>
exten => 1,1,ForkCDR(v,s(fullcmd=${Data}))<BR>
exten => 1,n,Background(${Data})<BR>
exten => 1,n,Background(repeatmsg)<BR>
exten => 1,n,WaitExten(5,m)<BR>
exten => 1,n,Hangup<BR>
exten => 2,1,Background(calllater)<BR>
exten => 2,n,ForkCDR(v,s(reject=${Data}))<BR>
exten => 2,n,Hangup<BR>
exten => 3,1,Goto(accept|1|2)<BR>
exten => *,1,Goto(accept|s|1)<BR>
exten => i,1,Goto(accept|s|1)<BR>
exten => t,1,Goto(accept|s|1)<BR>
<BR>
here’s the call file<BR>
Action => 'Originate',<BR>
Channel => DAHDI/1,<BR>
Variable => "Data=/tmp/test.gsm”,<BR>
Exten => 'SIP/170',<BR>
Context => 'accept',<BR>
priority => 1,<BR>
Number => 5551212<BR>
Using the accept context, 5551212 is called on DAHDI/1 and user hears important.gsm. then they press 1 to hear test.gsm or 2 to hear it later.<BR>
<BR>
Hope this is helpful…<BR>
</SPAN></FONT></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>
</SPAN></FONT>
<P ALIGN=CENTER>
<FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'><HR ALIGN=CENTER SIZE="2" WIDTH="100%"></SPAN></FONT>
<P>
<FONT SIZE="2"><FONT FACE="Tahoma, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'><B>From:</B> <a href="asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a> [<a href="mailto:asterisk-users-bounces@lists.digium.com">mailto:asterisk-users-bounces@lists.digium.com</a>] <B>On Behalf Of </B>Mike Ely<BR>
<B>Sent:</B> Tuesday, June 22, 2010 12:02 PM<BR>
<B>To:</B> Asterisk Users Mailing List - Non-Commercial Discussion<BR>
<B>Subject:</B> [asterisk-users] Call file structure and syntax<BR>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi there,<BR>
<BR>
I’ve been looking to do an outbound dialer for systems alerting, etc. and have in large part followed the recipe here:<BR>
<a href="http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out">http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out</a><BR>
<BR>
That and the associated pages at voip-info give a basic set of recipes for callfiles, but nowhere there or in my copy of the O’Reilly book by Meggelen, Madsen, & Smith can I find a detailed discussion of what goes into a callfile, how to get it to do things like interact with the shell (I’d like “Press 2” in my outbound call to do something of value), etc. I’ve googled around but haven’t found what I’m looking for, just other people’s “Hello World” callfiles. As of now, I can make outbound calls well enough, but want more...<BR>
<BR>
Can someone point me in the right direction for this?<BR>
<BR>
Thanks,<BR>
Mike</SPAN></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"><BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>