You will receive the the SIP username, password, and registration server from your N2Net engineer. You will both primary and secondary registration server. You may set up two trunks with the same credentials and configure your outbound route in a fail over configuration.

Add a new SIP Trunk

Trunk Name: N2Net UniVoice

Outbound CID: Make this the default outgoing caller ID for the trunk.

Outgoing Settings

Trunk Name: n2net-univoice-peer

Peer Details:

type=peer
secret= ;SIP PASSWORD
username= ;SIP USERNAME
host=REGISTRATIONSERVER
dtmfmode=rfc2833
context=from-pstn
canreinvite=no
disallow=all
allow=ulaw
insecure=port,invite
fromuser= ;SIP USERNAME
fromdomain= ;REGISTRATION SERVER

Incoming Settings

User Context: n2net-univoice-user

User Details:

type=peer
secret= ;SIP PASSWORD
username= ;SIP USERNAME

Registration

SIPUSERNAME:SIPPASSWORD@REGISTRARSERVER/from-pstn ;Enter you own incoming context if changed.

Setting Outgoing Caller ID

In order to send a custom outbound caller ID through N2Net using either the extensions or outgoing routes outgoing CID setting you must add the P-Asserted-Identity header to the SIP Request. You do this by editing the /etc/asterisk/extensions.conf file.

Find the below lines.

[macro-dialout-trunk-predial-hook]
exten => s,1,MacroExit()

Edit it to reflect the below.

[macro-dialout-trunk-predial-hook]
exten => s,1,SipAddHeader(P-Asserted-Identity: <sip:${CALLERID(num)}@REGISTRATIONSERVER>)
exten => s,n,MacroExit()

Be sure to change the value of REGISTRATIONSERVER to the primary registration server giving to you.

After these changes you must either do a “dialplan reload” at the Asterisk CLI OR reload configuration from the web interface.



Last Updated: June 10th, 2016