VoIP configuration
U
SER
G
UIDE
332
set voip isdn bri1 te
set voip isdn bri1 term off
set voip trunk pstn create bri1
set voip trunk pstn bri1 update
set voip trunk sip create opensips
set voip trunk sip opensips authentication-user-id 082310010
set voip trunk sip opensips registrar 10.3.10.110
set voip trunk sip opensips authentication-password 1234
set voip trunk sip opensips enable yes
set voip call-mng inbound bri1topots4 source-trunk bri1 destination pots4 incoming-number all-number
set voip on
NOTE 2: dial plan for ISDN ports
In alternative to the traditional dial plan, based on explicit rules, you can use another dial plan,
based on Asterisk's Macro, that has been implemented specifically for the ISDN NT ports: the call is
diverted to a trunk, according to the ID Caller contained in the
setup
message coming from the
ISDN telephone/PBX.
The ID Caller is processed in this way: a
loop
is executed on every SIP trunk configured (single or
multi line). If the trunk is single-line, the ID Caller is compared to the trunk username. If the trunk
is multi-line (GNR), the ID caller must fall in the set of extensions associated with the GNR trunk.
If there is a match, the trunk is identified to place the outgoing call.
In this manner it is possible to connect an ISDN PBX to any CPE's ports and to exit on the same SIP
trunk without needing to delete or recreate the
outbound
rules.
If a match is not found at the end of the scan cycle, the call is diverted to a default SIP trunk
(previously set). If the default trunk had not been created, the call is rejected.
To test this, you have to create at least two trunks, one single and one multi-line (GNR).
set voip trunk sip opensipgnr authentication-user-id 08231000*
set voip trunk sip opensipgnr registrar 10.3.10.110
set voip trunk sip opensipgnr authentication-password 1234
set voip trunk sip opensipgnr codec-type alaw
set voip trunk sip opensipgnr range start-number 082310000 end-number 20
set voip trunk sip opensipgnr enable yes
set voip trunk sip create fw1
set voip trunk sip fw1 authentication-user-id 028927434
set voip trunk sip fw1 registrar 10.252.47.71
set voip trunk sip fw1 authentication-password test
set voip trunk sip fw1 codec-type alaw
set voip trunk sip fw1 enable yes
To choose a dynamic dial plan after a traditional one with explicit rule, use:
set voip call-mng isdn-dialplan default
To set a default trunk:
set voip sip defaulttrunk fw1