[asterisk-users] Call file structure and syntax

Mike Ely mikeely at amyskitchen.net
Tue Jun 22 12:55:15 CDT 2010


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.

It¹s a fun project except for the knowledge that successful completion is
going to mean it wakes me up some night at 3am.



On 6/22/10 10:31 AM, "Danny Nicholas" <danny at debsinc.com> wrote:

> #1 ­ once you¹ve got to this point, AMI would be a better option than a call
> file
> #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²
>  
> I use a bigger instance of this to play a message and accept 1 or 2 from the
> user
> ; this context is used by AMI to play a message
> [accept]
> exten => s,1,Answer
> exten => s,n,Background(important)
> exten => s,n,WaitExten(5,m)
> exten => 1,1,ForkCDR(v,s(fullcmd=${Data}))
> exten => 1,n,Background(${Data})
> exten => 1,n,Background(repeatmsg)
> exten => 1,n,WaitExten(5,m)
> exten => 1,n,Hangup
> exten => 2,1,Background(calllater)
> exten => 2,n,ForkCDR(v,s(reject=${Data}))
> exten => 2,n,Hangup
> exten => 3,1,Goto(accept|1|2)
> exten => *,1,Goto(accept|s|1)
> exten => i,1,Goto(accept|s|1)
> exten => t,1,Goto(accept|s|1)
>  
> here¹s the call file
> Action => 'Originate',
>                                  Channel => DAHDI/1,
>                                  Variable => "Data=/tmp/test.gsm²,
>                                  Exten => 'SIP/170',
>                                  Context => 'accept',
>                                  priority => 1,
>                                  Number => 5551212
> 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.
>  
> Hope this is helpfulŠ
> 
> 
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mike Ely
> Sent: Tuesday, June 22, 2010 12:02 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [asterisk-users] Call file structure and syntax
>  
> Hi there,
> 
> I¹ve been looking to do an outbound dialer for systems alerting, etc. and have
> in large part followed the recipe here:
> http://www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out
> 
> 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...
> 
> Can someone point me in the right direction for this?
> 
> Thanks,
> Mike 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100622/71320eb5/attachment.htm 


More information about the asterisk-users mailing list