SOLVED: Nextiva config - incoming works for limited time, outgoing continues to work

I've recently decided to go with Nextiva for voip service, I'm using their system, but due to needed customizations, I'm using my FreePBX system for the PBX Automation.

I've set up trunk as follows:
[Nextiva]
username=<username>
user=<username>
type=peer
secret=<password>
qualify=yes
nat=no
insecure=port,invite
host=<nextiva_server>
fromuser=<username>
fromdomain=<nextiva_server>
dtmfmode=rfc2833
dtmf=auto
disallow=all
context=from-trunk
allow=gsm&ulaw&alaw

I asked their tech support about the issue, and they told me I needed to set the register expiration timer to 60 seconds. I assume that is defaultexpiry, which is usually set to 120, so I changed it and verified that every 1 minute the service is reregistering.

I do receive an error in log and not sure why, error:

<--- SIP read from <nextiva_ip>:5060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP <EXT_IP>:5060;branch=z9hG4bK0c9b8ab4;rport
To: <sip:<nextiva_server>>;tag=3465239340-358372
From: "Unknown" <sip:Unknown@<EXT_IP>>;tag=as14681c39
Call-ID: 0a78e6f2458a9568678f472319630c83@<EXT_IP>
CSeq: 102 OPTIONS
Allow: INVITE, BYE, OPTIONS, CANCEL, ACK, REGISTER, NOTIFY, INFO, REFER, SUBSCRIBE, PRACK, UPDATE
Contact: <sip:Unknown@<EXT_IP>:5060>
Content-Length: 0

Maybe have something to due with "Unknown" / or need to send some credentials with request? Not sure how I would do either one of those things.

When I first start service, works great, can receive calls and send calls with no problems. After connected for a while (seems like around 10 to 15 minutes), the incoming connection dies, but the outgoing connection is still functioning.

I can verify that Asterisk is reregistering every minute (like I was told was needed), but connection still is dying...

Any hints on what could be the problem? or anyone who get Nextiva service to work with FreePBX?

Thanks

Hi There,

Could you provide some more information on how you got this to work?

Thanks,
j

The simple answer is - I needed to use the username at the end of register string, I was using the phone number. Here is my setup that is now working:

Trunk Name: Nextiva

PEER Details:
host=[Nextiva Host]
qualify=no
username=[Authentication Name]
auth=md5
secret=[Authentication Key]
type=peer
insecure=invite,port
fromuser=[Authentication Name]
fromdomain=[Nextiva Host]
disallow=all
allow=ulaw
sendrpid=yes
dtmfmode=rfc2833
nat=no

USER Context: [Authentication Name]
USER Details:
auth=md5
secret=[Authentication Key]
type=user
context=from-internal
disallow=all
allow=ulaw
sendrpid=yes

Register String: (Here is where I screwed things up the 1st time):
[Authentication Name]:[Authentication Key]@[Nextiva Host]/[Authentication Name]

I was thinking after the / in register string I should be putting the phone number, but that was wrong, and that was what was causing my problems - it needed to be the Authentication Name.

If anyone needs to connect Nextiva to FreePBX, to find out Host, and Authentication Name / Key, create an employee, and you will be assigned the key/name.

One other thing, if you want Incoming Route rules for the Nextiva line, use your Authentication Name as the DID Number, not your phone number.

I was told by Nextiva that I could add more items in the above-listed configuration, but it now works for me.

1 Like