News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

Single-Stage Dialing Through Any OBi Trunk Using SIP

Started by RonR, February 01, 2012, 05:54:15 PM

Previous topic - Next topic

RonR

This article illustrates how to configure any number of OBi100/OBi110/OBi202 devices plus any number of SIP clients for single-stage dialing capability.  Any OBi or SIP client can initiate a call through any trunk of an OBi using SIP exclusively.  The OBiTALK Service and OBiON Apps are not used.  SIP clients may be softphone's, IP phones, ATA's, etc.

Dialing from an OBi or its SIP clients uses the following format:


     18005551212  ->  Local PrimaryLine
**1 18005551212  ->  Local SP1 Service
**2 18005551212  ->  Local SP2 Service
**8 18005551212  ->  Local LINE Port
**9 200123456      ->  Local OBiTALK Service

    n*18005551212  ->  OBi n PrimaryLine
n **1 18005551212  ->  OBi n SP1 Service
n **2 18005551212  ->  OBi n SP2 Service
n **8 18005551212  ->  OBi n LINE Port
n **9 200123456      ->  OBi n OBiTALK Service


Voice Services -> SPx Service -> X_InboundCallRoute (SPx must be configured for SIP) (OBi100/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):spx},{(Mtsc)>(Mpli):pli},{(Mtsc)>0:ph},{(Mtsc):},{ph}


Voice Services -> SPx Service -> X_InboundCallRoute (SPx must be configured for SIP) (OBi202):

{(Mtsc)>(<*1:>(Msp1)),(Mtsc)>(<**1:>(Msp1)):sp1},{(Mtsc)>(<*2:>(Msp2)),(Mtsc)>(<**2:>(Msp2)):sp2},
{(Mtsc)>(<*3:>(Msp3)),(Mtsc)>(<**3:>(Msp3)):sp3},{(Mtsc)>(<*4:>(Msp4)),(Mtsc)>(<**4:>(Msp4)):sp4},
{(Mtsc)>(<*8:>(Mli)),(Mtsc)>(<**8:>(Mli)):li},{(Mtsc)>(<*9:>(Mpp)),(Mtsc)>(<**9:>(Mpp)):pp},
{(Mtsc)>**0:aa},{(Mtsc)>***:aa2},{(Mtsc)>(Mp2p):spx},{(Mtsc)>(Mpli):pli},{(Mtsc)>1:ph1},{(Mtsc)>2:ph2},
{(Mtsc):},{phx}

Note: Replace spx above (1 place) with the OBi SIP service (sp1,sp2,sp3,sp4).  Replace pli above (2 places) with the trunk name (sp1,sp2,sp3,sp4,li,pp,tg1) to be used as the PrimaryLine.  Replace phx above (1 place) with the desired PHONE Port (ph1,ph2).


User Settings -> User Defined DigitMaps -> User Defined Digit MapX
Label : tsc
DigitMap : (userid1|userid2)

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 : (<n*:>(@@.)<:@192.168.1.140:sip_port>|<n*:>(@@.)<:@hostname:sip_port>)

where n is a number to be associated with a destination OBi's IP address or hostname.

