<div dir="ltr">Hello,<br><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/18 Victor Torre Antunez <span dir="ltr"><<a href="mailto:victor.torre@stoneworksolutions.net" target="_blank">victor.torre@stoneworksolutions.net</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<br><br>I´m using EXEC Module to execute a HTTP request via curl, to comunicate with another app like this:<br>

<br>    exec_avp("curl --connect-timeout 1 --max-time 2  http://IP_ADDR:PORT/PATH/'$fU'/'$tU'/'$hdr(Call-ID)'", "$avp(s:output)");<br>
<br>Sometimes Kamailio blocks when HTTP server does not response in time, despite the max-time parameter.<br><br>I found this know issue on EXEC module docs:<br>    "There is currently no guarantee that scripts ever return and stop blocking SIP server. (There is kill.c but it is not used along with the current mechanisms based on popen. Besides that kill.c is ugly)."<br>


<br>Does anyone know a better way to communicate Kamailio with a HTTP server without blocks? I will try a python script to send the HTTP request and call it with APP_PYTHON module. Has anyone had blocks with APP_PYTHON module?<br>


<br></div></blockquote><div><br></div><div>You can app_python and urllib2 with block/nonblock socket and timeouts, e.g., you can define 5 seconds of timeout or so.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div dir="ltr"><br>Thanks in advance.<span class="HOEnZb"><font color="#888888"><br clear="all"><br>-- <br><b>Victor</b><br><br>
</font></span></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div></div></div></div>