[Asterisk-Dev] SIP peername==username equivalence
Matthew Costello
matthew at ottix.com
Wed Nov 10 09:00:36 MST 2004
I've gotten annoyed by the requirement in the sip_chan.c
file that the username must match the peer name. Since
the username is generally the same as the extension it leads
to less than descriptive names in the asterisk configuration
files.
I've fixed sip_chan.c to break this equivalence. With this
change the sip.conf peer names are completely internal
to asterisk. This decoupling allows the use of descriptive
peer names in the asterisk configuration files.
My "sip show peers" now has
Name/username Host Dyn ...
streak/44 192.168.1.19 D
cream/42 (Unspecified) D
albacore/41 192.168.1.65 D
gs02/34 192.168.1.55 D
gs01/33 192.168.1.54 D
spa01a/s1-pstn 192.168.1.51 D
spa01b/s1-32 192.168.1.51 D
which is much clearer than just having "44/44".
The patch (against v1-0) is available at
http://www.ottix.com/~matthew/sip-username01.patch
I've not put it into the bug tracking system because I have
not updated the MySQL code in chan_sip.c. If this fix is
wanted then I will update and test the MySQL code as well.
More information about the asterisk-dev
mailing list