vpbx*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 621/621 192.168.250.76 D N 5060 OK (65 ms) 626/626 192.168.250.109 D N 5060 OK (180 ms) 616/Ronald Softphone (Unspecified) D N 0 UNKNOWN 615/Ronald office 192.168.250.103 D N 5060 OK (41 ms) 610/Ronald WiSip (Unspecified) D N 0 UNKNOWN 609/Grandstream (Unspecified) D N 0 UNKNOWN 608/Note-Pen Softphone (Unspecified) D N 0 UNKNOWN 606/Office (Unspecified) D N 0 UNKNOWN 605/605 61.220.121.19 D N 5060 OK (9 ms) 602/602 61.220.121.19 D N 5060 OK (10 ms) 601/601 192.168.250.95 D N 5060 OK (201 ms) a few minutes later: vpbx*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 621/621 192.168.250.76 D N 5060 OK (65 ms) 626/626 192.168.250.109 D N 5060 OK (180 ms) 616/Ronald Softphone (Unspecified) D N 0 UNKNOWN 615/615 192.168.250.103 D N 5060 OK (41 ms) 610/Ronald WiSip (Unspecified) D N 0 UNKNOWN 609/Grandstream (Unspecified) D N 0 UNKNOWN 608/Note-Pen Softphone (Unspecified) D N 0 UNKNOWN 606/Office (Unspecified) D N 0 UNKNOWN 605/605 61.220.121.19 D N 5060 OK (9 ms) 602/602 61.220.121.19 D N 5060 OK (10 ms) 601/601 192.168.250.95 D N 5060 OK (201 ms) 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 bye Ronald Wiplinger
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. -Chris
Olle E Johansson
2006-Feb-03 00:54 UTC
[Asterisk-Users] username not stabled? * DO NOT USE USERNAME for locally attached phones!!!
> > I have many remote users, and to make the life easy I use their > existing e.164 phone number. That way nobody of my users need to > think what number the other party has on our system or PSTN, .... > As more users you get, as less you will remember their "name". > Therefore I tried to use the field username for this help. > It is easy to remember 49 is the (only) guy in Germany and 8621 is > our Shanghai person, but most of the people are in 8862 (Taipei)!!!! > > Is there another solution ?using a standard configuration option for something else than it is intended is a dangerous path to take. There is a setting called "setvar" that lets you set any custom setting you want for all incoming calls belonging to a peer or user. You can use this to set customer IDs, nicknames, favourite brand of beer - anything. /Olle