How to get/control the source port used for TCP/TLS transport

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 26, 2008 at 11:49 PM, Klaus Darilion <
klaus.mailinglists at pernau.at> wrote:

> Hi!
>
> Actually the Via header of the response of the REGISTER could be used to
> get the received IP and rport and then use this as contact in all requests.
>
> Benny, have'nt you recently added such a feature?
>
>
Yes, that's exactly what pjsip will do, and this feature should be available
in 0.9. But as you said, it requires the client to register first to the
server, and I'm not sure if this is the case by just looking at the
SUBSCRIBE request.

Cheers
 Benny


> regards
> klaus
>
> Ivan Genov wrote:
> > Hi,
> > I am using TLS connection to connect to an OpenSER server. The problem I
> experience is that the server establishes a second TLS connection to the
> client when it needs to send a request to the client (a NOTIFY packet). It
> looks like the issue is because the client originates the TCP connection
> from one port but advertises a different port in the Contact header, as can
> be seen from the packet below:
> > -----------------------------------------------------------------
> > SUBSCRIBE sips:ivan at 10.0.5.5 <sips%3Aivan at 10.0.5.5> SIP/2.0
> > Via: SIP/2.0/tls 10.0.5.112:2013
> ;rport;branch=z9hG4bKPj6a7bed4a838c416fa70d57c85ef98e21
> > Max-Forwards: 70
> > From: "Ivan" <sips:ivan@10.0.5.112 <sips%3Aivan at 10.0.5.112>
> >;tag=8e8c2497ec8e4edeb3fc031ad861698d
> > To: sips:ivan at 10.0.5.5 <sips%3Aivan at 10.0.5.5>
> > Contact: "Ivan" <sips:ivan at 10.0.5.112:5061;transport=TLS>
> > Call-ID: 41d9d9772e89462ca9e71e225d03f596
> > CSeq: 18467 SUBSCRIBE
> > Event: custom-event
> > Expires: 120
> > Accept: text/plain
> > Allow-Events: presence, refer, custom-event
> > Content-Type: text/plain
> > Content-Length: 6
> >
> > 010203
> > -----------------------------------------------------------------
> > This makes the server not reuse client's TLS connection because
> 10.0.5.112:5061 is different endpoint than 10.0.5.112:2013. As a result
> the server is establishing a connecion to 10.0.5.112:5061.
> > So what I need to do is ensure that the port advertised in the Contact
> header is the same as the one being used as source TCP port.
> > Is it possible PJSIP be configured to automatically put the source TCP
> port in the Contact header somehow, or maybe if the application can obtain
> the source port which is _going to_ be used before sending the packet, or if
> the application can control the source TCP port used and provide/set it to
> PJSIP?
> > Thanks,
> > Ivan.
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080827/bffcc912/attachment.html 


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux