January 04, 2022, 09:20:28 am *
Welcome, Guest. Please login or register.
News:
 
   Forum Home   Search Login Register OBiTALK  
Pages: [1]
  Print  
Author Topic: Create digit maps  (Read 10815 times)
HenriqueBR
Jr. Member
**
Posts: 21


« on: March 26, 2012, 05:41:23 pm »

Hi,

Just installed obihai110 and it works great. One thing I want to simplify it is to:
- When user enters an 8 digit number it prefix it with something say "1 208"
- When user enters an 10 digit number it prefix it with something say "1 209"

How can I accomplish this?
Logged
RonR
Hero Member
*****
Posts: 4527


« Reply #1 on: March 26, 2012, 05:46:16 pm »

- When user enters an 8 digit number it prefix it with something say "1 208"

|<1208>xxxxxxxx|

- When user enters an 10 digit number it prefix it with something say "1 209"

|<1209>xxxxxxxxxx|
Logged
HenriqueBR
Jr. Member
**
Posts: 21


« Reply #2 on: March 26, 2012, 05:59:50 pm »

also, more details:

use sip provider as default, and when dialing 8 digit number, prefix with say 987, if dialing 10 numbers prefix with 123

if user enters 3 digit, use normal line
Logged
RonR
Hero Member
*****
Posts: 4527


« Reply #3 on: March 26, 2012, 06:42:47 pm »

Please list all digit patterns and transformations that are to be accepted and sent to SP1 by default (SIP Provider?).

Please list all digit patterns and transformations that are to be accepted and sent to the LINE Port.
Logged
HenriqueBR
Jr. Member
**
Posts: 21


« Reply #4 on: March 26, 2012, 06:50:16 pm »

ok
8 and 10 digit number - sp1 (prefix with 123 and 321)
rest - line
* followed by any number - sp1

these are outbound call rules, set up in the physical interfaces - phone
right?
Logged
RonR
Hero Member
*****
Posts: 4527


« Reply #5 on: March 26, 2012, 07:47:45 pm »

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

(*xx.|<123>xxxxxxxx|123xxxxxxxx|<321>xxxxxxxxxx|321xxxxxxxxxx|<**8>xx.)

Physical Interfaces -> PHONE Port -> PrimaryLine : SP1 Service

Physical Interfaces -> LINE Port -> DigitMap : (xx.)


* followed by any string of digits  ->  SP1 (unchanged)
8 digits  ->  SP1 (with 123 added at the beginning)
10 digits  ->  SP1 (with 321 added at the beginning)
any other string of digits   ->  LINE Port (unchanged)
« Last Edit: March 27, 2012, 12:18:53 pm by RonR » Logged
HenriqueBR
Jr. Member
**
Posts: 21


« Reply #6 on: March 27, 2012, 11:53:51 am »

It doesn't work. Sad
Would you care to explain this setup?
Logged
RonR
Hero Member
*****
Posts: 4527


« Reply #7 on: March 27, 2012, 12:21:15 pm »

It doesn't work. Sad
Would you care to explain this setup?

There was an omission in my previous post.  Sorry 'bout that!

Please try the updated ITSP Profile A DigitMap.  I've tested it here and it appears to work as advertised now.
Logged
HenriqueBR
Jr. Member
**
Posts: 21


« Reply #8 on: March 28, 2012, 06:47:32 am »

hey, thanks, it works now.
would you care to explain these rules?

also if instead of adding a prefix, I wanted to remove, could I use something like
<123:>xxxxxxxxxx
so that when I enter 123 and a string of 10 other numbers, it removes the 123 and uses sp1

also it isn't using the normal phone line whenever the number called is of a length different than 8 or 10 digits
Logged
RonR
Hero Member
*****
Posts: 4527


« Reply #9 on: March 28, 2012, 07:55:15 am »

You might want to start out by studying the OBi Device Administration Guide section entitled DIGIT MAP CONFIGURATION.
Logged
RonR
Hero Member
*****
Posts: 4527


« Reply #10 on: March 28, 2012, 08:06:50 am »

also it isn't using the normal phone line whenever the number called is of a length different than 8 or 10 digits

I just tested it again and anything other than 8- and 10-digit numbers and numbers beginning with * get sent out the LINE Port.
Logged
HenriqueBR
Jr. Member
**
Posts: 21


« Reply #11 on: March 28, 2012, 01:42:27 pm »

Numbers starting with * should go to the sip.

I tried but the manual is cryptic. In that rule, first you add 123 with <123> that is the same as <123:> right?
but why do the nesse rule catches 123xxxxxxxxx?
So the logic is, first you add the prefix to the number, then you match that number with prefix, right?
the entire rule goes from left to right
Logged
RonR
Hero Member
*****
Posts: 4527


« Reply #12 on: March 28, 2012, 02:24:52 pm »

Numbers starting with * should go to the sip.

Any digit string starting with an asterisk goes to Service Provider 1 (SP1).  I've tested this numerous times.

In that rule, first you add 123 with <123> that is the same as <123:> right?

<123> is the equivalent of <:123>.  When the value to the left of the : is empty, the colon can be omitted.

<123:> would match and remove the 123 digits.

