<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>You can do this using the functions in the exec module:</div><div><br></div><div><a href="https://kamailio.org/docs/modules/5.0.x/modules/exec.html">https://kamailio.org/docs/modules/5.0.x/modules/exec.html</a></div><div><br></div><div>However, this solution is naive and performs poorly given Kamailio's concurrency model. </div><div><br></div><div>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. :-)</div><div><br></div><div> <a href="https://kamailio.org/docs/modules/5.0.x/modules/http_async_client.html">https://kamailio.org/docs/modules/5.0.x/modules/http_async_client.html</a></div><div><br><div>-- Alex</div></div><div><br>On Jun 28, 2017, at 1:03 PM, Anuradha Selvarajan <<a href="mailto:anuradha.selvarajan@ericsson.com">anuradha.selvarajan@ericsson.com</a>> wrote:<br><br></div><blockquote type="cite"><div>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Appreciate your help!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanksm<br>
Anu<o:p></o:p></p>
</div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Kamailio (SER) - Users Mailing List</span><br><span><a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a></span><br><span><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></span><br></div></blockquote></body></html>