Can you use the dhcp on a router to configure register sip peers

Hello Guys,

I am having an issue registering my SIP peers. In my sip.conf. file my “host=dynamic”, but when I get to my asterisk server and type “sip show peers” no IP are assigned to my peers. Since my Router is “dhcp” enabled, I didn’t configure a dhcp server on my CentOS 6. Is it possible to use the dhcp on the router for sip to register.
I would be grateful if anyone could be of help.


How the device gets their IP address doesn’t matter, and Asterisk doesn’t care as registration is the act of the SIP device telling Asterisk where it is which is nothing to do with the DHCP process.

hi jcolp,

I gave static IPs to my peers but their status after typing “sip show peers” is unmonitered. What could be wrong. Any help please?

You will also need to ensure qualify=yes is set on each peer to turn on qualify support.

jcolp, after ensuring qualify=yes and keepalive=yes, the status is now unreachable. Any assistance please?

The status will be unreachable if no response is received. Do a packet capture and see if the messages are going to the right place. If so then check to see if the response is being blocked by a firewall or something. You’re now outside of Asterisk and into network territory.

Thanks jcolp for the help so far.

I haven’t configured a dhcp server on my asterisk machine because my router has dhcp configured on it. So when I configure sip.conf using “host=dynamic” for both peers lambert and caleb, what I get when I type “sip show peers” the following shows up:

Name/username Host Dyn Forcerport Comedia ACL Port Status Description
caleb (Unspecified) D Auto (No) No 0 UNKNOWN
lambert (Unspecified) D Auto (No) No 0 UNKNOWN

I just don’t know what to do. I really what to register sip both on my softphone and IP phone.

Currently my IP address for my asterisk machine is from typing the command “ifconfig” when gives me the folllowing results:

eth0 Link encap:Ethernet HWaddr 94:57:A5:B0:AE:3B
inet addr: Bcast: Mask:
inet6 addr: fe80::9657:a5ff:feb0:ae3b/64 Scope:Link
RX packets:39084 errors:0 dropped:0 overruns:0 frame:0
TX packets:28109 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18868146 (17.9 MiB) TX bytes:5691678 (5.4 MiB)

lo Link encap:Local Loopback
inet addr: Mask:
inet6 addr: ::1/128 Scope:Host
RX packets:3321 errors:0 dropped:0 overruns:0 frame:0
TX packets:3321 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1418715 (1.3 MiB) TX bytes:1418715 (1.3 MiB)

When I use as the “registrar” in registering/configuring a sip account on my IP phone and softphone, it tells me “cannot register account”.

My asterisk server has been configured on a CentOS 6 operating system so I use the softphone that comes with it which is “ekiga”. Ekiga has issues with is audio. Can you please suggest which softphone to use.

jcolp, kindly help me solve this problem.


You will need to configure your phone to register using the IP address of where Asterisk is running. If it can’t then you need to look at a network level why it fails. A firewall could be blocking the traffic.

why is it that when I register my ekiga softphone on my centos with the IP of my asterisk server is says cannot register but when I use my IP gateway it rather registers easily

Off topic tail end posting is duplicate of Warnings and Errors when registering sip