Note: Replace sip_port above with 5061 if the destination OBi has SP2 configured for SIP (: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 initited.  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:>@@.):spx},{(<#:>|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:>@@.):spx},{0:ph},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},
{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}

Note: Replace spx above with the OBi SIP service (sp1,sp2,sp3,sp4).


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

freewilly

Good to know, I will try it later.

This will make land line(or Ooma) work with a sip phone without a pbx.

Obi110 is configured as a pbx which can servers a single sip client.

fatbrain

no luck with this configuration... no matter what number I dial on my sip phone it ends up in {ph}

I have GV in SP1, a Polycom IP 550 in SP2 and an active Line port. I'd like to be able to single-stage dial from my Polycom that is within the same network and be able to 2-stage dial with authentication and/or caller ID on my LINE port.

Thanks guys!

RonR

The fact that you're reaching the PHONE Port means you're almost there.

The problem is likely that you don't have the username from your IP Phone in the tsc User Defined DigitMap.  Look at the OBi Call History and make sure you're using the correct username.

Also, if there are any reserved characters (m, M, s, S, x, X) in the username, they have to be surrounded by single quotes.  For example, if the username is xlite, it would have to be entered in the tsc User Defined DigitMap as : 'x'lite

fatbrain

Outstanding!!. Now it works. Thanks so much RonR!!!

What is the sequence of translations that occur from the call flow: Polycom->SP2->SP1->GV


RonR

Quote from: fatbrain on February 15, 2012, 06:42:58 AM
What is the sequence of translations that occur from the call flow: Polycom->SP2->SP1->GV

I'm assuming you have your Polycom dialplan set up to pass whatever you dial unchanged.

The only translations that would occur in the OBi are those provided by the DigitMap for the target trunk.  In the case you cited, SP1, it would typically be:

Service Providers -> ITSP Profile A -> General -> DigitMap

RonR

fatbrain,

If you'd like to also receive incoming calls on the Polycom:

On any trunk that you wish to have the Polycom ring in addition to the PHONE Port:

InboundCallRoute : {sp2(192.168.1.145:5062),ph}

Use your actual Polycom IP address and port number in place of '192.168.1.145:5062' above.

Stewart

Quote from: RonR on February 15, 2012, 10:43:28 AM
If you'd like to also receive incoming calls on the Polycom:

1. Set up a Voice Gateway to point to the Polycom ...
Unfortunately, that approach cannot deliver caller ID to the Polycom, because of a limitation in the OBi.

I have a similar setup with two Polycom phones, and tried to work around the problem by using an InboundCallRoute of e.g. {SP2(polycom@192.168.1.145:5062),ph}, combined with setting X_SpoofCallerID.  Unfortunately, there was a subtle problem (I don't remember the details); I gave up and ended up putting a free PBXes account in the path (OBi registers as a sub-PBX, Polycoms register as extensions, PBXes routes the OBi "trunk" to the Polycoms via a ring group).

RonR

The following is a better solution for ringing a SIP client that allows passing CallerID:

On any trunk that you wish to have the SIP client ring in addition to the PHONE Port:

InboundCallRoute : {spx(userid@192.168.1.145:5062),ph}

Service Providers -> ITSP Profile x -> SIP : X_SpoofCallerID : (checked)

Diana

I had setup my OBi110 in the past for "Single-Stage Dialing" based on the older method ( http://www.obitalk.com/forum/index.php?topic=1103.0 ) and would like to use the method in this thread which appears to be more general.  However, I have a few questions base on my current setup, which is:

SIP Line: SP2 - setup with anveo; no DID
SIP Port: 5060 (set for 5060 even though Anveo uses 5010)

SP1:  GV
SP1 Port: 5064

Voice Gateway 3 (vg3):  CallWithUs

Primary Line: tg1
TrunkList: sp1,sp2,vg3

3 OBion Apps running on 3 Android Phones (290xxxxxA;290xxxxxB;290xxxxxC)
1 SIP App (CSimple) running on 1 Android Phone (username: 123456)
1 SIP Phone external to my LAN (Work) [username: 123789]
1 OBi110 on my LAN (192.168.1.211)
I have a free URL address with DYNDNS:  xxxxxx.dyndns.org

Questions:
Quote
User Settings -> User Defined DigitMaps -> User Defined Digit MapX
Label : p2p
DigitMap : (<n*:>(@@.)<:@192.168.1.140:sip_port>|<n*:>(@@.)<:@hostname:sip_port>)

(1) If I'm only using one OBi (OBi No: 200OBiNo), should I set n = 1?

(2)  I'm not sure what info should be substitute here: "@hostname:sip_port>";  should it be @xxxxxx.dyndns.org:5064?
DigitMap : (<1*:>(@@.)<:@192.168.1.211:5060>|<1*:>(@@.)<:@hostname:5060>)?

(3) Can I still use the OBiON App and a SIP Client on the three Android Devices?


The other changes that were made are:

Quote
     Voice Services -> SP2 Service -> X_InboundCallRoute (SPx must be configured for SIP):

{(Mtsc)>(Mp2p):sp2},{(Mtsc)>**0:aa},{(Mtsc)>***:aa2},{(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)>(Mtg1):tg1},{(Mtsc)>0:ph},{(Mtsc):},{ph}

User Settings -> User Defined DigitMaps -> User Defined Digit Map4
Label : tsc
DigitMap : (200OBiNo|290xxxxxA|290xxxxxB|290xxxxxC|123456|123789)

This is a list of trusted OBi and SIP client userid's that are allowed to use single-stage dialing on this OBi.  If no other OBi's or SIP clients are allowed to use single-stage dialing on this OBi, the DigitMap may be left empty: ()


Quote
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:>@@.):sp2} 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 :5064 appended for SP2).  If SIP clients are located outside the OBi's LAN, ports 5060, 5010 and 5064 forwarded to the OBi in the router!!

RonR

Quote from: Diana on March 09, 2012, 03:36:01 AM
SIP Line: SP2 - setup with anveo; no DID
SIP Port: 5060 (set for 5060 even though Anveo uses 5010)

With Anveo on SP2/ITSPB, all SIP ports should be at Default settings with the exception of ProxyServerPort, which should be set to 5010.

Quote from: Diana on March 09, 2012, 03:36:01 AM
SP1:  GV
SP1 Port: 5064

With Google Voice on SP1/ITSPA, all SIP ports should be at Default settings since they are not used.

Quote from: Diana on March 09, 2012, 03:36:01 AM
Questions:
Quote
User Settings -> User Defined DigitMaps -> User Defined Digit MapX
Label : p2p
DigitMap : (<n*:>(@@.)<:@192.168.1.140:sip_port>|<n*:>(@@.)<:@hostname:sip_port>)

(1) If I'm only using one OBi (OBi No: 200OBiNo), should I set n = 1?

(2)  I'm not sure what info should be substitute here: "@hostname:sip_port>";  should it be @xxxxxx.dyndns.org:5064?
DigitMap : (<1*:>(@@.)<:@192.168.1.211:5060>|<1*:>(@@.)<:@hostname:5060>)?

This DigitMap is used to route calls to other OBi's.  Since you don't have another OBi for this OBi to make calls through, this DigitMap can be left empty : ()

Quote from: Diana on March 09, 2012, 03:36:01 AM
(3) Can I still use the OBiON App and a SIP Client on the three Android Devices?

Yes.

Quote from: Diana on March 09, 2012, 03:36:01 AM
The other changes that were made are:

Quote
User Settings -> User Defined DigitMaps -> User Defined Digit Map4
Label : tsc
DigitMap : (200OBiNo|290xxxxxA|290xxxxxB|290xxxxxC|123456|123789)

This is a list of trusted OBi and SIP client userid's that are allowed to use single-stage dialing on this OBi.  If no other OBi's or SIP clients are allowed to use single-stage dialing on this OBi, the DigitMap may be left empty: ()

Only SIP client userid's go in this list.  OBiTALK numbers are not used anywhere in this SIP oriented configuration.

Momo

Hi,

Thanks for your tutorial. My obi110 is already configured with the old method.

http://www.obitalk.com/forum/index.php?topic=1103.0

Now I would like to test this method. But I have 2 questions:

1) I don't understand how I should configure my sip client if I am calling from outside my lan

