Make Out going call by AMI command

Hi, I would like to ask about how to make out-going call by AMI command

I make click to call php to use AMI command
So, dialphonennumber is number that i need to call in this case it is 0123456789 (sample).
and i already open port for ami in manager.conf
============= manager.conf ==============
enabled = yes
port = 5038
bindaddr =
============= php file ===================
fputs($socket, “Action: Login\r\n”);
fputs($socket, “UserName: user\r\n”);
fputs($socket, “Secret: pass\r\n\r\n”);

fputs($socket, “Action: Originate\r\n”);
fputs($socket, “Channel: PJSIP/$dialphonennumber\r\n”);
fputs($socket, “Exten: $dialphonennumber\r\n”);
fputs($socket, “Context: outgoing-calls\r\r\n”);
fputs($socket, “CallerID: $dialphonennumber\r\n”);
fputs($socket, “Priority: 1\r\n”);
fputs($socket, “Async: yes\r\n\r\n”);
============= extensions.conf==================
exten => _0X.,1,Dial(PJSIP/${EXTEN}@trunk_name,120,)

and then i originate call to 0123456789 but there is nothing happend
but it works when i use calling on application Microsip

i need to know why or originate is not use like this.

This will only work if there is an endpoint called 0123456789. Normally you provide and endpoint for the service provider and use the PJSIP/0123456789@<endpoint> format.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.