Asterisk auto-dial out a SIP .

Home » Asterisk Users » Asterisk auto-dial out a SIP .
Asterisk Users 3 Comments

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

3 thoughts on - Asterisk auto-dial out a SIP .

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

  • thnks for the reply..

    i want to know is there any way to call a SIP to SIP by command line ????

  • Yes. Just write a script in your favourite language (even bash will do if
    there is nothing better) to set up a callfile, then invoke it from the command
    line.

    As this list forbids discussion of paid-for services, you will need to contact
    me separately if you want me to write the script for you.