Pyhton3 script uses the pjsip library to call and play recorded audio to given numbers (CSV format).
The script can initiate calls to multiple numbers and play a predefined recording after the call is received.
This type of application can be useful for businesses that want to announce information to their customers.
-
Filter unique numbers.
-
Try to call a number "N" times ( "N" can be set by the user) before ignoring the number.
-
After execution, the script gives a detailed report about "Answered Calls" and "Unanswered Calls".
Considering the script will be used on linux (ubuntu).
-
Follow this repository to set up pjsip/pjsua for python3.
-
Check if "pjsua" installed correctly.
-
Create "call_list.csv" to a folder. Use delimiter "\n" while adding numbers(the numbers you want to call) to the csv file.
-
Change the audio file (must be wav format) name to "play.wav". "play.wav" will be played to numbers when call is received.
-
Copy "script.py" script to the working folder (working folder refers to where "play.wav" & "call_list.csv" files exist).
-
Update username, user password, sip server address inside the script before execution (variables are named relatively).
-
Open a terminal inside the folder. Run "python3 script.py" to execute the script.
-
While installing PJSIP carefully follow the steps. For first time it is better to use virtual machine.
-
Tested the script on Ubuntu Lts 20.04 ( Pjsip 2.10 & Python 3.8).
-
Tested with virtual numbers ( here virtual number referring such number which uses sip protocol).