Clean install, SIP connections 403 forbidden

#1

I had been having trouble getting my SIP connections to persist for more than a few seconds following a restart. I was pursuing this in another call (freePBX trunk to inbound route works - for about 20 seconds only).

I thought I’d attempt a real basic “Hello World” type install / config in order to isolate the problem.

So… I have a windows host with a Linux guest, running Asterisk.

All starts ok.
Chan_Sip_Info shows:
Host dnsmgr Username Refresh State Reg.Time
sip.voipfone.net:5060 Y hidden 45 Registered Sun, 31 Mar 2019 22:55:32
1 SIP registrations.

which seems ok.

All I want to do is see Asterisk / PBX pickup a call and do something with it. I don’t care what. I thought the simplest of “Hello World” tests would be to do a Text to Speech announcement or maybe forward to a misc destination.

I can’t get Asterisk to pick up anything.
sngrep shows:
46.31.231.185:5060 192.168.86.46:5160│Via: SIP/2.0/UDP 46.31.231.185:5060;branch=z9hG4bK742fbcb1;received=46.31.231.185;rport=5060
──────────┬───────── ──────────┬─────────│From: “07951408???” sip:07951408???@46.31.231.185;tag=VF5e4104d5faa3ffeb1cdb7c929e8f
│ INVITE (SDP) │ │To: sip:30210???@79.69.61.???:5160;tag=as31f9e7cc
22:53:21.978033 │ ──────────────────────────> │ │Call-ID: VFb6aad53abf56d550f3c14b7a870aa2@voipfone
+0.026518 │ 403 Forbidden │ │CSeq: 102 INVITE
22:53:22.004551 │ <────────────────────────── │ │Server: FPBX-14.0.5.25(13.22.0)
+0.020813 │ ACK │ │Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
22:53:22.025364 │ ──────────────────────────> │ │Supported: replaces, timer
+0.003228 │ CANCEL │ │Content-Length: 0
22:53:22.028592 │ ──────────────────────────> │ │
+0.000486 │ 481 Call leg/transaction d │ │
22:53:22.029078 │ <────────────────────────── │ │

So the connection is being “forbidden”. I thought I’d hide some IP/account/password info with “???” just in case! Is this paranoia!

I’m hoping as this is a real basic install that I’ve done nothing to mess with, we can solve this one quickly so I might proceed (cautiously) building on what’s gone before. Unfortunately I’m falling at the first hurdle!

I really thought I could just specify a trunk, specify the SIP settings and then handle the Inbound route accordingly.

External calls to the DID receive an immediate not here -> voicemail message.

REGISTER and NOTIFY calls seem to be made ok - it’s the INVITE which is “forbidden”.

Please help! Between the other call and this I’ve spent over a week on this and not really got anywhere.

VOIP services are from voipfone (sip.voipfone.net)

Thanks
Michael

0 Likes

freePBX trunk to inbound route works - for about 20 seconds only
#2

Without the complete configuration and every header of the request there isn’t enough information to see why it being rejected. Also you need to turn up the logging.

Generally people find it much easier to read the protocol logs produced by Asterisk. For a start they are complete.

0 Likes

#3

Well… with sip debug on I see this in full log
[2019-03-31 22:53:22] NOTICE[2279][C-00000000] chan_sip.c: Failed to authenticate device “07951408560” <sip:07951408???@46.31.231.185>;tag=VF5e4104d5faa3ffeb1cdb7c929e8f

Because I’ve never seen a working instance, it’s hard to know if this is correct or not. It gives the external number 07951408???@46.31.231.185 Shouldn’t that be userid@46.31.231.185? Where is it getting the external number from?

SIP PEER DETAILS
host=sip.voipfone.net
username=30210???
secret=433???
type=friend
insecure=very
nat=no

USER DETAILS
nat=no

REGISTER STRING
30210???:433???@sip.voipfone.net/30210???

Does any of that help? I’m happy to provide anything… but without having a clue where to start I’m faced with having to upload all of every log and config file?

Thanks
Michael

0 Likes

#4

That is not a valid peer section of a sip.conf file. SIP PEER DETAILS etc., are invalid keywords, and register has to be in the the general section. You obviously need a section name for the peer section.

(Also, best practice is type=peer, and insecure=very is deprecated, and most people don’t need the insecure=port that it implies.)

0 Likes

#5

Thank you for your response.

Sorry for not being clear…

On this instance I have stayed away from the conf files and have only used the PBX gui to configure. Those headings e.g. SIP PEER DETAILS was me indicating where in the GUI I had entered the details.
I’ve made the changes you suggested and here are the new screenshots (I should have used screenshots before for clarity).

image

making those changes to the SIP OUTGOING SETTINGS means I am now seeing this in the sngrep

Does that help at all? There’s nothing precious about this install. It’s really a vanilla, virtualbox install that I’m happy to try anything with. I simply want to get it to connect to my Voipfone SIP so I can start to use it. That’s it really. I’m willing to change anything / start again…

Really hoping for your help.
Michael

0 Likes

#6

It seems to register fine

0 Likes

#7

Many people here do not use FreePBX, so this is not the place to ask how to use the GUI.

0 Likes