[asterisk-users] Call file structure and syntax

Danny Nicholas
Tue, 22 Jun 2010 17:31:57 -0000

#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...