I have just installed Asterisk on my ubuntu server and trying to get it running
I have defined two accounts in sip.conf and now want to do a basic successful call using X-lite sip phone. The registration is fine, the ringing is OK and the call in general looks normal
but still no voice can be heard and lead the call to be disconnected after!.. checking the logs
chan_sip.c:3641 retrans_pkt: Retransmission timeout reached on transmission Mjk3MGU1NjgxZWQwM2E3MjhjZmFiNzhjOGVjZjg5ZTc for seqno 2 (Critical Response)
I have a very simple sip configuration
[general]
context=internal
allowguest=no
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=no
disallow=all
allow=ulaw
alwaysauthreject=yes
canreinvite=no
nat=yes
session-timers=refuse
localnet=/255.255.255.0
What could be the cause for this error?
One more question, I can see in the configuration an option to add a registrar using the data of SIP service provider, but what if I want my server to be the service provider… should I add this part in my configuration and why should we need another SIP provider?
Asterisk is probably not receiving the ACK to the 200 OK for the incoming call. A SIP trace would confirm this.
That tends to suggest a firewall or NAT problem.
Note that you have localnet without any NAT settings (nat= is not one). If you really need local net, you also need one of externip; externhost, or stunaddr.
Thanks for your reply.
So what can I do to overcome the NAT issue?
My target is to have some running internal calls, and I thought adding a localnet with the machine IP would do that!
I have added externip to my configuration and still doesn’t work?
You only need localnet if you have also defined a public address and the the local network is not the one directly connected to the local interface.
Fixing NAT (and firewall) problems needs a level of detail of your configuration that you haven’t provided. Normally, if you provide enough information, the problem should be obvous to you.
I have taken a network dump capture to my call, and I can see invite,OK and ACK
Indeed the connection is established and the ringing done but still the voice packet can’t be reached some how!
What are the other configuration I can look at to find the issue?
What looks funny is that both X-Lite and Asterisk have the same public IP address, I would expect them both to have a private address. I suspect the NAT configuration on the X-Lite is broken, and that there are also issues with the router.
The Asterisk server is on a different network than the xlite client which is installed on my laptop, so I am using the public IP in both to connect them together.
I tried xlite from different laptops and networks, do you really think the problem is in the client site not the server?
Is there any other configuration files I can check on the server side?
They shouldn’t have the same IP address in that case. You need to work out which IP addresess they should have and fix the one that it is using the wrong one.