[sr-dev] Is there a sense in calling run_onsend() after the msg_send() function?

Lucian Balaceanu lucian.balaceanu at 1and1.ro
Wed Sep 17 18:09:36 CEST 2014


Hi Daniel,

Please forgive me for my delay in responding to your mail.
Please find attached a second version of the onsend_route_reply patch 
(which again has some problems). As per your previous indications I did 
the following:

*Issue1*
> From performances point of view, there can be added a config parameter 
> to enable running of onsend_route for replies:
>
> onsend_route_reply = 0|1

Following 
http://www.asipto.com/pub/kamailio-devel-guide/#c08add_parameters I have 
tried to add onsend_route_reply parameter. The code compiles, but when 
trying to start kamailio with this parameter inside, the parsing fails 
with syntax errors signaling:

/ 0(1321) :<core> [cfg.y:3423]: yyerror_at(): parse error in config file 
kamailio-basic.cfg.4.1, from line 107, column 1 to line 108, column 0: 
syntax error
  0(1321) : <core> [cfg.y:3423]: yyerror_at(): parse error in config 
file kamailio-basic.cfg.4.1, from line 107, column 1 to line 108, column 0:
ERROR: bad config file (2 errors)/

*Issue2*
> #define onsend_enabled(rtype) 
> (onsend_rt.rlist[DEFAULT_RT]?((rtype==SIP_REPLY)?onsend_route_reply:1):0)
That is to say you see it best to take the chek for 
onsend_rt.list[DEFAULT_RT] from inside run_onsend() function and call 
this onsend_enabled(...) before the run_onsend()?

*Issue3*
> On the other hand, is onsend_route also executed for local requests? I 
> had in mind it is only for received requests that are forwarded ... 
> Iirc, on onsend_route, the sip message is the one received, the 
> outgoing content being accessible via $snd(buf).
>
I agree with you with taking out the locally generated requests and only 
left the run_onsend call in do_forward_reply function (inside forward.c).
Could you point me to the reply relaying function that is called for 
state-full processing?

Thank you and sorry again for my late answer,
Lucian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20140917/4ee5718f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: onsend_route_reply.patch
Type: text/x-patch
Size: 11220 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20140917/4ee5718f/attachment.bin>


More information about the sr-dev mailing list