# Troubles

**URL:** <https://community.asterisk.org/t/troubles/34912>\
**Category:** Asterisk General\
**Created:** [April 17, 2011, 9:02pm UTC](https://community.asterisk.org/t/troubles/34912 "2011-04-17T21:02:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 17, 2011, 9:02pm UTC](https://community.asterisk.org/t/troubles/34912/1 "2011-04-17T21:02:51Z")

</div>

Hi All

I seem to be over looking something simple but I can not see it. I can not get my Xlite phones to register. I have shut off the firewalls on the computers with the phones. This is my little test setup. Get an error No matching peer found when phones try to register. Here are my sip.conf and extensions.conf files. Running Asterisk ver 1-6 on CentOS 5.6.

Thanks, Doug

[general]  
Autofallthrough=no

[test]

exten =\> 101,1,Dial(SIP/101,2)  
exten =\> 101,n,Wait(5)  
exten =\> 101,n,VoiceMail(101@VoiceMailContext,u)  
exten =\> 101,n,Playback(goodbye)  
exten =\> 101,n,Hangup

exten =\> 102,1,Dial(SIP/102,2)  
exten =\> 102,n,Wait(5)  
exten =\> 102,n,VoiceMail(102@VoiceMailContext,u)  
exten =\> 102,n,Playback(goodbye)  
exten =\> 102,n,Hangup

exten =\> \_1XX,1,Dial(SIP/${EXTEN})

exten =\> 101,1,Wait(2)  
exten =\> 101,2,Hangup

exten =\> 10,1,Set(name=10)  
exten =\> 10,2,SayDigits(${name})

exten =\> 11,3,NoOP(I am last)  
exten =\> 11,2,NoOP(I am second)  
exten =\> 11,1,NoOP(I am first)

exten =\> 101,1,Wait(1)  
exten =\> 101,n,Wait(2)  
exten =\> 101,n,NoOP(priority 3)  
exten =\> 101,n,Hangup

exten =\> \_XXX,1,Answer()  
exten =\> \_XXX,2,Wait(15)  
exten =\> \_XXX,n,Playback(/var/lib/asterisk/sounds/en/tt-monkeys)  
exten =\> \_XXX,n,Goto(2)

exten =\> \*99,1,VoiceMailMain(${CALLERID(num)})  
exten =\> \*99,n,Hangup

[gereral]  
context=default  
allowoverlap=no  
bindport=5060  
bindaddr=0.0.0.0  
srvlookup=yes

[101]  
secret=harriet  
type=friend  
context=test  
nat=no  
canreinvite=no  
host=dynamic  
calledid=“Doug” 101  
mailbox=101@VoiceMailContext

[102]  
secret=harriet  
type=friend  
context=test  
nat=no  
canreinviter=no  
host=dynamic  
calledid=“Kath” 102  
mailbox=102@VoiceMailContext

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 18, 2011, 5:34am UTC](https://community.asterisk.org/t/troubles/34912/2 "2011-04-18T05:34:50Z")

</div>

If your phones are not in the same subnet as the server then nat=yes is mandatory.  
The extensions.conf is not needed to register a /device/set/phone, it is used to call the device/set/phone once it is registered, use only one /device/set/phone to verify config.  
Also need a config on the xlite, xlite vers#.  
Have you checked xlite web site for Asterisk config, most sip phones ususally have a descent config on their web site for Asterisk.  
Also try a laptop in the same subnet as the server and see how it goes, are the pc’s in the same subnet?  
PC OS???

Also see if you can get a sip trace, asterisk -r, CLI\> sip set debug peer 101

at the CLI\> you should see the sip messages and it will should show why if it is making it to the server.

* * *

Try this, forget extensions.conf until they register

* * *

[general]  
context=default  
allowoverlap=yes ; change to yes and once the set registers change to no and then re-register the set  
bindport=5060  
bindaddr=0.0.0.0  
srvlookup=no ; try changing to no until the set registers, also see host.conf, resolv.conf files if yes try  
;to ping the server by name from the pc, is not see windows host file and add the  
;server name to ip.

[101] ;xlite id = 101 name=101 ??? need info on xlite config  
secret=harriet  
name=101 ;this one may not be necessary I think name was part of 1.6 not sure  
type=friend  
context=test  
nat=yes ;firewall, bet you are not in the same subnet nat=yes a must  
;canreinvite=no  
host=dynamic  
;calledid=“Doug” 101 ;Are you sure it is calledid and not callerid  
;mailbox=101@VoiceMailContext ;comment out voicemail

Asterisk1.8.3.2 test system

* * *

3CX pc softphone id=2033 name=2033 password=1234  
WinXP service pack 3

sip.conf  
[general]  
context=default ; Default context for incoming calls  
callcounter=yes  
udpbindaddr=0.0.0.0:5060  
tcpbindaddr=0.0.0.0:5060  
tlsbinaddr=0.0.0.0:5061  
ignorepat=9  
srvlookup=yes ;enable DNS lookups on outbound calls  
qualify=yes ;allows a monitor state to exist see the t1timer= section  
realm=your\_fqdn\_name.com ;see asterisk.conf system name  
use\_q850\_reason=yes ; Default “no”  
; Set to yes add Reason header and use Reason header if it is available.

```
                         ; See qos.tex or Quality of Service section of asterisk.pdf for a description of these parameters.

```

tos\_sip=ef ; Sets TOS DCSP for SIP packets.  
tos\_audio=cs5 ; Sets TOS for RTP audio packets.  
;tos\_video=af41 ; Sets TOS for RTP video packets.  
;tos\_text=af41 ; Sets TOS for RTP text packets.

cos\_sip=6 ; Sets 802.1p priority for SIP packets.  
cos\_audio=6 ; Sets 802.1p priority for RTP audio packets.  
;cos\_video=5 ; Sets 802.1p priority for RTP video packets.  
;cos\_text=3 ; Sets 802.1p priority for RTP text packets.

[2033] ;This one of our test sets, we only started with a few lines here, look at using templates  
context=standard  
type=friend  
secret=1234  
host=dynamic  
nat=yes  
dtmfmode=rfc2833  
registertrying=yes ;100 trying message is sent  
disallow=all  
allow=ulaw  
allow=alaw  
allow=gsm  
notify=yes  
callerid="Test One"  
mailbox=2033@your\_fqdn\_name.com

* * *

Your config

* * *

[gereral]  
context=default  
allowoverlap=no  
bindport=5060  
bindaddr=0.0.0.0  
srvlookup=yes

[101]  
secret=harriet  
type=friend  
context=test  
nat=no  
canreinvite=no  
host=dynamic  
calledid=“Doug” 101 Are you sure it is calledid and not callerid  
mailbox=101@VoiceMailContext

* * *

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 18, 2011, 3:28pm UTC](https://community.asterisk.org/t/troubles/34912/3 "2011-04-18T15:28:49Z")

</div>

Hi.

I shut server and two computers with Sip phones down last night. I restarted everything this morning, did not change anything and both phones registered and I can call between them. I did perform dialplan reload several times last night. Doen’t make any sence why it is working today.

Thanks for the reply, Doug

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 18, 2011, 8:25pm UTC](https://community.asterisk.org/t/troubles/34912/4 "2011-04-18T20:25:07Z")

</div>

The shutdown startup would have reloaded the sip.conf file, when trying to register sets as I stated before the diaplan has nothing to do with the set/ip phone registration, the command would have been sip reload each time you changed the sip.conf file. Also be sure to check the spelling on the calledid vs callerid in the sip.conf file.

Glad to see it is working, now you have the wonderful task of moving from the extensions.conf to extensions.ael, use and understand the astdb database, see the CLI\> database commands, then try the odbc and postgresql, or MySql databases to make the system humm, the new 1.8.3.2 inproves the astdb set registration by 50,000% , see the tarball change log for 1.8 on the download page.

Keep in mind sip.conf at your stage controls sip ip phone registration not the dialplan, dialplan reload would never update the sip.conf entries. Good plan here for you would be to edit the asterisk.conf file, ;verbose=3 uncomment then setup as verbose=6 then on leave on until your inital debug phases have completed.

Have a good time with it.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [April 19, 2011, 6:08pm UTC](https://community.asterisk.org/t/troubles/34912/5 "2011-04-19T18:08:34Z")

</div>

Hi  
Thank you for your help. I thought I did sip reload at some point but must not have been at the right point. I will have to remember that. Seems like what I mess up I remember the best. Can not recall my instructor talking about that, he has talked about dialplan reload. I will look into the callerid.

Thanks again, Doug
