This is a practical example of RonR's elegant design. Please feel free to point out typo's, mistakes and things which are not clear. Between us all we might bring some clarity to this subject.
This example looks at the settings for OBi 1. There are four OBi devices in this network. This list shows their public IP address, router, local IP address, spX to be used for SIP dialling / receiving with corresponding UserAgentPort and userid.
@bill.ddns.me.uk – ROUTER -192.168.1.10 OBI 1 sp2 5061 userid = bill1
192.168.1.12 OBI 2 sp2 5071 userid = bill2
192.168.1.13 PhonerLite 5064 userid = billp
@anne.ddns.co – ROUTER -192.168.1.10 OBI 3 sp1 5060 userid = anne1
@hank.ddns.co – ROUTER -192.168.1.10 OBI 4 sp2 5061 userid = hank1
Example OBi 1 dialling through its own trunks:
18005551212 -> Local PrimaryLine
**1 18005551212 -> Local SP1 Service
**2 18005551212 -> Local SP2 Service
**8 18005551212 -> Local LINE Port
**9 200123456 -> Local OBiTALK Service
Example OBi 1 dialling through OBi 3's trunks:
3*18005551212 -> OBi 3 PrimaryLine
3**1 18005551212 -> OBi 3 SP1 Service
3**2 18005551212 -> OBi 3 SP2 Service
3**8 18005551212 -> OBi 3 LINE Port
3**9 200123456 -> OBi 3 OBiTALK Service
Assume OBi 1 Primary Line is sp1.
Voice Services -> SP2 Service -> X_InboundCallRoute (SP2 must be configured for SIP) (OBi110):
{(Mtsc)>(<*1:>(Msp1)),(Mtsc)>(<**1:>(Msp1)):sp1},{(Mtsc)>(<*2:>(Msp2)),(Mtsc)>(<**2:>(Msp2)):sp2},
{(Mtsc)>(<*8:>(Mli)),(Mtsc)>(<**8:>(Mli)):li},{(Mtsc)>(<*9:>(Mpp)),(Mtsc)>(<**9:>(Mpp)):pp},
{(Mtsc)>**0:aa},{(Mtsc)>***:aa2},{(Mtsc)>(Mp2p):sp2},{(Mtsc)>(Msp1):sp1},{(Mtsc)>0:ph},{(Mtsc):},{ph}
User Settings -> User Defined DigitMaps -> User Defined Digit MapX
Label : tsc
DigitMap : (bill2|billp|anne1|hank1)
This is a list of trusted OBi and SIP client userid's that are allowed to use single-stage dialing on this OBi. Any reserved characters (m, M, s, S, x, X) in userid's must be surrounded by single quotes. If no other OBi's or SIP clients are allowed to use single-stage dialing on this OBi, the DigitMap may be left empty: ()
User Settings -> User Defined DigitMaps -> User Defined Digit MapX
Label : p2p
DigitMap : (<2*:>(@@.)<:@192.168.1.12:5071>|<3*:>(@@.)<:@anne.ddns.co:5060>|<4*:>(@@.)<:@hank.ddns.co:5061>)
(:sip_port may be omitted for 5060/SP1).
This is a list of destination OBi's through which calls from this OBi or its SIP clients can be initiated. If you do not wish to initiate calls through other OBi's from this OBi or its SIP clients, the DigitMap may be left empty: ()
Change [1-9]x?*@@. to <P2P>(Mp2p) in the PHONE Port and Auto Attendant DigitMap's:
Physical Interfaces -> PHONE Port -> DigitMap:
(<P2P>(Mp2p)|[1-9]S9|[1-9][0-9]S9|911|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))
Voice Services -> Auto Attendant -> DigitMaP:
(<P2P>(Mp2p)|[1-9]|[1-9][0-9]|<00:$1>|0|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))
Change {([1-9]x?*@@.):pp} to {(<P2P:>@@.):spx} in the PHONE Port and Auto Attendant OutboundCallRoute's:
Physical Interfaces -> PHONE Port -> OutboundCallRoute:
{(<P2P:>@@.):sp2},{(<#:>|911):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},
{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}
Voice Services -> Auto Attendant -> OutboundCallRoute:
{(<P2P:>@@.):sp2},{0:ph},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},
{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}
SIP clients should be configured to make calls without SIP registration. The SIP proxy should be the IP address or hostname of the OBi (with :5061 appended for SP2). If SIP clients are located outside the OBi's LAN, ports 5060 and 5061 will need to be forwarded to the OBi in the router.
If you don't have a SIP provider and SP2 is unused, the following will enable SP2 for SIP:
Service Providers -> ITSP Profile B -> SIP -> ProxyServer : 127.0.0.1
Voice Services -> SP2 Service -> AuthUserName : (any userid)
Voice Services -> SP2 Service -> X_RegisterEnable : (unchecked)
Voice Services -> SP2 Service -> X_ServProvProfile : B
In this example Phonerlite (userid = billp) can dial through any trunk of OBi 1 via OBi 1's sp2_InboundCallRoute. PhonerLite is set to call without registration and its Proxy/Registrar is set to OBi 1's sp2 address - 192.168.1.10:5061. OBi 1 can call PhonerLite, or forward calls from InboundCallRoutes using format sp(billp@192.168.1.13:5064). Anyone else can call Phonerlite direct using the format
billp@bill.ddns.me.uk:5064.
Each router will need to "port forward" the ports it uses for its UserAgentPorts to receive calls from outside its own local IP range.