SETUP VOIP GATEWAY FXO OPENVOX iAG

configuration
freepbx
Tags: #<Tag:0x00007f7027db8be0> #<Tag:0x00007f7027db8a28>

(Dimitris) #1

Hello guys !
Once again i am in your mercy for some help with my new voip gateway. i want to utilize this regardless of my sip trunks just to connect my pstn line to my freepbx.

I am running FreePBX 14.0.13.26
This is the device

The issue i am having is i cant seem to get it registered even though i have been through other posts about other gateways in our blog.

Freepbx ip: 192.168.1.50
Voip gateway: 192.168.1.16
user and pass for the trunk account 2112133281 (same as pass)

This is the TRUNK SETUP:

thats the chan sip bind ports on freepbx:

this is the chan sip registrations:

and:

which by changing the trunk’s details to:

host=192.168.1.16
type=peer
username=2112133281
secret=2112133281
qualify=yes
port=5070
nat=yes
insecure=port,invite
context=from-trunk
dtmfmode=rfc2833
careinvite=no
disallow=all
allow=alaw&ulaw

and now shows :

So the GATEAWAY’S dashboard shows this screen:

These are the sip settings on the gateway:

and these are the advanced sip settings:

Whats wrong guys i cant figure it out please advise.


#2

When you change Bind Port in Asterisk SIP Settings, you must restart (not just reload) Asterisk.

Assuming chan_sip trunk has host=dynamic: In the VOX, Advanced Registration Options, change Port to 5070 (to match Asterisk’s Bind Port).

If it still won’t register, see whether registration attempts result in anything in the Asterisk Log. If so, post that. If not, see whether running sngrep on the PBX shows the attempts. If so, it’s a FreePBX firewall issue. If sngrep also shows nothing, capture traffic on the VOX or on the wire to see what the VOX is sending when trying to register.


(Dimitris) #3

@Stewart1
first of all thanks for being the only one to reply !
I was expecting more support guys to hop in but anyways…
I did manage to get it working BUT the registration on the GATEWAY (OPENVOX) says
SIP STATUS: NO AUTHENTICATION
RESPONSE CODE: 403 FORBIDDEN
please check my screenshots.
Also this is my pstn trunk PEER DETAILS:

host=192.168.1.16
type=friend
username=2112133281
secret=2112133281
qualify=yes
port=5070
nat=yes
insecure=port,invite
context=from-trunk
dtmfmode=rfc2833
careinvite=no
disallow=all
allow=alaw&ulaw


#4

You can have the Vox register to the PBX, in which case I believe you need
host=dynamic
and remove the
port=5070
If it still won’t register, post the log for an attempted registration, including SIP trace.

Or, you can set it up statically (as you have it), but then you need to turn off registration at the Vox.


(Dimitris) #5

@Stewart1
Just tried it but no its worse actually it wont register at all if host = dynamic and delete the port=5070


#6

Anything in the Asterisk log?


(Dimitris) #7

would it help the log with your suggested settings or the current settings ?


#8

With host=dynamic and no port= setting, turn on sip debug, then reboot the VOX so it will try to register.
Past the log (including SIP trace) at pastebin.freepbx.org and post the link here.


(Dimitris) #9

@Stewart1
https://pastebin.freepbx.org/view/0f095891
I notice on the bottom line it says
[2020-10-16 23:04:29] NOTICE[11993] chan_sip.c: Registration from ‘<sip:2112133281@192.168.1.50>’ failed for ‘192.168.1.16:5070’ - Wrong password

But user and pass are the same for the trunk (my pstn number 2112133281)


#10

At the Asterisk command prompt, type
sip set debug on
and reboot the Vox to retry the registration, then paste another log. With luck the SIP trace may show something strange.


(Dimitris) #11

@Stewart1

OK this is the debug info https://pastebin.freepbx.org/view/83f214ad
(thanks for your effort man really appreciate it !!!)


#12

I’m quite puzzled here. I ran a script to compute the response tag of the Authorization header for your password and it indeed matches what the Vox sent. So, I don’t know why Asterisk didn’t accept it. Possibly, there is another entry matching the username. Or, there is a bug and the Asterisk config file didn’t get updated or Asterisk didn’t process it correctly.

Try restarting Asterisk. If that doesn’t help, look at /etc/asterisk/sip_additional.conf and see if there are any contexts containing 2112133281 other than the intended one for your trunk. If there are none, compare the entries for your trunk with what you put in PEER details. If they appear ok, please paste them and post the link.


(Dimitris) #13

asterisk restart using “core reload” command ?


(Dimitris) #14

can i provide you with my anydesk so that you can take a look please ?


#15

Sorry, I don’t have time for that now.

However, I vaguely recall a chan_sip trunk bug that for incoming registration, required the trunk name and username to match.

Try deleting the Vox trunk, then creating a new trunk named 2112133281 (on both General and SIP Settings tabs) with PEER details:

host=dynamic
type=friend
username=2112133281
secret=2112133281
qualify=yes
context=from-trunk
dtmfmode=rfc2833
careinvite=no
disallow=all
allow=alaw&ulaw

User Details and Register String should be left blank.

Submit, Apply Config, then restart Asterisk with
fwconsole restart
reboot Vox and with luck it will register. If not, I recommend either trying a pjsip trunk or a static configuration (turning off registration on the Vox).


(Dimitris) #16

YEEESSSS!!!

man thank you!!! what what was it ???