S
S
Svyazist2014-10-14 20:13:43
Asterisk
Svyazist, 2014-10-14 20:13:43

How to send an Asterisk AMI command from a C++ program?

Actually a subject. When you click on the button on the form, a request should be sent. I know that the request structure looks like this:

Action: <тип запроса><CRLF>
 <Key 1>: <Value 1><CRLF>
 <Key 2>: <Value 2><CRLF>
...
<CRLF>

Those. if i need to know active channels should i send something like this?
Action: command<CRLF>
Command: core show channels<CRLF>
<CRLF>

But I can not figure out how to form it and send it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2014-10-15
@rostel

Through normal telnet it looks like this:

$ telnet 192.168.1.100 5038
Action: login
Username: extracdr
Secret: extracdr

Action: Command
Command: core show channels

There are many examples on different languages:
www.voip-info.org/wiki/view/Asterisk+manager+Examples

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question