"sip show users" is empty

I am trying to get my first phone to register and I get this:

[2012-09-10 17:08:20] NOTICE[7643] chan_sip.c: Registration from ‘sip:[email protected]’ failed for ‘192.168.11.12:56123’ - No matching peer found

the problme seems to be that user/password does not match.
I found that I should be able to list the extensions defined by:

telegraphCLI> sip show users
Username Secret Accountcode Def.Context ACL ForcerPort
telegraph
CLI> quit

as you can see there are none. I have 200 and 201 defined.
What am I missing?

Frank

You are missing pretty well everything so far.

Start with letting us know :- what platform, with what distro/OS using what Asterisk version, and what FreePBX version, provisioned by what method by who and how. . . .

OS: CentOS release 6.3 (Final) x86_64
Asterisk: 1.8.15.0
FreePBX: 2.10.0

I installed CentOS then installed Asterisk

I have a working Trixbox that I am migrating from

As long as Trickybox has as yet had nothing to do with your system, then just make a few extensions from the FreePBX gui and comit them, if the don’t show up with

sip show peers

and

sip show users

you did something wrong. I assume you have mysqld with relevant passwords set up correctly and as you are going solo you have a good knowledge of linux. If not then maybe just reinstall with the convenient iso images here.

[[email protected] local]# asterisk -rvvv
Asterisk 1.8.15.0, Copyright © 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer [email protected]
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.

== Parsing ‘/etc/asterisk/asterisk.conf’: == Found
== Parsing ‘/etc/asterisk/extconfig.conf’: == Found
Connected to Asterisk 1.8.15.0 currently running on telegraph (pid = 7612)
Verbosity is at least 3
telegraphCLI> sip show users
Username Secret Accountcode Def.Context ACL ForcerPort
telegraph
CLI> sip show peers
Name/username Host Dyn Forcerport ACL Port Status
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
telegraph*CLI>

[[email protected] asterisk]# less sip_additional.conf
[200]
deny=0.0.0.0/0.0.0.0
secret=200-zip2
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
trustrpid=yes
sendrpid=no
type=friend
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
encryption=no
callgroup=
pickupgroup=
dial=SIP/200
[email protected]
permit=0.0.0.0/0.0.0.0
callerid=zip2 <200>
callcounter=yes
faxdetect=no

/usr/lib/mysql/asterisk has a lot of files, and some of them have been updated today.

I would have installed from a distro, but I have other needs on this box.
I also have a good handle on Linux.

Sounds like somehow you copied the Asterisk sip.conf sample files over the FreePBX files so sip_additional and all the others are not “included” in sip.conf.

Also be aware you can’t migrate the databases from trixbox to the current version of FreePBX.

Then 200 should be shown from bash with

rasterisk -x ‘sip show peers’

and

rasterisk -x ‘sip show peer 200’

If they don’t then you broke something and sip_additional.conf is not being included into sip.conf

edit : snap! SkykingOH :slight_smile:

[[email protected] asterisk]# rasterisk -x 'sip show peers’
Name/username Host Dyn Forcerport ACL Port Status
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]

[[email protected] asterisk]# rasterisk -x 'sip show peer 200’
Peer 200 not found.

[[email protected] asterisk]#

I kind of had the feeling that the file is not getting loaded. So much is done in mysql, I was not sure.
sip.conf does not have an #incude sip_additional.conf in it and when I added it, sip.conf was overwritten.

But if you want to and are “rolling your own” and are not a noobie. then install a major version of FreePBX that matches, for example . . .

#cleanup
rm -rf /var/www/html/admin
rm -rf /var/lib/mysql/asterisk
rm -f /etc/amportal*
rm -rf /etc/freepbx*
rm -rf /etc/asterisk/freepbx*

VER_FREEPBX=2.5 # or 2.4 or whatever
cd /usr/src/
mkdir -p freepbx
cd freepbx
svn co http://www.freepbx.org/v2/svn/freepbx/branches/${VER_FREEPBX}
cd ${VER_FREEPBX}
#vi install_amp as needed

./install_amp

then backup/restore from/to trickedyoubox/freepbx
then with admin module update to to 2.10

You might need to sanitize a couple of files in /etc/asterisk

it’s as easy as that

I did my install bassed on:
http://www.powerpbx.org/content/rhel-asterisk-freepbx-install-guide-rhel-v6-asterisk-v18-freepbx-v29

History is a wonderfull thing:
68 wget http://mirror.freepbx.org/freepbx-2.10.0.tar.gz
69 tar zxvf freepbx-2.10.0.tar.gz
70 cd /usr/lovsl/src/freepbx-2.10.0
72 mysqladmin create asterisk
73 mysqladmin create asteriskcdrdb
74 mysql asterisk < SQL/newinstall.sql
75 mysql asteriskcdrdb < SQL/cdr_mysql_table.sql
76 mysql
77 mysqladmin -u root password 'notpassword’
78 /usr/sbin/safe_asterisk
79 cd /usr/local/src/freepbx-2.10.0
80 ./install_amp
81 rm -f /etc/asterisk/sip_notify.conf
82 rm -f /etc/asterisk/iax.conf
83 rm -f /etc/asterisk/logger.conf
84 rm -f /etc/asterisk/features.conf
85 rm -f /etc/asterisk/sip.conf
86 rm -f /etc/asterisk/extensions.conf
87 rm -f /etc/asterisk/ccss.conf
88 rm -f /etc/asterisk/chan_dahdi.conf
89 nano /etc/asterisk/cdr_mysql.conf
90 echo /usr/local/sbin/amportal start >> /etc/rc.local
91 chkconfig httpd on
92 chkconfig mysqld on
93 reboot

history also provided you with a moribund distro. use at your own peril or try getting help there :slight_smile:

thank you for your help, I am going to follow dicko’s directions and reinstall.
I have no intention of migrating form trickbox to freepbx, I will copy the config from one gui to the next.

You thusly become a wise virgin! Watch you wick from now on :wink: