<!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>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 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 01/24/2013 07:41 PM, Mehdi BOUDOU wrote:
<blockquote
cite="mid:CAByOdx9r4=RoEnHORXKjE+4HF1+gNBR9bV7NwVSFtCk=6oO1Sg@mail.gmail.com"
type="cite">
<div dir="ltr">hello,
<div><br>
<div>I'm actually using opensip 1.5 with cpl module.<br>
<div><br>
</div>
<div style="">I would like to redirect the SIP packets if
there is no cpl script to execute for the client in
database.</div>
<div style=""><br>
</div>
<div style="">Can i use a special return of <span
style="color: rgb(0, 0, 0); font-family:
Helvetica,Arial;">cpl_run_script ? or is there another
way to do that ?</span></div>
<div style=""><span style="color: rgb(0, 0, 0); font-family:
Helvetica,Arial;"><br>
</span></div>
<div style=""><span style="color: rgb(0, 0, 0); font-family:
Helvetica,Arial;">is the send function ( </span><span
style="color: rgb(24, 86, 98); font-family: 'Trebuchet
MS',sans-serif,Verdana,Arial; font-size: 13.3333px;
line-height: 21.5833px;">send(destination [, headers]))
the best way to redirect SIP packets ?</span></div>
<div style=""><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 style=""><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 style=""><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 style=""><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 style="margin-top: 1em; margin-bottom: 0.6em; color:
rgb(24, 86, 98); font-family: 'Trebuchet
MS',sans-serif,Verdana,Arial; font-size: 13.3333px;
line-height: 21.5833px;"><br>
</h4>
</div>
</div>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>