I'm going to suggest a different approach, which lets you dial local, long distance and international on either sp1 or sp2 using the **1 and **2 codes. Try it or file it as you wish
If it's not the answer for you, it might well be the answer for someone else.
If you ask three "experts" here you will get three different answers
It just shows how configurable the OBi is. Here is my way:
Leave these at default they will do most of the work for you:
Physical Interfaces > PHONE Port > DigitMap:
([1-9]x?*(Mpli)|[1-9]S9|[1-9][0-9]S9|911|**0|***|#|**1(Msp1)|**2(Msp2)|**8(Mli)|**9(Mpp)|(Mpli))
Physical Interfaces > PHONE Port > OutboundCallRoute:
{([1-9]x?*(Mpli)):pp},{(<#:>|911):li},{**0:aa},{***:aa2},{(<**1:>(Msp1)):sp1},{(<**2:>(Msp2)):sp2},{(<**8:>(Mli)):li},{(<**9:>(Mpp)):pp},{(Mpli):pli}
Change all of the DigitMaps:
Service Providers -> ITSP Profile A -> General -> DigitMap:
(1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<1aaa>[2-9]xxxxxxS4|011xx.)
Replace aaa with your local code.
Service Providers -> ITSP Profile B -> General -> DigitMap:
(1xxxxxxxxxx|<1>[2-9]xxxxxxxxx|<1aaa>[2-9]xxxxxxS4|011xx.)
Replace aaa with your local code.
Physical Interfaces > LINE Port > DigitMap:
(xxxxxxxS4|xxxxxxxxxx|18(00|88|77|66|55|44)xxxxxxx|<**1>1[2-79]xxxxxxxxx|<**2>011xx.|x11)
I'll try some explanation, please feel free to ask for more.
Dialling any number with no ** code will be processed first by your Primary Line – in your case the Line Port DigitMap. If you now dial 12345678912 then this rule <**1>1[2-79]xxxxxxxxx will prepend **1 to the number. Then in the Phone Port OutboundCallRoute this rule {(<**1:>(Msp1)):sp1} will match **112345678912, strip off the **1 and send the number out on sp1.
I have added the S4 to give a four second delay after dialling seven digits in case you mean to dial ten digits, but dial slowly so OBi thinks you have finished dialling after seven digits.
911 is dealt with as a special case and is sent direct to the Line Port with no reference to any digit maps.
When dialling, if you prefix any of the following numbers with **1 or **2 they will be sent out of sp1 or sp2 respectively:
1xxxxxxxxxx – will be sent out unchanged.
xxxxxxxxxx – will have a "1" prepended, then sent out.
xxxxxxx – will have "1aaa" prepended, then sent out, where aaa is your area code.
011xx. will be sent out unchanged.
There's a lot more to be said about how an OBi device processes dialled numbers using a two stage method, but I think we have covered enough for one post! Try the above and check the outcomes with Status > Call History, which will tell you where each call goes.
The above may need some fine tuning, often small bugs show up after new configurations have been in use for a while.
I do look in here most days, but I'm in a different time zone (UK), so answers may be a bit slow coming!