SIP trunk - 403 forbidden error

Hello

My setup

FreePBX - 192.168.1.81
CO/PSTN Matrix Gateway -192.168.1.240
BSNL WINGS SIP service (India)
Pfsense+ firewall with NAT and firewall rules
Dynamic public IP allocation by ISP - attached to DDNS domain by pfsense.
softphone - GSwave Lite on android and on iOS

My Issue -

I am able to register with wings service on my phone using both home wifi as well as on cellular connection.

But when i try to make outgoing calls through freePBX after registering the wings service i get error 403 - forbidden.

I can receive calls though.

Please find the settings of my phone as well as from the freePBX below, any help??

**Phone - **

<?xml version="1.0" encoding="utf-8"?>
						<AccountConfig version="1">
						<Account>
						<RegisterServer>cg.voip.ims.bsnl.in</RegisterServer>
						<OutboundServer>pun.sbc.ims.bsnl.in:80</OutboundServer>
						<UserID>mobilenumber</UserID>
						<AuthID>mobilenumber</AuthID>
						<AuthPass>password</AuthPass>
						<AccountName>BSNL</AccountName>
						<DisplayName>mobilenumber</DisplayName>
						<Dialplan>{x+|x+|++}</Dialplan>
						<RandomPort>0</RandomPort>
				     <SecOutboundServer>ahd.sbc.ims.bsnl.in:80</SecOutboundServer>
						<Voicemail></Voicemail>
						</Account>
						</AccountConfig>

FreePBX -

username=mobilenumber
secret=password
qualify=yes
insecure=very
host=cg.voip.ims.bsnl.in
outboundproxy=pun.sbc.ims.bsnl.in
outboundproxyport=80
fromuser=mobilenumber
fromdomain=cg.voip.ims.bsnl.in
dtmfmode=inband
dtmf=inband
canreinvite=yes
authname=mobilenumber
auth=mobilenumber
type=peer
port=5060
nat=yes
allow=all
registertimeout=3600

I have attached sngrep logs and asterisk call logs for more info.

https://pastebin.freepbx.org/view/c0ccb86b

Replace
allow=all
with
disallow=all
allow=ulaw&alaw

Also, the syntax for outbound proxy has changed in various Asterisk versions. Try:
outboundproxy=pun.sbc.ims.bsnl.in:80
or
port=80
(What you have now is clearly not working, because sngrep is showing the INVITE going to the outbound proxy on port 5060. If neither of these work, confirm with sngrep that it is sending to port 80, as there may now be a different error.)

If you still have trouble, is it feasible to use a pjsip trunk?

and just like that it started working

thanks mate.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.