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 126.96.36.199 D N 5060 Unmonitored
801/801 188.8.131.52 D N 5060 Unmonitored
The following is sip.conf setting
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 184.108.40.206:5060 (NAT)
Using INVITE request as basis request - firstname.lastname@example.org
Found peer ‘701’ for '18688977086’ from 220.127.116.11:5060
[2012-06-22 00:05:28] WARNING: chan_sip.c:14413 check_auth: username mismatch, have <701>, digest has <801>
[2012-06-22 00:05:28] NOTICE: chan_sip.c:22579 handle_request_invite: Failed to authenticate device sip:email@example.com;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.