1

I'm currently working on a project which is based on RPi and Asterisk.

What I Want

In my project, I need to get incoming call details like caller ID into python and perform some functions connected to database.

What I Have Tried

I've installed Python and Asterisk and configured both in my RPi. But I don't know how to read incoming caller ID from python since there is no gateway of communication between asterisk and python.

Problem

Can someone tell me a way of accomplish my task? I know there is a gateway call AGI to do that. But I cannot find how can I get that configured with Raspberry Pi. Please help.

0

I found the solution to my own problem and thought to share it. However it's better to use Python package to make the communication between Asterisk and Python. Since we have configured both in our Raspberry Pi, all I had to do was use Python Package called pyst.

To install that package, just run this code in RPi terminal.

sudo apt-get install python-pyst

Then it will install. But will ask your permission in few times to complete the installation. After that you are good to go. As an example, You can go to the Python IDE and start writing your script starting,

import asterisk

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.