My OBI's lan address is 192.168.0.47. My wan IP address is like 82.2225.xxx.xx (I've just created a no-ip account.)


2) My OBITALK service inbounnd call route is acutally configured like this:

{(Mcot)>(0[6-8]xxxxxxxx|0033[6-8]xxxxxxxx|0091[2-6]xx.):li},{(Mcot)>(0[1-5,9]xxxxxxxx|0033[1-5,9]xxxxxxxx):tg3},{(Mcot)>(0091[7-9]xxxxxxxxxS0|0097xx.):vg3},{(Mcot)>(Mli):li},{(Mcot)>(<*1:>(Msp1)),(Mcot)>(<**1:>(Msp1)):sp1},{(Mcot)>(<*2:>(Msp2)),(Mcot)>(<**2:>(Msp2)):sp2},{(Mcot)>(<*8:>(Mli)),(Mcot)>(<**8:>(Mli)):li},{(Mcot)>(<*9:>(Mpp)),(Mcot)>(<**9:>(Mpp)):pp},{(Mcot):aa},{ph}


Can I configure it like this with the new method ?

Voice Services -> SPx Service -> X_InboundCallRoute (SPx must be configured for SIP) (OBi100/OBi110):

{(Mtsc)>(0[6-8]xxxxxxxx|0033[6-8]xxxxxxxx|0091[2-6]xx.):li},{(Mtsc)>(0[1-5,9]xxxxxxxx|0033[1-5,9]xxxxxxxx):tg3},{(Mtsc)>(0091[7-9]xxxxxxxxxS0|0097xx.):vg3},{(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):spx},{(Mtsc)>(Mpli):pli},{(Mtsc)>0:ph},{(Mtsc):},{ph}

Thanks for your help.

Momo

Hi,

I've tried to follow your method. But I don't know how to configure the sip client.

I have Csipsimple (Android).

My proxy is : myusername@no-ip.org:5061 (I am using SP2)
My username : SP2's username
My password : SP2's password.

