Create sub-account(s) for your DID(s) at Vitelity and be certain that the routing method(s) for each sub-account is set as
SIP Server (instead of SIP Device - which would be the choice for use with an ATA device).
In FreePBX, configure both incoming and outgoing aspects of your Vitelity trunk on the trunk configuration page, but be certain that the Trunk Name in the outgoing settings portion is different from what you use for the User Context in the Incoming Settings portion of the trunk configuration page.
Vitelity Outgoing Settings:
Trunk Name: vitel_out1
type=friend
dtmfmode=auto
username=[subaccount_name]
secret=[yoursecret]
fromuser=[subaccount_name]
trustrpid=yes
sendrpid=yes
context=from-trunk ; (this could be ext-did or from-pstn as well)
canreinvite=no
host=outbound.vitelity.net
Vitelity Incoming Settings:
User Context: vitel_in1
type=friend
dtmfmode=auto
username=[subaccount_name]
secret=[yoursecret]
context=from-trunk ; this could be ext-did or from-pstn as well)
insecure=port,invite
canreinvite=no
nat=yes
host=inboundNN.vitelity.net
Register String:
[subaccount_name]:[yoursecret]@inboundNN.vitelity.net:5060
Notes: for the above:
[subaccount_name] is the sub-account that
you assign in your Vitelity account for the DID you are configuring.
[yoursecret] is the password that you assign in your Vitelity account for the DID being configured
inboundNN is the server address that Vitelity assigns when you configure your subaccount(s) (found at the top of the SubAccounts page)
All Vitelity outbound DIDs use the same server:
outbound.vitelity.net
Don't include the brackets "[ ]" used in the illustration above in your configuration.
The above are used for several DID from Vitelity in my system ... all work, in and out, without problems.
/Pete./