Re: [SR-Users] Question regarding calling a shell script from kamailio

2017-06-29 Thread Anuradha Selvarajan
Hello,

Resending as I didn't get any reply yet. I tried to use exec_msg to call a 
external script but that is not working as expected (used it under 
request_route function as suggested). Also exec_msg doesn't store any return 
value so not sure if this will help. Like mentioned in my previous email, 
looking for calling a external shell script and use the return value in 
fork.cfg file. I need help with this asap. Appreciate some help!

Thanks a lot!
Anu

From: Anuradha Selvarajan
Sent: Wednesday, June 28, 2017 10:03 AM
To: Kamailio (SER) - Users Mailing List 
Subject: Question regarding calling a shell script from kamailio

Hello,

I am using fork.cfg file and I want to call a shell script (which has curl 
commands extracting value from database and returns the value) and use the 
value in the fork.cfg. How can I do it?

Appreciate your help!

Thanksm
Anu
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Question regarding calling a shell script from kamailio

2017-06-29 Thread Alex Balashov
You can do this using the functions in the exec module:

https://kamailio.org/docs/modules/5.0.x/modules/exec.html

However, this solution is naive and performs poorly given Kamailio's 
concurrency model. 

Sometimes, calling external scripts is unavoidable. But you mention a curl 
call. Perhaps you should explore the asynchronous HTTP client module instead, 
as it would allow you to do the same thing from within Kamailio route script 
directly, but without an unwieldy Rube Goldberg machine. :-)

 https://kamailio.org/docs/modules/5.0.x/modules/http_async_client.html

-- Alex

> On Jun 28, 2017, at 1:03 PM, Anuradha Selvarajan 
>  wrote:
> 
> Hello,
>  
> I am using fork.cfg file and I want to call a shell script (which has curl 
> commands extracting value from database and returns the value) and use the 
> value in the fork.cfg. How can I do it?
>  
> Appreciate your help!
>  
> Thanksm
> Anu
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Question regarding calling a shell script from kamailio

2017-06-29 Thread Anuradha Selvarajan
Hello,

I am using fork.cfg file and I want to call a shell script (which has curl 
commands extracting value from database and returns the value) and use the 
value in the fork.cfg. How can I do it?

Appreciate your help!

Thanksm
Anu
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users