[OpenSIPS-Users] return of cpl_script
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Feb 6 19:03:54 CET 2013
If you still get an "1", it means you did not properly install the
modules after update - compile ? install ? restart ?
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 02/06/2013 01:31 PM, Mehdi BOUDOU wrote:
> Hello Bogdan,
>
> Thanks for the patch :)
>
> I applied it => i changed the return code, after i rebuild the module
> makefile and rebuild the opensips makefile without success.
> The return code sent is 1 :S
>
> Is my procedure correct ? Why the return code is always 1 ?
>
> Thanks in advance.
>
> BR
>
> Mehdi
>
>
> 2013/1/25 Bogdan-Andrei Iancu <bogdan at opensips.org
> <mailto:bogdan at opensips.org>>
>
> Hi Mehdi,
>
> 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:
> cpl_run_script();
> switch ($retcode) {
> case 1:
> break;
> case 2:
> #no script
> break;
> default:
> # error
> exit;
> }
>
>
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> On 01/24/2013 07:41 PM, Mehdi BOUDOU wrote:
>> hello,
>>
>> I'm actually using opensip 1.5 with cpl module.
>>
>> I would like to redirect the SIP packets if there is no cpl
>> script to execute for the client in database.
>>
>> Can i use a special return of cpl_run_script ? or is there
>> another way to do that ?
>>
>> is the send function ( send(destination [, headers])) the best
>> way to redirect SIP packets ?
>>
>> Thanks in advance,
>>
>> Best Regards
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130206/0af33f52/attachment-0001.htm>
More information about the Users
mailing list