Leo,

Thanks for your email.

Just to check I'm understanding correctly,

*         Sprout is sending an INVITE to an AS

*         Sprout sends from its private IP address, but this is NAT-ed to a 
public address before it reaches the AS

*         Sprout includes its private IP address in the Via header

*         when the AS comes to send a response, it tries to send back to the IP 
address in this Via header, which fails (because it's private and so not 
routable).

Is that right?

Following RFC 3621 section 18.2.1, I think the right way for this to work is

*         when the AS receives the INVITE, for it to add a "received" parameter 
to the Via header containing the IP address that it saw the request coming from

*         when the AS wants to reply to the INVITE, for it to use this IP 
address in preference to the original IP address in the Via header.

To borrow an example from RFC 3261 (emphasis mine):

   Consider a request received by the server transport which looks like,
   in part:

      INVITE sip:[email protected] SIP/2.0
      Via: SIP/2.0/UDP bobspc.biloxi.com:5060

   The request is received with a source IP address of 192.0.2.4.
   Before passing the request up, the transport adds a "received"
   parameter, so that the request would look like, in part:

      INVITE sip:[email protected] SIP/2.0
      Via: SIP/2.0/UDP bobspc.biloxi.com:5060;received=192.0.2.4

Do you agree?  And do you know why your AS is not behaving in this way?

I don't believe there's currently any option to change the IP address included 
in the Via header used by Sprout (without also changing the IP address that 
Sprout binds to), although it would probably be possible to add.

I hope that helps - please let me know if you have any further questions.

Thanks,

Matt

From: Clearwater [mailto:[email protected]] On 
Behalf Of Leo Tang (leotang)
Sent: 22 June 2016 10:08
To: Chris Elford (projectclearwater.org) <[email protected]>; 
[email protected]
Subject: Re: [Project Clearwater] How to let clearwater sends sip messages to 
its app server with its public ip address

Hi Chris,

Yes. The private ip address 10.0.0.* is listed in the Via header in the INVITE.

Sure. I will sign up the mail list

Leo.

From: "Chris Elford (projectclearwater.org)" 
<[email protected]<mailto:[email protected]>>
Date: Wednesday, June 22, 2016 at 4:31 PM
To: leo tang <[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>"
 
<[email protected]<mailto:[email protected]>>
Subject: RE: [Project Clearwater] How to let clearwater sends sip messages to 
its app server with its public ip address

Hi Leo,

You say that "clearwater sends the invite message with its private ip address 
10.0.0.*." Do you mean that the private IP address is listed in the Via header 
in the INVITE, or that the IP packet was received from the private IP address? 
If you aren't sure, you should be able to find out by taking a packet capture 
on your server e.g. using tcpdump.

Can I suggest that you sign up to the Project Clearwater mailing list? That 
way, your messages won't need to be approved by a moderator, and you can see 
other similar problems that others are having.

Chris

From: Leo Tang (leotang) [mailto:[email protected]]
Sent: 20 June 2016 11:09
To: Chris Elford (projectclearwater.org) 
<[email protected]<mailto:[email protected]>>; 
[email protected]<mailto:[email protected]>
Subject: Re: [Project Clearwater] How to let clearwater sends sip messages to 
its app server with its public ip address

And Yes.  That's the trouble routing back to sprout.

From: leo tang <[email protected]<mailto:[email protected]>>
Date: Monday, June 20, 2016 at 4:31 PM
To: "Chris Elford (projectclearwater.org)" 
<[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>"
 
<[email protected]<mailto:[email protected]>>
Subject: Re: [Project Clearwater] How to let clearwater sends sip messages to 
its app server with its public ip address

Hi Chris,

Thanks so much for your reply.

The sip message flow is something like this: sip_client -> bono -> sprout -> my 
server and then go back.

I installed clearwater on aws so it has a private ip 10.0.0.* and a public ip 
64.*.*.*

When the sip invite message comes in my server, I check with your sip messages 
and found clearwater sends the invite message with its private ip address 
10.0.0.*.

According to sip protocal, I have to reply the sip messages with your private 
ip address. But clearwater refuses my reply.

I tried to send message to sprout with clearwater's public ip 64.*.*.*. And I 
found sprout can receive the messages.

So my question is that is there a way for clearwater to send the sip messages 
with its public ipaddress ?

I found some docs to describe how to configure clearwater multiple networks. 
But it Is very complex as I has only a network interface on my aws clearwater.



From: "Chris Elford (projectclearwater.org)" 
<[email protected]<mailto:[email protected]>>
Date: Monday, June 20, 2016 at 4:18 PM
To: leo tang <[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>"
 
<[email protected]<mailto:[email protected]>>
Subject: RE: [Project Clearwater] How to let clearwater sends sip messages to 
its app server with its public ip address

Hi Leo,

There may be a way to solve your problem, but it would be helpful to know a 
little bit more about what you are trying to do.

Are you seeing the wrong value appear in one of the SIP headers coming from 
Sprout? If so, what symptoms is this causing in your network?

Are you seeing packets come from an unexpected location at the TCP/IP level, 
and having trouble routing back to your Sprout node? In that case, can you 
explain the cloud infrastructure that you are using, as our options are limited 
by what the cloud will allow.

Yours,

Chris

From: Clearwater [mailto:[email protected]] On 
Behalf Of Leo Tang (leotang)
Sent: 16 June 2016 10:35
To: 
[email protected]<mailto:[email protected]>
Subject: [Project Clearwater] How to let clearwater sends sip messages to its 
app server with its public ip address

Hi There.

Is there a simple way to let sprout sends sip messages to its app server with 
its public ip address?

Thanks.
_______________________________________________
Clearwater mailing list
[email protected]
http://lists.projectclearwater.org/mailman/listinfo/clearwater_lists.projectclearwater.org

Reply via email to