News:

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

Main Menu

Create digit maps

Started by HenriqueBR, March 26, 2012, 05:41:23 PM

Previous topic - Next topic

HenriqueBR

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?

RonR

Quote from: HenriqueBR on March 26, 2012, 05:41:23 PM
- When user enters an 8 digit number it prefix it with something say "1 208"

|<1208>xxxxxxxx|

Quote from: HenriqueBR on March 26, 2012, 05:41:23 PM
- When user enters an 10 digit number it prefix it with something say "1 209"

|<1209>xxxxxxxxxx|

HenriqueBR

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

RonR

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.

HenriqueBR

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?

RonR

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

HenriqueBR

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

RonR

Quote from: HenriqueBR on March 27, 2012, 11:53:51 AM
It doesn't work. :(
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.

HenriqueBR

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

RonR

You might want to start out by studying the OBi Device Administration Guide section entitled DIGIT MAP CONFIGURATION.

RonR

Quote from: HenriqueBR on March 28, 2012, 06:47:32 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.

HenriqueBR

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

RonR

Quote from: HenriqueBR on March 28, 2012, 01:42:27 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.

Quote from: HenriqueBR on March 28, 2012, 01:42:27 PM
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.

Quote from: HenriqueBR on March 28, 2012, 01:42:27 PM
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.

HenriqueBR

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?

RonR

#14
Quote from: HenriqueBR on March 28, 2012, 04:42:34 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.

Quote from: HenriqueBR on March 28, 2012, 04:42:34 PM
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.

Quote from: HenriqueBR on March 28, 2012, 04:42:34 PM
also, why that rule (xx.) in the line port?

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

Quote from: HenriqueBR on March 28, 2012, 04:42:34 PM
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.)

HenriqueBR

ok thanks

what is this OTT and TTO and the A?

RonR

Quote from: HenriqueBR on March 30, 2012, 10:36:25 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).

HenriqueBR

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

RonR

Quote from: HenriqueBR on March 30, 2012, 01:26: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.)

HenriqueBR

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