News:

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

Main Menu

Routing according the timenframe

Started by JOMA, December 01, 2015, 01:26:41 PM

Previous topic - Next topic

JOMA

Hello,

Is it possible to configure routing table based on a timeframe?

How should I configure that:
* All international calls (starting with 00) should be routed through the SP
* All local calls (starting with 0 only) should be routed:
       * From 8:00 to 17:00, Monday to Friday through the SP
       * From 17:00 to 8:00, Monday to Friday + weekend through the line port.
       * Except for all emergency numbers that should always go through the line port.

Thanks a lot for your help!

drgeoff

No. OBi digit maps and call routing have no time dependencies.

You would need to use external means, eg an Asterisk server.

JOMA

OK thx fo the reply!

Then I'm thinking of only use a code to redirect the calls either toward line port of SP.
How should I configure that if the composed number is starting with * then it should be redirected toward SP?

Thx!

drgeoff

#3
OBi's come pre-programmed that you can force an outgoing call to any of the configured SPs by prepending **n to the number you dial. n=1 through 2 for Obi1x0 devices and 1 through 4 for OBi2xx and 3xx devices.  Additionally n=8 for the LINE port (POTS) on a 110.  And on all devices, n=9 to call an Obitalk number.

If you want to customise to your own liking it is all explained in http://www.obihai.com/docs/OBi-DigitMapCallRoute-Tutorial-v1-1.pdf

JOMA

Hello,

Thx for the information and the document...
I still have one question on the OBi110: In the Physical Interfaces, for the Phone section, what is the difference between DigitalMap and OutboundCallRoute?

From what I understand, DigitalMap is to transform what was type. For example, if a user type the number 003212345678, I can apply a rule to only send the number 3212345678 toward the SP. While the OutboundCallRoute is to express which SP to user according to the rule.

If this is true? How can I set this rule:
* All number starting with 0 should be redirected toward LINE
* All number starting with 00 should be redirected toward SP1

Many thanks for your help!

azrobert

Routing an outbound call is a 2 step process.
The Phone Port DigitMap validates the dialed number.
Rule (Mpli) will include the rules in primary line's default DigitMap.
If the dialed number doesn't match a rule, you will receive a fast busy.
You can modify the dialed number in the Phone DigitMap

If the dialed number matches a rule in the DigitMap the phone port outbound call route will route the call to the primary line using rule {(Mpli):pli}
(Mpli) above is also a DigitMap and can modify the dialed number.
When the 1st rule is enclosed in parentheses, it's a DigitMap.
When it's not, it's a literal.
{(xx):li} is comparing for 2 digits.
{xx:li} is comparing for 2 alpha xx's.

* All number starting with 0 should be redirected toward LINE
* All number starting with 00 should be redirected toward SP1

Physical Interfaces -> line Port -> DigitMap: (0xx.S3)

This DigitMap will match any number starting with "0" or "00"
The Primary Line for a OBi110 is the Line Port, so (Mpli) in the Phone Port DigitMap will include the Line DigitMap and will validate all numbers beginning with "0" or "00".
You can't remove the prefix here because when the outbound route gets control it won't see the prefix.

Physical Interfaces -> Phone Port
Add the following to the beginning of the OutboundCallRoute:
{(<00:>xx.):sp1},{(<0:>xx.):li},

The above will remove the prefix and route the call to the correct trunk.

The rule 0xx.S3 will have a 3 second delay before call is routed because of the "x.".
If I had xx. there would be a 10 second delay.
If you were more specific about the format of the dialed numbers, I could make the DigitMaps more efficient.

JOMA

Brilliant! Thank-you so much, it's very clear.
As I'd like to learn, I'll try to make the DigitMap myself then I'll post it and explain the rule so you can may correct me?

Have a nice day :)

JOMA

Hello,

Here was I think:

The first short numbers are emergency numbers. Then I have placed the most common number format of the country and finally xx.S3 for all numbers for international or short special numbers.
DigitMap : (112|100|101|107|103|116000|070245245|0xxxxxxxx|0xxxxxxxx|04xxxxxxxx|xx.S3)

In the call route, I want only the international call to go through SP1. The international call will start with 00 and as I need E.164 format, I'll remove them. For national call, I ll use the li connection and I don't need the E.164 format, so I won't remove anything. I've keept the xx.S3 for li because of all special format number. International numbers can correspond to xx.S3 but has the rule comes second it will be catched before and send toward sp1

OutboundCallRoute : {(<00:>xx.):sp1},{(112|100|101|107|103|116000|070245245|0xxxxxxxx|0xxxxxxxx|04xxxxxxxx|xx.S3):li},

Am I right?

Thx!

drgeoff

You have 0xxxxxxxx present twice.

And 0xxxxxxxx includes the unique 07.... number you have in there, so having the 07... is of no benefit. Incidentally it is not a good idea to show complete real numbers on any web page so you may wish to edit your post.

