Hi Guys
Recently, I meet a issue, I find a solution as well. But I don’t know how it will happen.
I have a 1 FXS and 1 FXO gateway from voptech.com, they call VG3X-1s/1.
I register FXS port as 701, and register 801 to my asterisk. Both already connect into asterisk. No Problem
701/701 119.139.245.43 D N 5060 Unmonitored
801/801 119.139.245.43 D N 5060 Unmonitored
The following is sip.conf setting
[701]
type=peer
context=LocalSets
secret=50
host=dynamic
nat=yes
secret=ast!@34
dtmfmode=auto
disallow=all
allow=ulaw
allow=alaw
allow=gsm
directmedia=no
qualify=no
[801]
type=peer
host=dynamic
nat=yes
dtmfmode=auto
disallow=all
allow=ulaw
allow=alaw
allow=gsm
directmedia=no
secret=10
qualify=no
According to my extension.conf setting. 801 dial 200, my asterisk will play hello world voice.
And I already do binding number 200 in my FXO Port setting.(some one dial my FXO number-PSTN number, it will send 200 to my asterisk)
The issue is when I use my cell phone-18688977086 call PSTN number. And my gateway send call 200 to asterisk. But asterisk reject my call.(My FXO open Call ID detection alrady)
In CLI, sip set debug peer 801, I find the following
— (14 headers 15 lines) —
Sending to 119.139.245.43:5060 (NAT)
Using INVITE request as basis request - 13403379281227073496-0@192.168.1.191
Found peer ‘701’ for '18688977086’ from 119.139.245.43:5060
[2012-06-22 00:05:28] WARNING[10328]: chan_sip.c:14413 check_auth: username mismatch, have <701>, digest has <801>
[2012-06-22 00:05:28] NOTICE[10328]: chan_sip.c:22579 handle_request_invite: Failed to authenticate device sip:18688977086@208.111.42.239;tag=13403379281340337898-1
The 701 is the FXS number, I don’t understand why, asterisk will use 701 as authenticate to verify my FXO 801. I think that’s why, asterisk will reject my FXO’s call.
Could anyone tell me why asterisk will use 701 verify my FXO 801. why asterisk don’t use 801?
Another interesting thing is, if I turn off the call ID detection in FXO Port. Asterisk will use 801 to verify my FXO, so everything is perfect.
The solution to let asterisk don’t reject my FXO 's call, is turn off the verify. I use inseure=invite in my sip.conf setting in 701 and 801.