Re: [SR-Users] Determining next hop for any SIP message

2018-05-07 Thread Henning Westerholt
Am Freitag, 4. Mai 2018, 16:25:06 CEST schrieb George Diamantopoulos: > Just one last attempt at clearing the following points, if someone feels > confident enough to answer: > > * Does $nh(d) work when the Route header enforces the next-hop in an > in-dialog request? > * Is it safe to determine n

Re: [SR-Users] Determining next hop for any SIP message

2018-05-04 Thread George Diamantopoulos
Hello all, Just one last attempt at clearing the following points, if someone feels confident enough to answer: * Does $nh(d) work when the Route header enforces the next-hop in an in-dialog request? * Is it safe to determine next hop for responses by looking at the first Via header only, or are

Re: [SR-Users] Determining next hop for any SIP message

2018-04-13 Thread George Diamantopoulos
I guess you're right... But if it is possible to do this with different means, I would prefer it... I think I only miss the following points: * Does $nh(d) work when the Route header enforces the next-hop in an in-dialog request? * Is it safe to determine next hop for responses by looking at the

Re: [SR-Users] Determining next hop for any SIP message

2018-04-13 Thread Alex Balashov
That's probably true of any Kamailio functionality. :-) But point taken. On April 13, 2018 2:09:10 PM EDT, George Diamantopoulos wrote: >Well, the "SIP routing with Kamailio" book by Daniel and Elena states: > >"Defining the onsend_route should be done only if really needed, >because it >is exe

Re: [SR-Users] Determining next hop for any SIP message

2018-04-13 Thread George Diamantopoulos
Well, the "SIP routing with Kamailio" book by Daniel and Elena states: "Defining the onsend_route should be done only if really needed, because it is executed for each request sent out, excluding the retransmissions." Also, it similarly won't work for responses, only for requests... On 13 April

Re: [SR-Users] Determining next hop for any SIP message

2018-04-13 Thread Alex Balashov
"A simpler way to do it, of course, would be to use the onsend_route, but that would most likely introduce an unnecessary overhead for all routed messages." What informs that assumption? I suppose there is a measurable nonzero performance penalty to anything, but it should be negligible. -- A

[SR-Users] Determining next hop for any SIP message

2018-04-13 Thread George Diamantopoulos
Hello all, I've been trying to figure out a cleaner way to determine the next hop for a SIP message, mainly for use within the NATMANAGE route for multi-homed kamailio instances (with three or more network interfaces on the kamailio host). So far I have achieved this with a series of nested ifs,