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 = 0.0.0.0
[user]
secret=pass
writetimeout=100
read=system,call,log,verbose,command,agent,user,config,originate,reporting
write=system,call,log,verbose,command,agent,user,config,originate,reporting
============= 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==================
[outgoing-calls]
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.