< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] Multiple TLS connections


I agree with your analysis.  Resip currently tries to re-use
connections based on destination only, so it will not try to open a
new connection if you ask it to send from a different interface.  It
seems changes to resip would be required in order to meet your
requirements.

Scott

On Mon, Feb 2, 2009 at 9:39 AM, Jean Visagie <jean.visagie@xxxxxxxxx> wrote:
> Scott,
>
> I use the following:
>
> //Override via
> m_userProfile->setFixedTransportPort(m_port);
> m_userProfile->setFixedTransportInterface(Data(interface));
>
> m_userProfile->setRportEnabled(false);
> Uri hostPort = Uri();
> hostPort.host() = Data(interface); <- interface is a string representing eg.
> eth0:0, i.e. 192.168.0.55
> hostPort.port() = m_port;
> //Override contact
> m_userProfile->setOverrideHostAndPort(hostPort);
>
> I also add ;transport=tls to contact and request uris
>
> I have dug around in resiprocate's code a bit a found the following:
>
> 1. A sending socket has a creation, and then a connect(). For this to work,
> I think we need to do a bind and then a connect, so it binds to correct
> local interface.
> 2. mConnectionManager stores tcp/tls connection in map<Tuple, Connection*>.
> This means that it only looks at the destination details to determine
> whether to reuse a connection. In my case I have multiple UAC's connecting
> to the same proxy and thus all have the same destination. For my purposes,
> connections should be stored indexed by both source and destination details.
>
> My app succeeds in creating a TLS connection, but I want to create multiple
> TLS connections to the same ip address and port.
>
> I.e.
> REGISTER sip:192.168.1.76;transport=tls SIP/2.0
> From: <sip:test_1@xxxxxxxxxxxx;transport=tls>;tag=8bd1de56
> To: <sip:test_1@xxxxxxxxxxxx>
> Call-ID: NWZiZDllZjNmYTBhMjkzMTNlMDA1M2M2NmNjMWMyZGI.
> CSeq: 1 REGISTER
> Via: SIP/2.0/TLS
> 192.168.1.250:5061;branch=z9hG4bK-d8754z-b6bf8519ce545c45-1---d8754z-
> Max-Forwards: 70
> Contact:
> <sip:test_1@xxxxxxxxxxxxx:5061;transport=tls;rinstance=91768da0ac8f8204>
> Expires: 3600
> Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,UPDATE
> Content-Length: 0
>
> And...
>
> REGISTER sip:192.168.1.76;transport=tls SIP/2.0
> From: <sip:test_2@xxxxxxxxxxxx;transport=tls>;tag=484f5a36
> To: <sip:ViPr_test_2@xxxxxxxxxxxx>
> Call-ID: NDljMTRmZDY2ZWYzOWY3NGE4ZTU1ZjcyNTBhMmI5N2E.
> CSeq: 1 REGISTER
> Via: SIP/2.0/TLS
> 192.168.1.251:5062;branch=z9hG4bK-d8754z-35c8c05840d4cc3d-1---d8754z-
> Max-Forwards: 70
> Contact:
> <sip:test_2@xxxxxxxxxxxxx:5062;transport=tls;rinstance=d530841c408cee56>
> Expires: 3600
> Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,UPDATE
> Content-Length: 0
>
> Should use seperate TLS connections because of their Via headers.
>
> Regards,
> Jean Visagie
>
> On Mon, Feb 2, 2009 at 4:13 PM, Scott Godin <sgodin@xxxxxxxxxxxxxxx> wrote:
>>
>> Are you using the following setting in Profile.hxx:
>>
>>      ///overrides the value used to populate the contact
>>      ///?dcm? -- also change via entries? Also, dum currently uses(as a
>> uas)
>>      ///the request uri of the dialog constructing request for the
>> local contact
>>      ///within that dialog. A transport paramter here could also be used
>> to
>>      ///force tcp vs udp vs tls?
>>      virtual void setOverrideHostAndPort(const Uri& hostPort);
>>
>> If you set the host/port to match your TLS transport then use the
>> appropriate profile when creating a new request (UAC) it should select
>> the correct transport.
>>
>> Scott
>>
>> On Fri, Jan 30, 2009 at 10:29 AM, Jean Visagie <jean.visagie@xxxxxxxxx>
>> wrote:
>> > Greetings,
>> >
>> > I am trying to create multipleTLS connections using the DUM interface.
>> > To
>> > accomplish this I tried to instantiate multiple UserProfile objects,
>> > create
>> > a TLS transport on the DUM for each and then force the contact header
>> > and
>> > via header of each UserProfile to conform to the specific port and
>> > interface(each interface has its own ip alias eg. eth0:1.).
>> >
>> > However resiprocate always creates one TLS connection from eth0(i.e. not
>> > from any of the aliases). Is there something I am missing?
>> >
>> > I am using resiprocate 1.4.1 on Linux platform.
>> >
>> > Regards,
>> > Jean Visagie
>> >
>> > _______________________________________________
>> > resiprocate-users mailing list
>> > resiprocate-users@xxxxxxxxxxxxxxx
>> > List Archive: http://list.resiprocate.org/archive/resiprocate-users/
>> >
>
>