but why do the nesse rule catches 123xxxxxxxxx?
So the logic is, first you add the prefix to the number, then you match that number with prefix, right?
the entire rule goes from left to right

The OBi first processes the dialed number though the PHONE Port -> DigitMap.  There is no particular order involved in the processing of the PHONE Port -> DigitMap rules.  The winner is the best matched rule.  An 8-digit number will match the <123>xxxxxxxx rule resulting in 123 being added to it at the beginning.

Then the OBi processes the resulting number through the PHONE Port -> OutboundCallRoute.  The order here is left-to-right and the first matching rule wins.  The 123xxxxxxxx rule will match in this case.
Logged
HenriqueBR
Jr. Member
**
Posts: 21


« Reply #13 on: March 28, 2012, 04:42:34 pm »

hi, thanks for all the feedback

I tweaked a bit the rule
(<*:>xx.|<:123>xxxxxxxx|123xxxxxxxx|<:321>xxxxxxxxxx|321xxxxxxxxxx|<999:321>xxxxxxxxxx|321xxxxxxxxxx|xx.)

with this setup I wanted to:
- any number starting with * goes to sip, without the *
- if number has 8 digits, prefix with 123
- if number has 10 digits, prefix with 321
- if number begins with 999 and has 10 digits, replace with 321

I removed the part with <**8> because it was passing **8 to sip and it wasnt understanding


but I just tried a 5 digit number, and it used the sip, not the normal line
also, why that rule (xx.) in the line port?
Logged
RonR
Hero Member
*****
Posts: 4527


« Reply #14 on: March 28, 2012, 08:34:53 pm »

(<*:>xx.|<:123>xxxxxxxx|123xxxxxxxx|<:321>xxxxxxxxxx|321xxxxxxxxxx|<999:321>xxxxxxxxxx|321xxxxxxxxxx|xx.)

You have serious problems with this DigitMap.  If the number starts with an * and has 8 or 10 digits or begins with 999, the * will be removed, but it's then going to be transformed again when it's processed by the OutboundCallroute using the <:123>xxxxxxxx, <:321>xxxxxxxxxx, or <999:321>xxxxxxxxxx rules.

The two-pass nature of the PHONE Port DigitMap/OutboundCallRoute can be pretty tricky when transformations are involved.

I removed the part with <**8> because it was passing **8 to sip and it wasnt understanding

but I just tried a 5 digit number, and it used the sip, not the normal line

The <**8> is required to redirect all unaccounted for patterns to the LINE Port.

also, why that rule (xx.) in the line port?

To allow any digit string to be sent through the LINE Port.

with this setup I wanted to:
- any number starting with * goes to sip, without the *
- if number has 8 digits, prefix with 123
- if number has 10 digits, prefix with 321
- if number begins with 999 and has 10 digits, replace with 321

This following accomplishes the above and sends all unaccounted for patterns to the LINE Port:

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

(<*:A>xx.|<A:>xx.|<OTT>xxxxxxxx|<OTT:123>xxxxxxxx|
<TTO>xxxxxxxxxx|<TTO:321>xxxxxxxxxx|<999:TTO>xxxxxxxxxx|<**8>xx.)
« Last Edit: March 28, 2012, 08:48:23 pm by RonR » Logged
HenriqueBR
Jr. Member
**
Posts: 21


« Reply #15 on: March 30, 2012, 10:36:25 am »

ok thanks

what is this OTT and TTO and the A?
Logged
RonR
Hero Member
*****
Posts: 4527


« Reply #16 on: March 30, 2012, 10:56:54 am »

what is this OTT and TTO and the A?

They are just non-numeric literal strings used as intermediate values to designate the transformation values.  They were necessary to avoid the double-transformation problem between the DigitMap and OutboundCallRoute processing.

A = asterisk
OTT = one-two-three
TTO = three-two-one

They could have been anything non-numeric (for example, F, +, annd g).
Logged
HenriqueBR
Jr. Member
**
Posts: 21


« Reply #17 on: March 30, 2012, 01:26:17 pm »

hmn ok, understood

how can I add a rule to redirect a number to another sip provider?
e.g. numbers with 8 digits starting with 9, go to sip2
and
numbers starting with *1 go to sip2, removing *1
Logged
RonR
Hero Member
*****
Posts: 4527


« Reply #18 on: March 30, 2012, 02:52:17 pm »

how can I add a rule to redirect a number to another sip provider?
e.g. numbers with 8 digits starting with 9, go to sip2
and
numbers starting with *1 go to sip2, removing *1

I didn't test this, but try:

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

(<**2>9xxxxxxx|<*1:**2>xx.|<*:A>xx.|<A:>xx.|<OTT>xxxxxxxx|<OTT:123>xxxxxxxx|
<TTO>xxxxxxxxxx|<TTO:321>xxxxxxxxxx|<999:TTO>xxxxxxxxxx|<**8>xx.)
Logged
HenriqueBR
Jr. Member
**
Posts: 21


« Reply #19 on: April 07, 2012, 11:20:37 am »

hey thanks RonR for all the help

been learning a lot lately, even managed to set obihai to use skype through siptosis

on a break from work I might sum all the info I collected and post it somewhere, want to return the help I received
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Advertisement
Advertisement