Probably you have already done so but if not check that your ITSP is really expecting only a country code at the start of international calls.

azrobert

Looks good!

If the unique 07.. is a frequently dialed number, you could use an S0 suffix for no delay. You could also add the S0 suffix to the emergency numbers.

My description of the routing delay wasn't very clear. This delay only occurs when the Phone DigitMap has control. The "S3" suffix in the outbound route won't hurt, but is not needed.

The following is not a suggestion, just FYI. When the DigitMap contains a "xx.", the OBi110 will wait 2 seconds for the other rules. It is waiting for additional digits to be entered.  If you didn't have the "xx." and dialed 012345678 or any other number, you wouldn't need the s0 suffix for zero delay. This is because additional digits will not match another rule.

azrobert

This would reduce the code.
OutboundCallRoute : {(<00:>xx.):sp1},{(Mli):li}

JOMA

#11
@drgeoff, thx for the info and comments. The numbers are emergency numbers for Europe or Belgium so it's not a problem to show them here. You can already find them on internet ;-)

@azrobert, thx for the comments. I'll apply them. I went through the whole conversation and I'm geting confused about xx.S3 . In one post you metionned that without S3, because of xx., there will be a 10s delay before the call is routed and in antoher post, you metionned that if the Digitmap contains xx. the obi110 will wait 2s for other rules. Can you explain the difference of the 2 statements?

Just two last points,
* Should I keep this default digit map: ([1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|911|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))
and default route: {([1-9]x?*(Mpli)):pp},{(<#:>|911):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli} ?
What about the CallRetournDigitMap? Should I keep it?

* Should I also adapt the DigitMap in the Phone and ITSP Profile or only in the Line one?


Thanks a lot!


azrobert

#12
QuoteCan you explain the difference of the 2 statements?
Yes, my writing skills suck. LOL

Here is a more detail explanation:

The OBi analyzes each digit as they are received and will process the received digits immediately or wait for more digits depending on the rules in the DigitMap.

There are 2 timers.
The short timer is 2 seconds.
The long timer is 10 seconds.

If a dialed number only matches a rule ending with "x.", there will be a 10 second delay.
This is considered an Indefinite Match because "x." will match any number of digits and the long timer is used. The OBi doesn't know if you will enter additional digits, so it waits.

If the dialed number matches a rule without "x.", it will result in an Exact Match. If the dialed number can potentially match another rule if more digits are entered, the OBi will use the short timer of 2 seconds. If the dialed number cannot potentially match another rule if more digits are entered the OBi will process the call immediately and not wait for additional digits.

An S suffix on a DigitMap rule followed by a number will override the wait period.
The OBi2xx has the option to globally change the default short and long timers.

QuoteShould I keep this default digit map:
This is a personal option. I would guess that 99.9% keep it. I chose to remove all rules not used. I defined my OBi's slightly different than my suggestion to you. Don't forget the phone digit map always gets control first and includes the line digit map rules with a pointer.

Here is my new suggestion.

Define the trunk digit maps exactly how you want to process the dialed numbers for each trunk. This way you can look at the trunk digit map and know what's happening.

Line digit map:
(112S0|100S0|101S0|107S0|103S0|116000S0|070245245S0|0xxxxxxxx|04xxxxxxxx|xx.S3)

If the special format numbers do not begin with zero, you can use the S0 suffix on the other 2 rules.

SP1 digit map:
(<00:>xx.)

Define all numbers in the phone digit map, without altering anything. You don't need 00xx.S3 because of xx.S3 in the line digit map. You can eliminate the delay on international calls by defining each country code with the exact number of digits and the S0 suffix.

Phone digit map:
(***|00xx.S3|(Mli))

Phone outbound route:
{***:aa2},{(Msp1):sp1},{(Mli):li}

You can include # to get line dial tone or **0 for the Auto Attendant. You must also include rules in the phone digit map.
{(<#:>):li},{**0:aa},

QuoteWhat about the CallRetournDigitMap? Should I keep it?
Up to you. I don't use this function, but didn't remove any rules.

Edit:

If you want to force local calls out SP1, include a 00 prefix, so you would dial 3 zeroes followed by the local 8 digit number.

If you want to use an asterisk prefix, include rule *0xxxxxxxx in the phone digit map. You don't need the S0 suffix because the rule is unique. Then add <*:>0xxxxxxxx to the sp1 digit map

JOMA

Thanks azrobert! It's getting more more clear.
Actually I like all to possibilities the device brings.

I still have question for you :)

What is the difference between aa and aa2? I checked the documents but I didn't find anything. I guess it's the auto attendant but I don't see the difference between both.

Thanks again for all the help you provided!

drgeoff

aa (=aa1) does call handling things.

aa2, invoked by dialling ***, lets you configure many of the device's settings.