I’ve looked at and tried a few configuration files out there, and used Patton’s web wizard. None are particularly clear about who registers with who, etc. I also had problems with “The other person has hung up” recorded message from BT, when the other party hung up the call (cured by “allow early disconnect” in the SmartNode SIP profile).
Anyway, here is a configuration file for a Smartnode 4554 dual-BRI. There is no registration or SIP authentication. It is meant for a back-to-back Asterisk <-> Smartnode setup.
Before I get started, here is the trunk configuration, from FreePBX. It is using chan_sip, not chan_pjsip. In my builds, I disable pjsip (for the time being), and move chan_sip back to the former default of UDP port 5060. This is because I use a lot of mixed equipment and the troubleshooting has been extensive, and still, some minor issues persist between PJSIP on Asterisk/FPBX and the various brands of desk phones, cordless phones, gateways, and SIP trunk providers that I use.
One thing to note: I had to turn off “Send Progress” in my ‘RingAll’ Ring Group in FreePBX. The caller did not hear a ringback tone when calling in, if the destination was this ring group.
As usual, you do not need to enter anything at all on the ‘incoming’ settings in FreePBX. Yes this is counter-intuitive, and yes this system makes both incoming and outgoing calls via the gateway, but this is just how FreePBX manages the trunk setup. I never have, and never do put anything in the ‘incoming’ settings part of the chan_sip trunk setup in FreePBX, whether I am using a SIP trunk from an ITSP (Gamma, Voiceflex), a Cisco 2811 with an E1 PRI module, or this Patton Smartnode BRI gateway.
In these configuration examples, FreePBX is on 192.168.0.101. The Smartnode Sn4554 is on 192.168.0.99
OK, so once again, this is the FreePBX chan_sip trunk configuration. Just put the following in the Outgoing ‘Peer Details’ box (change the host= to be the IP address that you use for the Smartnode).
type=friend
insecure=very
host=192.168.0.99
dtmfmode=RFC2833
Next we have the SmartNode configuration. Copy and paste this into notepad, save it, then use the import facility in the web front-end to import it. Do note the “interface WAN -> ipaddress” stuff. You can change it to “dhcp” if you like, or alter the IP address before you do the import.
#----------------------------------------------------------------#
# #
# SN4554/2BIS/EUI #
# R5.9 2012-09-05 SIP #
# 2016-12-30T14:17:37 #
# SN/00A0BA0528A1 #
# Generated configuration file #
# #
#----------------------------------------------------------------#
cli version 3.20
clock local default-offset +00:00
webserver port 80 language en
system
ic voice 0
system
clock-source 1 bri 0 1
profile ppp default
profile tone-set default
profile voip default
codec 1 g711alaw64k rx-length 20 tx-length 20
codec 2 g711ulaw64k rx-length 20 tx-length 20
fax transmission 1 relay t38-udp
fax transmission 2 bypass g711alaw64k rx-length 20 tx-length 20
fax transmission 3 bypass g711ulaw64k rx-length 20 tx-length 20
modem transmission 1 bypass g711alaw64k rx-length 20 tx-length 20
modem transmission 2 bypass g711ulaw64k rx-length 20 tx-length 20
profile pstn default
profile sip default
no autonomous-transitioning
profile aaa default
method 1 local
method 2 none
context ip router
interface WAN
ipaddress 192.168.0.99 255.255.255.0
context cs switch
national-prefix 0
international-prefix 00
routing-table called-e164 RT_ISDN_TO_SIP
route .T dest-interface IF_SIP
interface isdn IF_ISDN_00
route call dest-table RT_ISDN_TO_SIP
call-reroute emit
diversion emit
interface isdn IF_ISDN_01
route call dest-table RT_ISDN_TO_SIP
call-reroute emit
diversion emit
interface sip IF_SIP
bind context sip-gateway GW_SIP
route call dest-service SRV_HG
remote 192.168.0.101
early-disconnect
service hunt-group SRV_HG
drop-cause normal-unspecified
drop-cause no-circuit-channel-available
drop-cause network-out-of-order
drop-cause temporary-failure
drop-cause switching-equipment-congestion
drop-cause access-info-discarded
drop-cause circuit-channel-not-available
drop-cause resources-unavailable
route call 1 dest-interface IF_ISDN_00
route call 2 dest-interface IF_ISDN_01
context cs switch
no shutdown
location-service SER_LOC
domain 1 192.168.0.101
match-any-domain
context sip-gateway GW_SIP
interface IF_GWSIP
bind interface WAN context router port 5060
context sip-gateway GW_SIP
bind location-service SER_LOC
no shutdown
port ethernet 0 0
bind interface WAN router
no shutdown
port bri 0 0
clock auto
encapsulation q921
q921
permanent-layer2
protocol pp
uni-side auto
encapsulation q931
q931
protocol dss1
uni-side user
bchan-number-order ascending
encapsulation cc-isdn
bind interface IF_ISDN_00 switch
port bri 0 0
no shutdown
port bri 0 1
clock auto
encapsulation q921
q921
permanent-layer2
protocol pp
uni-side auto
encapsulation q931
q931
protocol dss1
uni-side user
bchan-number-order ascending
encapsulation cc-isdn
bind interface IF_ISDN_01 switch
port bri 0 1
no shutdown