I don't know how to configure the SIP to make calls without SIP registration.
Quote from: RonR on February 01, 2012, 05:54:15 PM

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.


Do you have any ideas ?

Thanks for your help.

Stewart

Quote from: Momo on May 31, 2012, 01:54:52 AM
I don't know how to configure the SIP to make calls without SIP registration.
See http://code.google.com/p/csipsimple/issues/detail?id=981

However, even though my CSipSimple can successfully make calls without registration via a provider, there seems to be a bug that prevents such a connection on the LAN.  If myusername@no-ip.org resolves to a remote host, you should be ok.

Momo

Thanks Stewart for your reply. I just want one clarification.

Is these informations are correct ?
Csipsimple username : SP2's username
Csipsimple password : SP2's password

Thanks for your help

Momo

Ok, now I can connect and place the call... But I can't hear anything. Even the other party can't hear. Port 5060 and 5061 are forwarded to the OBI. Do I need to forward any other ports ?

infin8loop

Quote from: Momo on May 31, 2012, 12:16:48 PM
Ok, now I can connect and place the call... But I can't hear anything. Even the other party can't hear. Port 5060 and 5061 are forwarded to the OBI. Do I need to forward any other ports ?

Try forwarding RTP port range 16600 - 16998  (UDP protocol). Range covers both Obi100/110 RTP defaults in ITSP Profiles A & B.  
"This has not only been fun, it's been a major expense." - Gallagher

Momo

Quote from: infin8loop on May 31, 2012, 12:30:37 PM
Try forwarding RTP port range 16600 - 16998  (UDP protocol). Range covers both Obi100/110 RTP defaults in ITSP Profiles A & B. 

Thanks infin8loop for your suggestion. I've tried this. The other party can hear me but I can't hear them. I've even tried to put OBI's IP in DMZ. Same result.

infin8loop

Quote from: Momo on June 10, 2012, 08:28:27 AM
Quote from: infin8loop on May 31, 2012, 12:30:37 PM
Try forwarding RTP port range 16600 - 16998  (UDP protocol). Range covers both Obi100/110 RTP defaults in ITSP Profiles A & B. 

Thanks infin8loop for your suggestion. I've tried this. The other party can hear me but I can't hear them. I've even tried to put OBI's IP in DMZ. Same result.


Try turning off any SIP, ALG, SPI or NAT restriction settings, or turning on gaming mode, if applicable. (from a Stewart post on another board). I've seen this suggestion more than once. My router doesn't have any of these settings so I don't know if they will help or not.

FWIW: I have the following set for my SIP (not GV) providers:

ITSP Profile X -> General -> STUNEnable : checked
ITSP Profile X -> General -> STUNServer : stun.ideasip.com
ITSP Profile X -> General -> STUNServerPort: 3478
ITSP Profile X -> General -> X_ICEEnable : checked
ITSP Profile X -> General -> X_SymmetricRTPEnable : checked

Where Profile X is A or B as applicable. Either or both of the last two options (X_) above can probably be set or maybe neither.

I have no idea if full-duplex versus half-duplex has anything to do with the RTP voice stream but I also have the OBi set to full duplex:  http://www.obitalk.com/forum/index.php?topic=2438.msg15767#msg15767

"This has not only been fun, it's been a major expense." - Gallagher

Momo

Thanks infin8loop for your help. It's not working. If I place a call from "line", it's working. But If I place a call through SP1 or SP2, I can't hear the other party.  I've changed everything. Ports forwarding, full duplex etc...

I also have 2 other questions :

1) I have 2 Obi's (One set in a remote place)

   Obi1: local IP is 192.168.0.14 hostname obi1xxx.no-ip.biz
   Obi2: local IP is 192.168.0.101 hostname obi2xxx.no-ip.biz

I need help to configure this part


User Settings -> User Defined DigitMaps -> User Defined Digit MapX
Label : p2p
DigitMap : (<n*:>(@@.)<:@192.168.1.140:sip_port>|<n*:>(@@.)<:@hostname:sip_port>)


Can you please tell me if it's correct ?

Obi1's Digitmap: (<1*:>(@@.)<:@192.168.0.14:5061>|<2*:>(@@.)<:@obi2xxx.no-ip.biz:5061>)
Obi2's Digitmap: (<1*:>(@@.)<:@192.168.0.101:5061>|<2*:>(@@.)<:@obi1xxx.no-ip.biz:5061>)

2) Can we use speed dials with this method ? I've tried it but it's not working. Do we need change anything to make it work.

Thanks again for your help guys.