[SR-Users] app_python rewrite_ruri - BUG: do_action bad set*()

Konstantin M. evilzluk at gmail.com
Fri Feb 15 18:59:03 CET 2013


A quick workaround - open file 'app_python/python_msgobj.c' with any text
editor, find function 'msg_rewrite_ruri' and
change a line (inside this function):
from
    act.val[0].type = STR_ST;
to:
    act.val[0].type = STRING_ST;

then recompile, it should work.

I will commit to git for v4 in a some min.

2013/2/15 V Tone <vtone001 at gmail.com>

> Thanks Konstantin, much appreciated. I am using 3.x... I'll jump up to 4
> and wait your feedback.
>
>
> On 15 February 2013 17:39, Konstantin M. <evilzluk at gmail.com> wrote:
>
>> Hello,
>>
>> Ok, bug is confirmed.
>> I will fix it a soon.
>>
>> Can I ask you - are you using now v4 or still using 3.x ?
>>
>>
>>
>> 2013/2/15 V Tone <vtone001 at gmail.com>
>>
>>> Hi,
>>>
>>> I'm having problems getting started with the app_python module. I'm
>>> getting the following in the logs:
>>>
>>>  5(8890) : <core> [action.c:785]: BUG: do_action: bad set*() type 14
>>>  5(8890) ERROR: <core> [action.c:1568]: run action error at: :0
>>>  5(8890) ERROR: app_python [python_msgobj.c:115]: Error in do_action
>>>  5(8890) ERROR: app_python [python_support.c:38]: python_exec2:
>>> Unhandled exception in the Python code:
>>>  5(8890) ERROR: app_python [python_support.c:78]:  RuntimeError: Error
>>> in do_action
>>>
>>> My Python module is very basic:
>>>
>>> class Router(object):
>>>         def child_init(self, child_id):
>>>                 return 0
>>>
>>>         def route(self, msg):
>>>                 msg.rewrite_ruri('sip:1000 at 1.2.3.4:5060')
>>>                 return 0
>>>
>>> def mod_init():
>>>         instance = Router()
>>>         return instance
>>>
>>> I've tested this in Kamailio 3.2 and 3.3. Can someone point me to what
>>> I'm doing wrong?
>>>
>>> Many thanks in advance,
>>>
>>> vtone
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130215/c7aa5312/attachment-0001.htm>


More information about the sr-users mailing list