I am writing a client application to work with an asterisk. Operator shall record the personal information and phone number. Can you please tell how to get phone number when someone calls. I have been programming in Delphi (freepascal) and there are no bindings for ARI and, so I use get and post through http for JSON response.
for example:
S:= Get(‘http://some_login:some_password@some_ip:8088/ari/channels/some_ch’);
Please, show me a simple example (ARI), how to get the phone number and redirect the call to another operator.
Start by learning Asterisk+Standard+Channel+Variables , If you want to get the caller number use ${CALLERID(num)} variable, I also suggest you use AMI or AGI for this type of development
Anyway you can check this links for more information
Thanks for the help, I appreciate it!
Now I train in asterisk Swagger and try to redirect channel to another number and get an answer:
“message”: “Channel not in Stasis application”
On the Internet, information about this quite fragmented. Help please understand.
ARI does not allow you to arbitrarily do things to channels unless they are under its control. This is the opposite of AMI which allows you to redirect anything. What exactly are you trying to accomplish? AMI may be the better option.
Now I try to connect to the asterisk via telnet and get an answer:
Trying 127.0.0.1…
Connected to 127.0.0.1.
Escape character is ‘^]’.
Asterisk Call Manager/2.8.0