Saint Michael
2018-Jul-25 17:53 UTC
[asterisk-users] How to know the IP of "manager show connected" in dialplan
I need to launch a remote process at the machine that has the dialer. I could hard-code the IP address in a global variable, but It would be much more elegant if the dialplan would have a "manager" object where I could read "manager-->connected". -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20180725/0664a494/attachment.html>
Antony Stone
2018-Jul-25 17:58 UTC
[asterisk-users] How to know the IP of "manager show connected" in dialplan
On Wednesday 25 July 2018 at 19:53:47, Saint Michael wrote:> I need to launch a remote process at the machine that has the dialer. I > could hard-code the IP address in a global variable, but It would be much > more elegant if the dialplan would have a "manager" object where I could > read "manager-->connected". If the dialer is connected to Asterisk using AMI, how about issuing a UserEvent in the dialplan, which will then be seen by the logged-in dialer process (assuming it's looking at the event stream) and can be acted upon to launch the (now local) process? Antony. -- I think broken pencils are pointless. Please reply to the list; please *don't* CC me.
Ludovic Gasc
2018-Jul-25 20:41 UTC
[asterisk-users] How to know the IP of "manager show connected" in dialplan
Maybe I'm wrong, but, with the information you give us, for me, it seems more elegant to use FastAGI to be sure to communicate with the right remote process. As Antony suggested, UserEvent is also an option, except if you have several dialers connected at the same time or if you need to have an acknowledge that the action is correctly launched. Regards. -- Ludovic Gasc (GMLudo) Le mer. 25 juil. 2018 à 19:54, Saint Michael <venefax at gmail.com> a écrit :> I need to launch a remote process at the machine that has the dialer. I > could > hard-code the IP address in a global variable, but It would be much more > elegant if the dialplan would have a "manager" object where I could read > "manager-->connected". > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20180725/a5b3502a/attachment.html>
David Duffett
2018-Jul-25 20:49 UTC
[asterisk-users] How to know the IP of "manager show connected" in dialplan
How about using the CUT() function to get the IP address from the return from running the System() application running asterisk -rx "manager show connected"? I'm not in front of a machine, so cannot test this out... On Wed, 25 Jul 2018, 15:42 Ludovic Gasc, <gmludo at gmail.com> wrote:> Maybe I'm wrong, but, with the information you give us, for me, it seems > more elegant to use FastAGI to be sure to communicate with the right remote > process. > > As Antony suggested, UserEvent is also an option, except if you have > several dialers connected at the same time or if you need to have an > acknowledge that the action is correctly launched. > > Regards. > -- > Ludovic Gasc (GMLudo) > > > Le mer. 25 juil. 2018 à 19:54, Saint Michael <venefax at gmail.com> a écrit : > >> I need to launch a remote process at the machine that has the dialer. I >> could >> hard-code the IP address in a global variable, but It would be much more >> elegant if the dialplan would have a "manager" object where I could read >> "manager-->connected". >> >> >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> Check out the new Asterisk community forum at: >> https://community.asterisk.org/ >> >> New to Asterisk? Start here: >> https://wiki.asterisk.org/wiki/display/AST/Getting+Started >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: > https://community.asterisk.org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20180725/edeb746c/attachment.html>