Outgoing calls do not work with error 403 with Nextiva Trunk

I am trying to make my asterisk server work with Nextiva’s trunking service. My asterisk server is behind a Linux computer acting as a router. Incoming calls seem to work fine and the people at Nextiva believe my registration is correct. I am new to asterisk and am not entirely sure what information is relevant to the problem. Below I will provide a shortened (to remove what I hope are irrelevant settings for other contexts) and edited (to remove passwords) versions of my sip.conf and extensions.conf as well as the error from the asterisk CLI. I am hoping someone can point me to where I might be going wrong.

extensions.conf:
; extensions.conf - the Asterisk dial plan

[phonetest]
include => internal

[internal]
exten => 2002,1,Dial(SIP/2002)
exten => 2002,n,Hangup()

exten => [MyCell],1,Goto(outgoing,[MyCell],1)
exten => incoming,1,Goto(incoming,s,1)

[outgoing]
exten => [MyCell],1,Set(CALLERID(name)=[NextivaNumber])
exten => [MyCell],n,Dial(SIP/[MyCell]@nextiva)
exten => [MyCell],n,Hangup()

[incoming]
exten => [NextivaNumber],1,Dial(SIP/2002)
exten => [NextivaNumber],1,n,Hangup()

; The “General” category is for certain variables.
;
[general]

sip.conf:

[general]
context=incoming ; Default context for incoming calls. Defaults to ‘default’
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all)
tcpenable=yes ; Enable server for incoming TCP connections (default is no)
tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces)
transport=tcp ; Set the default transports. The order determines the primary default transport.
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
bindport=5062 ; nextiva requested this port
port=5062 ; nextiva requested this port
defaultexpiry=120
maxexpiry=3600
nat=force_rport,comedia
externip=[MyExternalIP]
localnet=192.168.0.0/255.255.0.0
; Register and get calls from Nextiva, to our number [NextivaNumber]
register => [NextivaNumber]:[NextivaPassword]@[NextivaDomain]:5062/[NextivaNumber]

[nextiva]
type=peer
; auth=plaintext
secret=[NextivaPassword]
authuser=[NextivaNumber]
username=[NextivaNumber]
host=[NextivaDomain]
fromuser=[NextivaNumber]
callerid=[NextivaNumber]
fromdomain=[NextivaDomain]
remotesecret=[NextivaPassword]
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
; allow=alaw
; allow=gsm
; allow=g722 Nextiva support says turn this back on if I can get it to work
insecure=port,invite
context=incoming
qualify=yes
; trustrpid=yes
; sendrpid=pai
; session-timers=refuse

[2002]
host=dynamic
username=2002
secret=[2002Password]
callerid=2002
context=phonetest
type=friend

The Error:
WARNING[16676][C-00000071]: chan_sip.c:23024 handle_response_invite: Received response: “Forbidden” from ‘sip:[NextivaNumber]@NextivaDomain;tag=as514bf01d’

As far as I can tell, 403 indicates that something that I am sending like password is wrong. However, since I get incoming calls I do not know what to think.

Ask Nextiva to check on the Invite request what it is wrong

There are many reason why inbound could works, there is not authentication request to the nextiva inbound calls

  1. Insecure=invite on the nextiva trunk

2 guest calls posibly enabled by defaults

I

Thank you for the reply. I talked to them about it previously and they said that they imagined my invite was probably not proper, but would not say why. I tried comparing my invite packet to an invite packet from an X-lite set up that I got to work both ways. Would the packet capture help? If so how do I post a packet capture?