On 8/4/2015 4:51 AM, Olle E. Johansson wrote:

On 04 Aug 2015, at 13:14, Chad <ccolu...@hotmail.com> wrote:

Hi list,
I need a little help, I am a business owner trying to get Kamailio up and 
running as a SIP load balancer.
I hired a Kamailio consultant to help me do so, but Kamailio is not working and 
I am getting conflicting information.

My Kamailio consultant and my VOIP provider are telling me 2 different things 
and I don't know which one is right.

Kamailio sends SIP traffic to the VOIP provider with 2 VIA headers like this 
(in this order):
Via: SIP/2.0/UDP 
10.10.10.254;branch=z9hG4bK7291.6a0bbd2e8fd639a47d7d2de606779e47.0.
Via: SIP/2.0/UDP 
209.170.201.25:5060;received=10.10.10.102;branch=z9hG4bK742dc03d;rport=5060.

The VOIP provider says that is incorrect because they are supposed to reply 
back to the topmost VIA header so they reply to the 10.10.10.254 IP (which is 
not public) and the call ends.
The VOIP provider says Kamailio should send the VIA headers like this instead:
Via: SIP/2.0/UDP 
209.170.201.25:5060;received=10.10.10.102;branch=z9hG4bK742dc03d;rport=5060.
Via: SIP/2.0/UDP 
10.10.10.254;branch=z9hG4bK7291.6a0bbd2e8fd639a47d7d2de606779e47.0.

My Kamailio consultant says the way we are sending it is right and that the 
VOIP provider is processing the call incorrectly.

I read that the SIP proxy is supposed to remove the internal header from the 
1st example above based on this RFC:
https://tools.ietf.org/html/rfc3261#section-16.7
Item: 3. Via
"The proxy removes the topmost Via header field value from the response.”
That applies to response forwarding.

If that applies to this situation (which I don't know if it does) then Kamailio 
should be removing the 10.10.10.254 VIA line and only sending 1 VIA header like 
this:
Via: SIP/2.0/UDP 
209.170.201.25:5060;received=10.10.10.102;branch=z9hG4bK742dc03d;rport=5060.

Which would sort of make the VOIP provider right in that the topmost VIA line 
would then be the external IP, but how they said to fix it (reversing the VIA 
lines) is wrong.
The response is sent to the topmost, leftmost VIA header value. The proxy adds 
it’s own address on TOP of other values when forwarding a request. That’s the 
address used for sending responses.
See section 18.2.2 “Sending Responses” of RFC 3261.

What I don’t understand is how the via’s got in a different order. Kamailio 
does this right by default. It’s a very basic operation, but could be something 
related to the handling of public/private IP addresses that got wrong.

/O
_______________________________________________
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


Thank you all for your help, we did get it figured out.
I am excited about moving to a VOIP cluster with Kamailio.

--
^C

_______________________________________________
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

Reply via email to