<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>If you still get an "1", it means you did not properly install
the modules after update - compile ? install ? restart ?<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<br>
On 02/06/2013 01:31 PM, Mehdi BOUDOU wrote:
<blockquote
cite="mid:CAByOdx83PdSMa3=YG3mf0jRo4xdj4rWTM5NdQAacGGXkS3Rpeg@mail.gmail.com"
type="cite">
<div dir="ltr">Hello Bogdan,
<div><br>
</div>
<div style="">Thanks for the patch :)</div>
<div style=""><br>
</div>
<div style="">I applied it => i changed the return code,
after i rebuild the module makefile and rebuild the opensips
makefile without success.</div>
<div style="">The return code sent is 1 :S</div>
<div style=""><br>
</div>
<div style="">Is my procedure correct ? Why the return code is
always 1 ?</div>
<div style=""><br>
</div>
<div style="">Thanks in advance.</div>
<div style=""><br>
</div>
<div style="">
BR</div>
<div style=""><br>
</div>
<div style="">Mehdi</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2013/1/25 Bogdan-Andrei Iancu <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> <tt>Hi Mehdi,<br>
<br>
Indeed, there is no difference in the return code - find
attached a small patch witch will make cpl to return "2"
if the script is not found. You can test is via $retcode
variable like:<br>
cpl_run_script();<br>
</tt><tt>switch ($retcode) {<br>
case 1:<br>
break;<br>
case 2:<br>
#no script<br>
break;<br>
default:<br>
# error<br>
exit;<br>
}<br>
</tt><tt><br>
<br>
<br>
Regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<div>
<div class="h5"> <br>
On 01/24/2013 07:41 PM, Mehdi BOUDOU wrote: </div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">hello,
<div><br>
<div>I'm actually using opensip 1.5 with cpl
module.<br>
<div><br>
</div>
<div>I would like to redirect the SIP packets
if there is no cpl script to execute for the
client in database.</div>
<div><br>
</div>
<div>Can i use a special return of <span
style="font-family: Helvetica,Arial;">cpl_run_script
? or is there another way to do that ?</span></div>
<div><span style="font-family:
Helvetica,Arial;"><br>
</span></div>
<div><span style="font-family:
Helvetica,Arial;">is the send function ( </span><span>send(destination
[, headers])) the best way to redirect SIP
packets ?</span></div>
<div><span style="color: rgb(24, 86, 98);
font-family: 'Trebuchet
MS',sans-serif,Verdana,Arial; font-size:
13.3333px; line-height: 21.5833px;"><br>
</span></div>
<div><span style="color: rgb(24, 86, 98);
font-family: 'Trebuchet
MS',sans-serif,Verdana,Arial; font-size:
13.3333px; line-height: 21.5833px;">Thanks
in advance,</span></div>
<div><span style="color: rgb(24, 86, 98);
font-family: 'Trebuchet
MS',sans-serif,Verdana,Arial; font-size:
13.3333px; line-height: 21.5833px;"><br>
</span></div>
<div><span style="color: rgb(24, 86, 98);
font-family: 'Trebuchet
MS',sans-serif,Verdana,Arial; font-size:
13.3333px; line-height: 21.5833px;">Best
Regards</span></div>
<h4><br>
</h4>
</div>
</div>
</div>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
</body>
</html>