Sip.conf registration help


#1

Hello and thanks for taking the time to look at my first post. I’m trying to setup an asterisk box for testing and learning purposes.
I’m using the following resources as guides:

Asterisk the Definitive Guide 4th Ed (obviously outdated but has been helpful explaining concepts)

Asterisk Online documentation at wiki.asterisk.org

I have Asterisk 16 installed on a Centos7 box on a local 192.xxx.x.111 network and have been trying to register two clients / devices which are also on the same network as Asterisk. Network is using NAT with no firewall between devices and Asterisk. Clients / Devices are Zopier5 (free) softphone 192.xxx.x.222 on a windows machine and a Polycom IP650 192.xxx.x.333. The IP’s for Asterisk, Zopier and Polycom are bound at the switch.

I’ve tried different settings in the sip.conf file but cannot either device to register with asterisk e.g. showing the device’s ip and dyn column with D status.

Just trying to get basic connectivity at this point.

example sip.conf
[general]
context=default
[6001] ;zopier id
type=friend
content=local-phones
host=dynamic
secret=1234
disallow=all
allow=ulaw
allow=g726
allow=g722
;Alternatively I also tried the following:
;host=192.xxx.x.222
;transport=udp
;udpbindaddr=0.0.0.0

[6002] ;polycom id
type=friend
content=local-phones
host=dynamic
secret=1234
disallow=all
allow=ulaw
allow=g726
allow=g722
;Alternatively I also tried the following:
;host=192.xxx.x.333
;transport=udp
;udpbindaddr=0.0.0.0

example extensions.conf
[local-phones]
exten = 100, 1, Answer()
same = n,wait(1)
same = n,playback(hello-world)
same = n, hangup ()

The clients are set up as follows:

Zopier
User: 6001
Password: 1234
Hostname: 192.xxx.x.111
*Also tried 192.xxx.x.111:5060

Polycom
User: 6002
Password: 1234
Hostname: 192.xxx.x.111
*Also tried 192.xxx.x.111:5060

Zopier and Polycom show unregistered. Note: They can both ping the Asterisk IP successfully .

Asterisk CLI > sip show peers
6001/6002
host unspecified
Dyn D
2 offline

with host=the device IP
sip show peers
6001/6002
Host 192.xxx.x.222 / .333
Dyn (blank)
2 offline

Notes:
chan_sip.so is loading and reloading successfully.

Any help is appreciated.


#2

please check the SElinux, make sure it is disabled.


#3

Yes, I should have mentioned sestatus is disabled. I did that early before I even installed Asterisk and have checked a few times since. Thank you for the reply.


#4

set verbose higher and check the log.


#5

So I’m not sure of the syntax to set the verbose higher at the Asterisk CLI / console. I know
-vvvv etc. in bash but that doesn’t work for me in the Asterisk CLI / console. I’m sorry, I’m sure missing something basic here, would please explain or point me to the reference? Thank You.


#6

please refer this link:
https://wiki.asterisk.org/wiki/display/AST/Basic+Logging+Commands
get the debug info, and post here.


#7

Update:
The centos7 box firewalld zone wasn’t configured for port: 5060/udp or 10000-20000 /udp
Passed earlier ping test because it was ICMP.

Also modified logger.conf file
*added messages =>notice, warning, error, debug, verbose
CLI: logger rotate
And started receiving real time debugging messages on the command line.
*probably revert back to the default: notice, warning, error when not debugging to keep the drive from filling up too fast.

Thanks for the feedback james.zhu


#8

Are Asterisk is listening 5060 port?
netstat -lnp | grep 5060

Are devices registrating by UDP transport?
Also add to peers:
qualify=yes
nat=no