Single-Stage Dialling Using SIP: Four OBi Example

(1/3) > >>

ianobi:
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.

CoalMinerRetired:
Interesting, but I'm a few steps back in the learning curve/understanding process from experimenting with this just yet.

I notice you have ddns.co listings for the three routers. Assuming this is something like the U.S. dyndns.org thing, can you replace the hardcoded IP address/es (...list of destination OBi's through which calls from this OBi or its SIP clients can be initiated) with the DynDns names?

ianobi:
I invented the ddns names, dyndds.org would work fine. In my list  destinations OBi 3 and OBi 4 do have URI formats, only OBi 2 has an IP address because it is local to OBi 1 and these are OBi 1's settings:

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>)

I will have a go at describing a call stage by stage soon to better illustrate how it works.

ianobi:
An example call: Bill (OBi 1) is in the UK, Anne (OBi 3) is in the USA. Bill wants to make a call to USA number 12345678912 via Anne’s GV service, which is on her OBi sp1.

Bill dials 3**1 12345678912. This is matched in DigitMap Mp2p by the rule <3*:>(@@.)<:@ anne.ddns.co:5060>. This rule deletes 3*, (@@.) accepts the number 12345678912, then @anne.ddns.co:5060 is added. So the number is now *1 12345678912@anne.ddns.co:5060. Then the OBi 1 PHONE Port -> DigitMap rule <P2P>(Mp2p) prepends P2P to the number. The number is now P2P *1 12345678912@anne.ddns.co:5060 (spaces shown for clarification).

Now that number is passed through the OBi 1 PHONE Port -> OutboundCallRoute and is matched by the rule {(<P2P:>@@.):sp2}. This rule removes the P2P, @@. accepts the whole number and it is sent out to sp2. Therefore the number sent to sp2 is *1 12345678912@anne.ddns.co:5060.

Now we move to OBi 3. The OBi 3 sp1 InboundCallRoute is the same as for OBi 1 sp2 InboundCallRoute shown above. OBi 3 tsc DigitMap has to contain the other users’ userids, so it is Mtsc : (bill1|bill2|billp|hank1).

Arriving at OBi 3, the router removes the @anne.ddns.co and directs the call to sp1 because it sees port 5060. SIP protocol means the message contains the userid “bill1” from the OBi 1.

The call is accepted by sp1 InboundCallRoute as “bill1” is in Mtsc by the first part of this rule: {(Mtsc)>(<*1:>(Msp1)),(Mtsc)>(<**1:>(Msp1)):sp1}. It removes the *1 and sends 12345678912 to GV on sp1.

So Bill in UK gets his free call to USA number 12345678912  :D

I think I may have to go and lie down for a while…

Clinic802:
so suppose the local phone company in a distant land has blocked some VOIP ports, namely 5060 etc.
would the OBi-100 at that location be able to communicate with the USA based OBi202?
.
If not, what work-around is possible?
.
thx

Navigation

[0] Message Index

[#] Next page