[asterisk-dev] uncached realtime sip friends cannot set transport-protocol in sipregs
Walter Doekes
walter+asterisk-dev at osso.nl
Mon Sep 5 01:54:18 CDT 2011
Hi,
before filing a bug report and writing a patch, I wanted some input on
the following:
When using uncached realtime friends with transport=UDP,TCP users are
allowed to register/call using either TCP or UDP. This works fine.
However, when asterisk calls the user, it always uses the "preferred"
transport, namely the first option: UDP, *even* though the user
registered with transport=tcp in the Contact header.
The cause of this simple: the sipregs table has no place to store the
transport -- except for the fullcontact column, see below -- ergo, it
does not know that the client prefers (and in many cases, *only* does) TCP.
I see two easy solutions here:
(a) Add an extra column `transport` to the sipregs table where we store
the "current" preferred protocol.
(b) Adjust chan_sip to store/read the fullcontact header if available.
This is currently only written when rtcachefriends=yes, but I see no
reason why we cannot use this for uncached friends. From the
fullcontact, asterisk can read and use the transport= uri parameter.
Both have their disadvantages:
(a) Needs extra backward compatibility code to check at runtime whether
this extra column exists.
(b) I do not know why fullcontact is not already used for uncached
friends. If it was deliberately not used for uncached friends, we can
break things if we start using it. (It also suffers from the drawback of
(a), but we get to remove some code at the same time, leaving the lines
added/removed more balanced.)
Does anyone familiar with the fullcontact/sipregs code in chan_sip have
anything to say about this?
Regards,
Walter Doekes
OSSO B.V.
More information about the asterisk-dev
mailing list