why UDP6 when I use SIMPLE protocol to login SIP proxy?

CHEN XUEQIN chenxq at star-net.cn
Mon Sep 24 23:02:49 EDT 2007


Hawkins:
      Thanks for you attention about my questions.

Hawkins, William - AES ??:
> In reference to listening only on UDPv6 port 5060, I believe this is what the developers intended. The SIMPLE code calls purple_network_listen_range to open these ports. This function iterates through each port in that range with each available protocol. The function uses (on linux) getaddrinfo to create a list of protocols to try with each port. As soon as a port is open, the function returns.  It would appear that Linux favors UDPv6 over UDPv4 which leads to the behavior that you are seeing. 
>
> It is possible to "hint" to the getaddrinfo function that you want v4 addresses to have preference. However, that is something that the libpurple people (eaters) would have to address. 
>
> Please correct me if I am wrong in my interpretation of this code. 
>
> Thanks,
> Will
>
>   
On the host where pidgin client running(yeah, it's my PC), pidgin always listen on sip port on udp6. I have done the following test, the configuration was:


    * Pidgin 2.2.0  run on Ubunut 7.04 , Arch: i386,  IP:  192.168.35.40
    * Openser run on CentOS 5.0, Arch: x86_64, IP:  192.168.35.245
    * Pigdin register to openser using account 8871 at 192.168.35.245

My test process was:

   1. Start openser in debug mode,  fork=no, listen=udp:192.168.35.245:5060

   2. Start pidgin, setup SIMPLE account, register to openser SIP server
   3. on pidgin host, netstat -aup | grep pidgin
      udp6       0      0 *:sip                  
      *:*                                17635/pidgin
      udp6       0      0 *:sip                  
      *:*                                17635/pidgin
      udp6       0      0  *:sip                  
      *:*                                17635/pidgin
   4. on openser Server, check user location info, run "openserctl ul
      show"        AOR:: 8871
                      Contact:: sip:8871 at 192.168.35.40:5060;transport=udp Q=
                              Expires:: 569
                              Callid::
      7F25g28F1a4883i2391m2498tDEDDbCD34x2F88x
                              Cseq:: 5
                              User-agent:: Purple/2.2.0
                              State:: CS_SYNC
                              Flags:: 0
                              Cflag:: 0
                              Socket:: udp:192.168.35.245:5060
                              Methods:: 1792
      The socket display is udp:192.168.35.245:5060, not
      udp6:192.168.35.245:5060. Also, the contract transport is udp, not
      udp6.
   5. Send SIP message to other SIP client which was also registered to
      openser. Both sending and receiving message is ok.
   6. Quit pidgin client, check user location info again, run
      "openserctl ul show" . AOR:: 8871 was still there with no change
      comparing to step 4.

 From the above process, can I draw a  conclusion that actually pidgin 
is listen on sip port of udpv4 not udpv6. The output of " netstat -aup | 
grep pidgin" command is mistaken?  And pigdin did not send unregister 
request to SIP proxy when client quit.

Again, thanks for your reply.

Regards,
Chen Xueqin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20070925/8452b3b8/attachment.html>


More information about the Devel mailing list