I am having an issue with 1.5.4 where force_send_socket() isn't behaving as I would expect.
I have an LCR scenario where depending on which gateway I am sending to, I send from a different socket.
It appears that calling force_send_socket from failure_route has no affect on the routing. In my initial route block I call force_send_socket(X.X.X.180:5060). In my failure_route I am calling force_send_socket(X.X.X.179:5060), yet after calling the subsequent time, my sip trace and tcpdump are clearly showing kamailio is still sending from X.X.X.180:5060.
I have added a lot of debug lines, so I am 100% sure the second call to force_send_socket is happening.
Am I misusing this module in some way?
Geoffrey Mina writes:
I have added a lot of debug lines, so I am 100% sure the second call to force_send_socket is happening.
try calling force_send_socket in branch route (after setting t_on_branch) in failure route.
Am I misusing this module in some way?
lcr module has nothing to do with send socket.
-- juha
IIRC force_send_socket operates on "branch[0]". Now it depends how the the new branch is added, e.g. if send--socket properties are copied into new branch or not. IRRC there were some changes either in 1.5 or 3.0.
You can also access a branch's aprameter directly: http://sip-router.org/wiki/cookbooks/pseudo-variables/devel#branch_attribute...
or try Juha's suggestion with branch_route
regards klaus
Am 28.06.2010 19:08, schrieb Geoffrey Mina:
I am having an issue with 1.5.4 where force_send_socket() isn't behaving as I would expect.
I have an LCR scenario where depending on which gateway I am sending to, I send from a different socket.
It appears that calling force_send_socket from failure_route has no affect on the routing. In my initial route block I call force_send_socket(X.X.X.180:5060). In my failure_route I am calling force_send_socket(X.X.X.179:5060), yet after calling the subsequent time, my sip trace and tcpdump are clearly showing kamailio is still sending from X.X.X.180:5060.
I have added a lot of debug lines, so I am 100% sure the second call to force_send_socket is happening.
Am I misusing this module in some way?
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
Yeah, Juha's suggestion worked perfectly. As soon as I moved the force_send_socket() call into branch_route everything started working.
Thanks.
On Tue, Jun 29, 2010 at 5:20 AM, Klaus Darilion < klaus.mailinglists@pernau.at> wrote:
IIRC force_send_socket operates on "branch[0]". Now it depends how the the new branch is added, e.g. if send--socket properties are copied into new branch or not. IRRC there were some changes either in 1.5 or 3.0.
You can also access a branch's aprameter directly:
http://sip-router.org/wiki/cookbooks/pseudo-variables/devel#branch_attribute...
or try Juha's suggestion with branch_route
regards klaus
Am 28.06.2010 19:08, schrieb Geoffrey Mina:
I am having an issue with 1.5.4 where force_send_socket() isn't behaving as I would expect.
I have an LCR scenario where depending on which gateway I am sending to, I send from a different socket.
It appears that calling force_send_socket from failure_route has no affect on the routing. In my initial route block I call force_send_socket(X.X.X.180:5060). In my failure_route I am calling force_send_socket(X.X.X.179:5060), yet after calling the subsequent time, my sip trace and tcpdump are clearly showing kamailio is still sending from X.X.X.180:5060.
I have added a lot of debug lines, so I am 100% sure the second call to force_send_socket is happening.
Am I misusing this module in some way?
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
2010/6/30 Ernest Mavrel ernest.mavrel@novatel.si
How can I move force_send_socket() call into branch_route?
Use t_on_branch("N") before t_relay(); so after that each branch would run into branch_route[N] in which you should invoke force_send_socket().
-- Iñaki Baz Castillo ibc@aliax.net
############################## ########################################## # Failure route 'pstn-failover' ######################################################################## failure_route[1] {
xlog("L_INFO", "Failure route for PSTN entered - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); route(16);
if(!next_gw()) {
xlog("L_ERR", "Failed to select next PSTN gateway - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); route(5); exit; } t_on_failure("1"); t_on_branch("1"); route(7); }
branch_route[1]{ switch($rd) { case "10.10.10.2": force_send_socket(udp:10.10.10.1:5060); case "10.10.10.4": force_send_socket(udp:10.10.10.3:5060); case "10.10.10.6": force_send_socket(udp:10.10.10.5:5060); case "10.10.10.8": force_send_socket(udp:10.10.10.7:5060); break; }
}
On Wed, Jun 30, 2010 at 4:14 AM, Iñaki Baz Castillo ibc@aliax.net wrote:
2010/6/30 Ernest Mavrel ernest.mavrel@novatel.si
How can I move force_send_socket() call into branch_route?
Use t_on_branch("N") before t_relay(); so after that each branch would run into branch_route[N] in which you should invoke force_send_socket().
-- Iñaki Baz Castillo ibc@aliax.net
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