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

2013-02-15 Thread V Tone
ok I'll try it.

Speaking of workarounds, is there any reason that call_function to core
module functions should not work?

 5(11462) DEBUG:  [sr_module.c:680]: find_export_record: 
not found
 5(11462) ERROR: app_python [python_support.c:132]: python_exec2: Unhandled
exception in the Python code:
RuntimeError: no such function


On 15 February 2013 17:59, Konstantin M.  wrote:

> 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 
>
>> 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.  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 
>>>
>>>> Hi,
>>>>
>>>> I'm having problems getting started with the app_python module. I'm
>>>> getting the following in the logs:
>>>>
>>>>  5(8890) :  [action.c:785]: BUG: do_action: bad set*() type 14
>>>>  5(8890) ERROR:  [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@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@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@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@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@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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


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

2013-02-15 Thread V Tone
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.  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 
>
>> Hi,
>>
>> I'm having problems getting started with the app_python module. I'm
>> getting the following in the logs:
>>
>>  5(8890) :  [action.c:785]: BUG: do_action: bad set*() type 14
>>  5(8890) ERROR:  [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@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@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@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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


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

2013-02-15 Thread V Tone
Hi,

I'm having problems getting started with the app_python module. I'm getting
the following in the logs:

 5(8890) :  [action.c:785]: BUG: do_action: bad set*() type 14
 5(8890) ERROR:  [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@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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users