On Aug 20, 2009, at 1:28 PM, Carlos S. Antunes wrote:

Hello!

I am using Callcentric for my tests and have observed what appears to me
a possible bug in the way Freeswitch handles DNS SRV records.

Callcentric uses DNS SRV records as a way to direct traffic to their SIP
server. A 'srv' 'dig' of '_sip._udp.callcentric.com' returns:

_sip._udp.callcentric.com. 10025 IN     SRV     20 7 5080
alpha6.callcentric.com.
_sip._udp.callcentric.com. 10025 IN     SRV     20 7 5080
alpha7.callcentric.com.
_sip._udp.callcentric.com. 10025 IN     SRV     20 7 5080
alpha1.callcentric.com.
_sip._udp.callcentric.com. 10025 IN     SRV     20 7 5080
alpha3.callcentric.com.

Based on this information, Freeswitch appears to correctly round robin
all available IP addresses except in a particular situation: in the
middle of authorizations.


very true, but i've been reading over the RFCs on this, and it seems that FreeSWITCH isn't doing anything incorrectly.

in RFC3263 (section 4), when talking about client usage of SRV:
The procedures here MUST be done exactly once per transaction, where transaction is as defined in [1].
[1] being RFC3261

in RFC3261 (section 8.1.3.5), when talking about 4xx responses:
In all of the above cases, the request is retried by creating a new
   request with the appropriate modifications.  This new request
   constitutes a new transaction and SHOULD have the same value of the
   Call-ID, To, and From of the previous request, but the CSeq should
   contain a new sequence number that is one higher than the previous.

For example, in a registration, Freeswitch send a packet to
alpha1.callcentric.com. Callcentric then challenges Freeswitch with a
Proxy Authorization request. Freeswitch then sends the packet with the
requested credentials but not necessarily to alpha1.callcentric.com! In many cases, instead of sticking to the 'challenging' server, Freeswitch
round robins and sends the second packet to, one of the other servers.
This continues for a little while and eventually, simply by luck, the
second packet is sent to the 'challenging' Callcentric server.

Shouldn't Freeswitch stick to the same server when challenged for
credentials?

can you show anything in the RFCs that says so?



Is this a bug?

see above



Is there a way to make Freeswitch behave
differently?
disable-srv on the profile



All that said, if it has to be a "bug", then it seems to me that it's more of a "bug" in callcentric's service. They'd probably be better of actually prioritizing their SRV records. If they want load balancing and want to do checking for stale nonces, then they should be sharing nonces across all of their proxies or using a proper load balancer.


Raymond Chandler
    http://freeswitchsolutions.com
    http://cluecon.com
    http://cudatel.com

_______________________________________________
FreeSWITCH-users mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Reply via email to