Re: [OpenSIPS-Users] Call MI functions from script

2020-02-27 Thread Liviu Chircu

On 27.02.2020 17:17, Schneur Rosenberg wrote:
I don't know if you can, but I assume you can always write a external 
script with xmlrpc and use the exec in a timer route to execute the 
script.


Or simply send yourself an MI datagram [1] command via UDP, from an 
external script (bash, Python, etc.) which you'd invoke from 
opensips.cfg using exec() [2], possibly even async(exec()) to make it 
snappier.  Somewhat of a hermaphroditic behavior, but gets the job well 
done!


[1]: https://opensips.org/docs/modules/3.1.x/mi_datagram.html
[2]: https://opensips.org/docs/modules/3.1.x/exec.html#func_exec

--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020
  www.opensips.org/events
OpenSIPS Bootcamp, Miami, March 2020
  www.opensips.org/training


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Call MI functions from script

2020-02-27 Thread Schneur Rosenberg
I don't know if you can, but I assume you can always write a external
script with xmlrpc and use the exec in a timer route to execute the script.

On Tue, Feb 25, 2020, 9:40 PM Grant Bagdasarian 
wrote:

> Hello,
>
> Is it possible to call MI functions from within the OpenSips script?
> For instance, call the domain_reload function inside a timer_route to
> refresh the domains every N seconds? I know this may be a bad example,
> since the domain module supports caching and realtime mode, but I hope
> you get the idea.
>
> I've been going through the documentation (mainly modules), but
> couldn't find anything that allows me to perform these tasks.
>
> Regards,
>
> Grant
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Call MI functions from script

2020-02-26 Thread Johan De Clercq
 Currently not. I do believe that this is on the featurelist.

Outlook voor iOS <https://aka.ms/o0ukef> downloaden
--
*Van:* Users  namens Grant Bagdasarian <
grantbagdasar...@gmail.com>
*Verzonden:* Tuesday, February 25, 2020 8:38:08 PM
*Aan:* OpenSIPS users mailling list 
*Onderwerp:* [OpenSIPS-Users] Call MI functions from script

Hello,

Is it possible to call MI functions from within the OpenSips script?
For instance, call the domain_reload function inside a timer_route to
refresh the domains every N seconds? I know this may be a bad example,
since the domain module supports caching and realtime mode, but I hope
you get the idea.

I've been going through the documentation (mainly modules), but
couldn't find anything that allows me to perform these tasks.

Regards,

Grant

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Call MI functions from script

2020-02-25 Thread Johan De Clercq
Currently not. I do believe that this is on the featurelist.

Outlook voor iOS<https://aka.ms/o0ukef> downloaden

Van: Users  namens Grant Bagdasarian 

Verzonden: Tuesday, February 25, 2020 8:38:08 PM
Aan: OpenSIPS users mailling list 
Onderwerp: [OpenSIPS-Users] Call MI functions from script

Hello,

Is it possible to call MI functions from within the OpenSips script?
For instance, call the domain_reload function inside a timer_route to
refresh the domains every N seconds? I know this may be a bad example,
since the domain module supports caching and realtime mode, but I hope
you get the idea.

I've been going through the documentation (mainly modules), but
couldn't find anything that allows me to perform these tasks.

Regards,

Grant

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Call MI functions from script

2020-02-25 Thread Grant Bagdasarian
Hello,

Is it possible to call MI functions from within the OpenSips script?
For instance, call the domain_reload function inside a timer_route to
refresh the domains every N seconds? I know this may be a bad example,
since the domain module supports caching and realtime mode, but I hope
you get the idea.

I've been going through the documentation (mainly modules), but
couldn't find anything that allows me to perform these tasks.

Regards,

Grant

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users