Hello,
I’m using a simple PHP script I found in the forums here to originate a call to a specific PJSIP extension and once answered, it’ll call the number I passed as a parameter to the script.
This script uses action: originate.
What I’m trying to create is a system that automatically join specific conference call from a desk phone without the need to enter long PINs.
My current script that works well (without entering the PIN after the conference system answers) is running the following actions:
fputs($oSocket, "Action: login\r\n");
fputs($oSocket, "Events: off\r\n");
fputs($oSocket, "Username: $strUser\r\n");
fputs($oSocket, "Secret: $strSecret\r\n\r\n");
fputs($oSocket, "Action: originate\r\n");
fputs($oSocket, "Channel: $strChannel\r\n");
fputs($oSocket, "WaitTime: $strWaitTime\r\n");
fputs($oSocket, "CallerId: $strCallerId\r\n");
fputs($oSocket, "Exten: $number\r\n");
fputs($oSocket, "Context: $strContext\r\n");
fputs($oSocket, "Priority: $strPriority\r\n\r\n");
fputs($oSocket, "Action: Logoff\r\n\r\n");
What I want to achieve is once the PJSIP extension picks up, it’ll automatically call $number and once answered, it’ll enter the conference PIN and #.
Any suggestions will be appreciated.
Thank you.