Inbound VOIP SIP calls is rejected

Dear All,

Please help me on a problem that I am facing as below:

Basically, I am trying to achieve the below scenario:

softswitch1 —> asterisk 1.6 —> softswitch2

from the asterisk, it has already managed to register itself to softswitch2 and from an extensions or clients in asterisk 1.6 are able to terminate a call to softswitch2.

But when I tried to make a call from softswitch1 to asterisk, I am getting the below error for the CLI commands:

May 26 18:45:53] NOTICE[3262]: chan_sip.c:19990 handle_request_invite: Failed to authenticate device 1234 sip:192.168.2.14;tag=8690e9b46762453781e9da1598aa51c1

Please do help me why is this issue happening?

Thank You.

Looks like your username and/or password is incorrect for softswitch 1…

Actually it looks like the softwitch has the wrong user and password for accessing Asterisk!

Dear David55/ Mket,

Thanks for replying my post.

Sorry for not clearing up the call scenario.

Actually, the scenario is as below:

sip device1/client1 --> softswitch1 --> asterisk 1.6 --> softswitch2 --> sip device2/ client2

sip device1/client1 are already registered to softswitch1 and the same goes to sip device2 to softswitch2.

And also asterisk 1.6 has successfully registered to softswich2 as well.

A client device registered on asterisk 1.6 can terminate a successful call to sip device2/ client2 through softswitch2.

But when I tried passing a call from sip device1 through softswitch1 to the asterisk 1.6 I have the below mentioned error code:

May 26 18:45:53] NOTICE[3262]: chan_sip.c:19990 handle_request_invite: Failed to authenticate device 1234 sip:192.168.2.14;tag=8690e9b46762453781e9da1598aa51c1

If the error meant that the username and password is wrong, does that means that if I need to pass a call to asterisk, I need to register the softswitch1 to asterisk as well?

Appreciate all for helping me.

Thank You.

If there is a secret in the sip.conf entry for softwswitch1, softswitch1 needs to be configured to use that password.

Please get a SIP trace of the dialogue between softswitch1 and Asterisk. Also please provide the sip.conf entries for general and softswitch1.

Dear All,

Thanks for helping me out here. Sorry for the late reply as it seems like the forum is down for a few days until now.

I have tried the following method instead:

sip/ client device1 —> asterisk 1.6 ----> softswitch2 ----> sip/client device2

sip device1 registered to asterisk and sip device2 registered to softswitch2.

The call flow mentioned above is already working fine.

Then I tried the reversal:

sip/client device2 --> softswitch2 --> asterisk 1.6 —> sip/ client device1

and guess what… the same error messages still appears in the CLI:

[Jun 2 20:04:55] NOTICE[3612]: chan_sip.c:19990 handle_request_invite: Failed to authenticate device 1234 sip:172.28.0.133;tag=21aa2c94b18442a099e7059715ca9d87

I tried tracing the call using wireshark, and basicall I can see that the softswitch2 is sending an INVITE to the asterisk 1.6, and immediately after that the asterisk 1.6 replied with a “403 Forbidden” , do let me know if you guys would like to trace file to look at.

And below are the sip.conf entries for general and the softswitch1 (cpgw1.cpm.com.my)

/etc/asterisk/sip.conf

[general]
context=from_outside
realm=CPMDOMAIN
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
disallow=all
allow=ulaw
allow=gsm
language=en

register => 60998888:1234@172.28.0.133

[xlite1]
type = friend
host = dynamic
secret = xlite1
context = users

[xlite2]
type = friend
host = dynamic
secret = xlite2
context = users

[xlite3]
type = friend
host = dynamic
secret = xlite3
context = users

[cpgw1.cpm.com.my]
type = peer
username = 60998888
fromuser = 60998888
fromdomain = CPMDOMAIN
secret = 1234
canreinvite = no
insecure = invite,port
host = 172.28.0.133
deny = 0.0.0.0/0
permit = 172.28.0.0/255.255.255.255
disallow = all
allow = gsm
allow = ulaw
allow = alaw
qualify = yes
nat = no

and

/etc/asterisk/extensions.conf

[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

[global]

[users]

[from_outside]
include => inside

[inside]
exten => 6001,1,Dial(SIP/xlite1,10)
exten => 6002,1,Dial(SIP/xlite2,10)
exten => 6003,1,Dial(SIP/xlite3,10)

Thanks again. Appreciate for all your help.

permit = 172.28.0.0/255.255.255.255 is wrong.

Dear david55,

Thanks for looking into my case.

That was the problem all along. Once I changed it to:

permit = 172.28.0.0/255.255.255.0

Its working perfectly fine. Even on the 1st transit/passthrough scenario.

A simple silly mistake that I made.

Appreciate all the help that you guys have given to me.

Thank You.