Echotest with Asterisk + x-lite


#1

Hello everybody

I need your help. I am a beginner with SIP. I have been struggling this issue for more than two days and still could not solve it.
What I am doing is very simple to get echotest work with x-lite and asterisk. My x-lite can connect to asterisk server and I can hear the echo. But after about 32 seconds, the connection got disconnected. And I got a warning message said “no reply to our critical packet”, please see below.

It seems to me there is some wrong with my config. All I have tried all kinds of setting combinations includes my router setting.

I am using X-lite 4.0 for mac
Asterisk 1.8.5.0 on a Linux box with a static IP.
My router is NETGEAR WNR2000

Please help

Thanks
-Joe

Here is my Asterisk setting
==sip.conf==
[6787392656]
type=friend
username=6787392656
secret=994
nat=yes
dtmfmode=rfc2833
callerid="" <9990002>
host=dynamic
canreinvite=no
context=test_connection

==extensions.conf=
[test_connection]
exten => _X.,1,Answer()
exten => _X.,n,Playback(demo-echotest)
exten => _X.,n,Echo()
exten => _X.,n,Playback(demo-echodone)
exten => _X.,n,Hangup()

I am using x-lite 4.0 for mac.
=setting of x-lite
User ID: 6787392656
Domain: 74.50.105.133
Password:994
Display Name: phone999
Authorization name:(leave blank)
Register with domain and receive calls – checked
Domain – selected

Everything else uses default value

===Some message from asterisk -r command====
Aug 2 15:28:15 WARNING12552: chan_sip.c:3527 retrans_pkt: Retransmission timeout reached on transmission MjJjZDQyNmJjYzc2YWMxNWQ3OWVhZTY0NjM5MjMyYmM. for seqno 2 (Critical Response) — See wiki.asterisk.org/wiki/display/ … nsmissions
Packet timed out after 32000ms with no response
Aug 2 15:28:15 WARNING12552: chan_sip.c:3556 retrans_pkt: Hanging up call MjJjZDQyNmJjYzc2YWMxNWQ3OWVhZTY0NjM5MjMyYmM. - no reply to our critical packet (see wiki.asterisk.org/wiki/display/ … nsmissions).
== Spawn extension (test_connection, 1234, 3) exited non-zero on 'SIP/6787392656-0000039b’
Scheduling destruction of SIP dialog ‘MjJjZDQyNmJjYzc2YWMxNWQ3OWVhZTY0NjM5MjMyYmM.’ in 32000 ms (Method: INVITE)
set_destination: Parsing sip:6787392656@69.114.155.43:34586 for address/port to send to
set_destination: set destination to 69.114.155.43:34586
Reliably Transmitting (NAT) to 69.114.155.43:34586:
BYE sip:6787392656@69.114.155.43:34586 SIP/2.0


#2

X-Lite has broken re-invite support (it ignores, rather than rejecting).

You must set directmedia (canreinvite on older systems) to no when using it.


#3

Thanks David55
I did a test as you suggested. It didn’t solve the problem. You are right on “x-lite has broken re-invite”. It seems that Asterisk tried 10 times to send “OK” to x-lite for INVITE and didn’t get “ACK” back from x-lite.

I also test to connect my MacBook directly to the cable (Cablevision). The echotest works perfectly. It makes me think that somehow the “OK” message didn’t reach x-lite. So it seems that the link between my router and x-lite is broken broken.

But I also tried all setting combinations I can think about for NETGEAR WNR2000 and X-lite. I am running out of idea now.

Thanks
-Joe

[6787392656]
type=friend
username=6787392656
secret=***
nat=yes
dtmfmode=rfc2833
callerid="jianfeicheng@yahoo.com" <9990002>
host=dynamic
directmedia=no
context=test_connection


#4

Losing the ACK, but receiving the OK (there will be no RTP port data for one direction without it, so echo wouldn’t work) is strange. The re-invite case I mentioned was when Asterisk send a second invite to the phone.


#5

The router is broken and does not support SIP:
wnr2000.com/

Get a different router, preferably something you can put openwrt on.


#6

Thanks David55 and Thor

Thor, you are right that WNR2000 doesn’t work with SIP. Luckily, I had a old Netgear router and I switched to old one, everything work perfectly. What a big wast of my two days struggling.

Thanks again.
-Joe


#7

You could probably use WNR2000 if you switched to TCP instead of UDP.


#8

Thanks Thor. Will try it when I get a chance.