[OpenSIPS-Users] $du not expanded/evaluated?
Mundkowsky, Robert
rmundkowsky at ets.org
Wed Apr 12 10:10:46 EDT 2017
Wow, that is really bizarre. I don't think I have ever see any languages where variable expansion is based on which function they are passed to.
Anyways, I think your documentation needs to be updated, I don't see anything in your document stating expansion does not take place for the extra_args in python_exec(method_name [, extra_args]). Also would be nice if you noted only Python 2 is supported
One more question, is it not possible to run threads in the python script called? I am getting an odd error when I try to run a thread, but that script works fine when called for command line.
Robert Mundkowsky
-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
Sent: Wednesday, April 12, 2017 9:50 AM
To: OpenSIPS users mailling list <users at lists.opensips.org>; Mundkowsky, Robert <rmundkowsky at ets.org>
Subject: Re: [OpenSIPS-Users] $du not expanded/evaluated?
Hi Robert,
According to the docs, the second parameter does not expands possible variables.
Have you check if the dst URI is accessible via the SIPMsg class ?
http://www.opensips.org/html/docs/modules/2.2.x/python.html#idp54288
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
OpenSIPS Summit May 2017 Amsterdam
http://www.opensips.org/events/Summit-2017Amsterdam.html
On 04/11/2017 08:04 PM, robert wrote:
> I am using the following in the opensips.cfg file.
>
> $du correctly evaluates to a real value (e.g. "sip:XX.XX.XX.XX:5060" )
> in the xlog, but inside the python_exec, it does not.
>
> On the python side the incrementMissedCallsCount function gets the
> value "$du" rather than "sip:XX.XX.XX.XX:5060"
>
>
> code:
>
> xlog("REPORT: LB destination $du failed with code $T_reply_code\n");
> python_exec('incrementMissedCallsCount',"$du");
>
>
>
>
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/du-not-expanded-
> evaluated-tp7606924.html Sent from the OpenSIPS - Users mailing list
> archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
________________________________
This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.
Thank you for your compliance.
________________________________
More information about the Users
mailing list