[asterisk-users] Good way to query data from asterisk realtime with Asterisk Manager API

Olle E. Johansson oej at edvina.net
Sat Sep 1 03:14:49 CDT 2012


31 aug 2012 kl. 16:58 skrev Shitian Long <longst.cn at gmail.com>:

> Do you think it is a good way to use Manager API "command action" to implement this feature?
No. The command action should be avoided since the output from the CLI commands is not
made for parsing by applications and may change too. Sometimes we cut of informaiton to fit
into a terminal window. If you use manager actions instead, you will always get the full data in a
format you can parse. If you have to use the command action you have found a place where a
manager action is missing and we developers would like to know that and fix it :-)

For realtime, there's a dialplan function REALTIME() that you can use with the manager actions
that change or read channel variables. That's the best way, since we lack manager realtime commands.

One reason for not going directly to the database API is that when building 3rd party apps,
we don't know what database you are using and can benefit from the ARA interface to databases,
exactly like Asterisk. It's not as effecient as going directly when you can, but sometimes you just
don't know what's behind ARA and thanks to ARA you don't have to. :-)

/Olle

* The new Edvina SIP Masterclass - Stockholm, Sweden Oct and Miami, FL, Dec 2012
  http://edvina.net/training/new-sip-masterclass/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2307 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120901/e1bb5072/attachment.bin>


More information about the asterisk-users mailing list