[Asterisk-Users] username not stabled? * DO NOT USE USERNAME for locally attached phones!!!

Sum Ding Wong sumdingwong at gmail.com
Wed Feb 1 07:53:47 MST 2006


Olle,

Should I use defaultip and username when configuring gateways that do
not register to *? Could this be why my gateways are not sending calls
to the appropriate contexts?

Here is my sip.conf configuration for my gateway:
;-----------------------
; sip.conf
;-----------------------
 [general]
context=default
srvlookup=yes
dtmfmode=inband
qualify=yes
nat=yes
host=dynamic
canreinvite=no
pedantic=no
disallow=all
allow=ulaw
allow=g729
allow=g723
allow=alaw

[ 12.34.43.3]
context=customer1
type=friend
qualify=200
host= 12.34.43.3
canreinvite=no

Thanks,

Sum Ding Wong

On 2/1/06, Olle E Johansson <oej at edvina.net> wrote:
>  Chris A. Icide wrote:
> > Ronald Wiplinger wrote:
> >
> > <snip>
> >
> >>
> >>601, 602, 605, 606, 608, 609, 610, 615 and 616 are in sip.conf
> >>621 and 626 are in Real-time sip_buddies
> >>
> >>621 and 626 changes username back from name to number (name) in the
> >>database, and never shows it in "sip show peer"
> >>
> >>615 changed username "Ronald office" to 615, although no change in
> >>sip.conf
> >>
> >>Did anybody else experienced that?
> >>
> >>*CLI> show version
> >>Asterisk SVN-trunk-r8447M built by root @ vpbx on a x86_64 running
> >>Linux on 2006-01-25 15:33:01 UTC
> >>
> >
> > <snip>
> >
> > There is some code in asterisk which I'm not sure why it exists, that
> > will set the username in memory to the user value in the SIP Contact
> > header upon registration.  While this isn't normally a big deal, if you
> > are using realtime, when a SIP UA registers, some things are written
> > back to the realtime database, username being one of them.
> >
> > I am not sure if this is a bug or not, as I don't understand the thought
> > process behind allowing a sip ua to modify the username asterisk uses
> > based on a sip header when it registers.
> >
> > I went into the code and removed the username as a field that got
> > written back to the realtime db upon registration and it fixed my problem.
> >
> DO NOT USE USERNAME!
>
> That feild is really something used together with defaultIP when we have
> *no* registration.
>
> * When we have a registration, we use whatever the phone tells us in the
> Contact: header, which is a SIP requirement. That is why we change it to
> reflect the known contact, provided by the phone.
>
> * We never change the device name of the phone, just the address we use
> to communicate with the phone.
>
> * This name is not used for authentication by a phone, it is not the
> username you configure the phone with.
>
> * In most cases, there is no need to use the "username=" option in
> sip.conf for phones.
>
> I will soon change this setting to "defaultuser" to make it even more
> obvious that this is not anything you need to set. The phone name is
> whatever you have between the square brackets in sip.conf, both for
> users and peers.
>
> I will check into the realtime code as well, to make sure we are
> changing the proper field in the database.
>
> /Olle
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list