Hello Daniel,<br><br>Yes, I can support this. <br>More so, my voip application is purely written in python , so I'm interested to add a native api to work with.<br><br><br><div class="gmail_quote">2012/12/4 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
app_python didn't not have really a maintainer in the past years. If
nobody from existing developers is willing to take over the
maintenance/development of the module, then you can join and take
care of it, committing directly. You will have to do it for at least
one year.<br>
<br>
Let us know if it would interest you.<br>
<br>
Cheers,<br>
Daniel<div><div class="h5"><br>
<br>
<div>On 12/4/12 6:14 PM, Konstantin M.
wrote:<br>
</div>
<blockquote type="cite">Hello,<br>
<br>
Added Module Properties:<br>
Ranks:<br>
PROC_MAIN - Main ser process<br>
PROC_TIMER - Timer attendant process<br>
PROC_RPC - RPC type process<br>
PROC_FIFO - FIFO attendant process<br>
PROC_TCP_MAIN - TCP main process<br>
PROC_UNIXSOCK - Unix socket server<br>
PROC_ATTENDANT - main "attendant" process<br>
PROC_INIT - special rank, the context is the main ser<br>
process, but this is guaranteed to
be executed<br>
before any process is forked, so it
can be used<br>
to setup shared variables that
depend on some<br>
after mod_init available
information (e.g.<br>
total number of processes).<br>
<br>
@warning child_init(PROC_MAIN) is
again called<br>
in the same process (main), but latter<br>
(before tcp), so make sure you
don't init things<br>
twice, bot in PROC_MAIN and
PROC_INT<br>
<br>
PROC_NOCHLDINIT - no child init functions will be called
if this rank is used in fork_process()<br>
PROC_SIPINIT - First SIP worker - some modules do
special processing in this child, like loading db data<br>
PROC_SIPRPC - Used to init RPC worker as SIP commands
handler. Don't do any special processing in the<br>
child init with this rank - just bare child
initialization<br>
PROC_MIN - Minimum process rank<br>
<br>
Diff is attached.<br>
<br>
<div class="gmail_quote">2012/12/4 Ovidiu Sas <span dir="ltr"><<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Second
patch applied.<br>
<br>
Thanks,<br>
Ovidiu<br>
<div>
<div><br>
On Mon, Dec 3, 2012 at 7:22 PM, Konstantin M. <<a href="mailto:evilzluk@gmail.com" target="_blank">evilzluk@gmail.com</a>>
wrote:<br>
> Sure, done, see 02_better_printing_stacktrace.diff
attached.<br>
><br>
><br>
> 2012/12/4 Ovidiu Sas <<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>><br>
>><br>
>> Hello Konstantin,<br>
>><br>
>> I applied the first patch. Thank you.<br>
>> For the second patch, I would like to use the
internal kamailio memory<br>
>> manager: pkg_malloc and pkg_realloc instead of
calloc and realloc.<br>
>> Could you please rework the second patch and
test?<br>
>><br>
>> Thanks,<br>
>> Ovidiu<br>
>><br>
>> On Mon, Dec 3, 2012 at 6:14 PM, Konstantin M.
<<a href="mailto:evilzluk@gmail.com" target="_blank">evilzluk@gmail.com</a>>
wrote:<br>
>> > Hello Ovidiu Sas,<br>
>> > Sure, I just removed this, see
01_expand_log_facilities.diff attached.<br>
>> > Also I changed a printing of stack trace
(see<br>
>> > 02_better_printing_stacktrace.diff)
according to standard python's<br>
>> > traceback.<br>
>> ><br>
>> > Example of old printing:<br>
>> > 0(4842) ERROR: app_python
[python_support.c:38]: python_exec2:<br>
>> > Unhandled<br>
>> > exception in the Python code:<br>
>> > 0(4842) ERROR: app_python
[python_support.c:78]: Traceback (most<br>
>> > recent call last):<br>
>> > 0(4842) ERROR: app_python
[python_support.c:78]: File<br>
>> > "/opt/kamailio/python/Kam-Loggers.py", line
34, in BuggyCode<br>
>> > return self.BuggyCode_lvl2(a)<br>
>> > 0(4842) ERROR: app_python
[python_support.c:78]: File<br>
>> > "/opt/kamailio/python/Kam-Loggers.py", line
31, in BuggyCode_lvl2<br>
>> > return self.BuggyCode_lvl3(a)<br>
>> > 0(4842) ERROR: app_python
[python_support.c:78]: File<br>
>> > "/opt/kamailio/python/Kam-Loggers.py", line
28, in BuggyCode_lvl3<br>
>> > return self.BuggyCode_lvl4(a)<br>
>> > 0(4842) ERROR: app_python
[python_support.c:78]: File<br>
>> > "/opt/kamailio/python/Kam-Loggers.py", line
25, in BuggyCode_lvl4<br>
>> > return self.BuggyCode_lvl5(a)<br>
>> > 0(4842) ERROR: app_python
[python_support.c:78]: File<br>
>> > "/opt/kamailio/python/Kam-Loggers.py", line
22, in BuggyCode_lvl5<br>
>> > a / 0<br>
>> > 0(4842) ERROR: app_python
[python_support.c:78]: TypeError:<br>
>> > unsupported operand type(s) for /:
'Router.msg' and 'int'<br>
>> ><br>
>> ><br>
>> > Example of new printing:<br>
>> > 0(4753) ERROR: app_python
[python_support.c:95]: python_exec2:<br>
>> > Unhandled<br>
>> > exception in the Python code:<br>
>> > Traceback (most recent call last):<br>
>> > File
"/opt/kamailio/python/Kam-Loggers.py", line 34, in
BuggyCode<br>
>> > return self.BuggyCode_lvl2(a)<br>
>> > File
"/opt/kamailio/python/Kam-Loggers.py", line 31, in
BuggyCode_lvl2<br>
>> > return self.BuggyCode_lvl3(a)<br>
>> > File
"/opt/kamailio/python/Kam-Loggers.py", line 28, in
BuggyCode_lvl3<br>
>> > return self.BuggyCode_lvl4(a)<br>
>> > File
"/opt/kamailio/python/Kam-Loggers.py", line 25, in
BuggyCode_lvl4<br>
>> > return self.BuggyCode_lvl5(a)<br>
>> > File
"/opt/kamailio/python/Kam-Loggers.py", line 22, in
BuggyCode_lvl5<br>
>> > a / 0<br>
>> > TypeError: unsupported operand type(s) for
/: 'Router.msg' and 'int'<br>
>> ><br>
>> ><br>
>> ><br>
>> > 2012/12/4 Ovidiu Sas <<a href="mailto:osas@voipembedded.com" target="_blank">osas@voipembedded.com</a>><br>
>> >><br>
>> >> Hello Konstantin,<br>
>> >><br>
>> >> I would be happy to commit your patch,
but I would like to ask you to<br>
>> >> remove, for now, the conditional FLAVOUR
compilation.<br>
>> >> You could leave the module name as
"Router" for now.<br>
>> >> Can you generate an new patch file
without FLAVOUR?<br>
>> >><br>
>> >> Regards,<br>
>> >> Ovidiu Sas<br>
>> >><br>
>> >> On Mon, Dec 3, 2012 at 2:50 PM,
Konstantin M. <<a href="mailto:evilzluk@gmail.com" target="_blank">evilzluk@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > Hi Dev,<br>
>> >> ><br>
>> >> > Modified app_python:<br>
>> >> ><br>
>> >> > 1) Added FLAVOUR support<br>
>> >> > 2) Added python objects:<br>
>> >> ><br>
>> >> > Module Properties:<br>
>> >> > Log Levels:<br>
>> >> > L_ALERT<br>
>> >> > L_BUG<br>
>> >> > L_CRIT2<br>
>> >> > L_CRIT<br>
>> >> > L_ERR<br>
>> >> > L_WARN<br>
>> >> > L_NOTICE<br>
>> >> > L_INFO<br>
>> >> > L_DBG<br>
>> >> ><br>
>> >> > Log Facilities:<br>
>> >> > DEFAULT_FACILITY<br>
>> >> ><br>
>> >> > Module Methods:<br>
>> >> > LM_GEN1(self, int log_level,
str msg)<br>
>> >> > LM_GEN2(self, int
log_facility, int log_level, str msg)<br>
>> >> > LM_ALERT(self, str msg)<br>
>> >> > LM_CRIT(self, str msg)<br>
>> >> > LM_ERR(self, str msg)<br>
>> >> > LM_WARN(self, str msg)<br>
>> >> > LM_NOTICE(self, str msg)<br>
>> >> > LM_INFO(self, str msg)<br>
>> >> > LM_DBG(self, str msg)<br>
>> >> ><br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
sr-dev mailing list
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
</blockquote>
<br>
</div></div><span class="HOEnZb"><font color="#888888"><pre cols="72">--
Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
</font></span></div>
</blockquote></div><br>