[asterisk-users] Asterisk auto-dial out a SIP .
A J Stiles
asterisk_list at earthshod.co.uk
Tue Feb 28 10:15:25 CST 2012
On Tuesday 28 February 2012, upendra wrote:
> hi,
>
> an anyone tell me how to do auto dial to a SIP in Asterisk using a script
> .any example will be more helpful ... !
>
>
> Regards
> Upendra
You need to inject a callfile into /var/spool/asterisk/outgoing . The file
should look something like this (representing a call from extension 301 --
here the technology is important -- to extension 101 in context "internal");
#################### 8< ####################
Channel: SIP/301
Context: internal
Extension: 101
Priority: 1
CallerId: 301
#################### >8 ####################
It's easy enough to start with a complete callfile with placeholders, in a
scalar variable; then have your script do regular expression substitutions to
fill in the values.
You must also be careful that Asterisk will not try to parse the callfile while
it is in an incomplete state. The canonical method to do this is to create it
somewhere else on the same physical filesystem and `mv` it to the desired
location. In practice, if the callfile is smaller than one block, then you
probably will get away with just creating it in situ.
--
AJS
Answers come *after* questions.
More information about the asterisk-users
mailing list