[OpenSIPS-Users] How to use Exported MI Functions in external applications, via mi_fifo? Syntax question.
Rodrigo Pimenta Carvalho
pimenta at inatel.br
Tue Sep 15 18:41:57 CEST 2015
Excelent Razvan!
I got the idea. i will try it.
Thank you very much!
RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
________________________________
De: users-bounces at lists.opensips.org <users-bounces at lists.opensips.org> em nome de Razvan Crainea <razvan at opensips.org>
Enviado: terça-feira, 15 de setembro de 2015 12:27
Para: users at lists.opensips.org
Assunto: Re: [OpenSIPS-Users] How to use Exported MI Functions in external applications, via mi_fifo? Syntax question.
Hi, Rodrigo!
The idea is pretty simple, your program has to:
1. Create a reply fifo
2. Build the command as you have in the example
3. Write the command in the fifo
4. Get the response from the reply fifo
I quickly wrote some examples for bash[1] and C[2] that do the same thing. Let me know if you have further questions.
[1] https://gist.github.com/razvancrainea/6c63f82f885e98db0e12
[2] https://gist.github.com/razvancrainea/0a7ed5731ebda4df17f3
Best regards,
Razvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com<http://www.opensips-solutions.com>
On 09/15/2015 05:12 PM, Rodrigo Pimenta Carvalho wrote:
Dear OpenSIPS-Users.
I have just completed a study about the utility of and how to use mi_fifo and dialog.
Now I know what I will have to do to terminate dialog by means of an external application or script. And i know how to invoke the external application from OpenSIPS.
However, I didn´t found good examples on how to use MI dlg_list and MI dlg_end_dlg commands, via mi_fifo.
That is, how exactly use such commands in an application source code? How exactly use such commands, for example in C or C++, or QT, or Python, etc?
In the OpenSIPS documentation we have, for example:
:dlg_list:_reply_fifo_file_
_empty_line_
But, how to use it in programming language?
Have I just to write the commands into the FIFO file as it is? If so, maybe I have understood how to use it.
Any hint will be very helpful!
Best regards.
P.S.:
The topics I have studied are:
http://www.opensips.org/Documentation/Interface-MI-2-2 (this page has an example on how to use xmlrpc in a programming language.)
http://www.opensips.org/Documentation/Modules-2-2
http://www.opensips.org/Documentation/Interface-CoreMI-2-2
http://www.opensips.org/html/docs/modules/2.2.x/dialog.html#id296877
http://www.opensips.org/html/docs/modules/2.2.x/mi_fifo.html
RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150915/fe3357c2/attachment-0001.htm>
More information about the Users
mailing list