in asterisk, python, voip

How to dial a number using Asterisk and Python

I didn’t find any example in Python on how to Dial a number from an Asterisk server and link it to another channel. So here’s a quick code to do it. You just need to have a manager defined in your /etc/asterisk/manager.conf defined.

Related posts:

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Write a Comment

Comment

 
  1. It looks like there is a typo in pattern splitting (may be copy paste issue):

    pattern.split(‘\n’)

    Similarly:

    s.send(l+’\r\n’)

  2. import error
    >>> import ami
    Traceback (most recent call last):
    File “”, line 1, in
    File “.\ami.py”, line 58
    print “Sending>”, l