<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I&#39;m having problems getting started with the app_python module. I&#39;m getting the following in the logs:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><div> 5(8890) : &lt;core&gt; [action.c:785]: BUG: do_action: bad set*() type 14</div><div> 5(8890) ERROR: &lt;core&gt; [action.c:1568]: run action error at: :0</div>
<div> 5(8890) ERROR: app_python [python_msgobj.c:115]: Error in do_action</div><div> 5(8890) ERROR: app_python [python_support.c:38]: python_exec2: Unhandled exception in the Python code:</div><div> 5(8890) ERROR: app_python [python_support.c:78]: <span style="white-space:pre-wrap">        </span>RuntimeError: Error in do_action</div>
<div><br></div><div>My Python module is very basic:</div><div><br></div><div><div>class Router(object):</div><div>        def child_init(self, child_id):</div><div>                return 0</div><div><br></div><div>        def route(self, msg):</div>
<div>                msg.rewrite_ruri(&#39;<a href="http://sip:1000@1.2.3.4:5060/" target="_blank">sip:1000@1.2.3.4:5060</a>&#39;)</div><div>                return 0</div><div><br></div><div>def mod_init():</div><div>        instance = Router()</div>
<div>        return instance</div><div><br></div><div>I&#39;ve tested this in Kamailio 3.2 and 3.3. Can someone point me to what I&#39;m doing wrong?</div><div><br></div><div>Many thanks in advance,</div><div><br></div><div>
vtone</div></div></div></div>