Hi Pekka,

Okay, I think I'm a bit confused about the "primary" transport and the
"secondary" transport.  Why does sofia-sip bind at the primary level and not
at the secondary level?  

I did make a temporary local modification that worked.  I just moved the
bind() call from tport_bind_socket() to tport_tcp_init_secondary(), and I
needed to populate the self->tp_addr[0].su_sin structure just prior to the
bind() call.

Do you think this change might invalidate some other configuration.  For my
implementation (i.e. a phone), I don't ever expect to close the TCP or TLS
connection.

Best Regards,
Jerry


-----Original Message-----
From: Pekka Pessi [mailto:ppe...@gmail.com] 
Sent: Thursday, February 26, 2009 2:36 PM
To: Jerry Richards
Cc: sofia-sip-devel@lists.sourceforge.net
Subject: Re: [Sofia-sip-devel] TCP Source Port 3072?

2009/2/26 Jerry Richards <jer...@tonecommander.com>:
> Do you mean that you don't want to bind the TCP connection to port 
> 5060, because some other program might be using it?  Or some other 
> program might close that port?  We have a hard-phone and I know 
> nothing else except sofia-sip would use that port number.

The port 5060 is used by Sofia SIP itself for serving incoming INVITE and
friends. Serious problems refer to the situation where you have a TCP
connection, it gets closed, and when you try to open another, you can not,
because the new one has exactly the same source-ip-port/destination-ip-port
tuple.

(The bright idea of making port 5060 as source port for client connections
has occurred to me, too, and it simply does not work. And at least Linux
makes its hardest to prevent you from shooting yourself into foot (or head)
as binding a client-side tcp connection to same port as you use for a server
is practically impossible.)

--Pekka

>
> -----Original Message-----
> From: Pekka Pessi [mailto:ppe...@gmail.com]
> Sent: Thursday, February 26, 2009 12:15 PM
> To: Jerry Richards
> Cc: sofia-sip-devel@lists.sourceforge.net
> Subject: Re: [Sofia-sip-devel] TCP Source Port 3072?
>
> 2009/2/26 Jerry Richards <jer...@tonecommander.com>:
>> Hello All,
>>
>> When I configure the sofia transport=udp, then I see SIP UDP packets 
>> sent with source port 5060 and destination port 5060.  When the only 
>> change I make is transport=tcp, then I see SIP TCP packets sent with 
>> source port 3072 and destination port 5060.
>>
>> Has anyone seen this?  Maybe I'm missing a tag or there is something 
>> weird happening in my TCP/IP stack?
>
> This is perfectly normal for TCP. The source port is not usually bind 
> to any known value but system selects an ephemeral port for it.  (If 
> it was, we would run into serious problems if the connection ever got
> closed.)
>
> --
> Pekka.Pessi mail at nokia.com
>
>



--
Pekka.Pessi mail at nokia.com


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to