[OpenSIPS-Users] perl script abnormal termination handling

Ali Pey alipey at gmail.com
Fri Nov 8 20:13:48 CET 2013


Don't do die in the perl script. Try return 0 or 1.

Regards,
Ali Pey


On Fri, Nov 8, 2013 at 10:32 AM, Jeff Pyle <jpyle at fidelityvoice.com> wrote:

> Hello,
>
> I run a perl script from an Opensips 1.6 config.  I'm having trouble
> handling a perl "die" condition in the Opensips script.  For example:
>
> if !(perl_exec("dietest1")) {
>     xlog("L_INFO", "Perl script failed.\n"
> } else {
>     xlog("L_INFO", "Perl script succeeded.\n"
> }
>
> where test1.pl ends with:
>     die "Perl script dying"
>
> When the perl script fails, I see only:
>
> ERROR:core:XS_OpenSIPS__Message_log: perl error: Perl script dying at
> /etc/opensips/perl/perltest.pl line 165.#012
>
> I never see the "Perl script failed" xlog from the script.  It seems that
> a dying perl script stops processing on the current message.  Is there a
> way around this, to handle the perl error?
>
>
> Regards,
> Jeff
>
>
>
> _______________________________________________
> Users mailing list
> 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/20131108/bd79a6ca/attachment.htm>


More information about the Users mailing list