There are several ways to meet the requirements. I haven't seen the S timer component used with international numbers to avoid the dial delay. This is what I came up with:
Assumptions:
1. You are using an Obihai 100
2. You want canadian numbers to go out
freephoneline.ca unless it is down then to use Google
3. You want toll free numbers to go out a free provider (wasn't sure if
freephoneline.ca was an option)
4. You want international numbers to use google
THEN:
sp1 [freephoneline.ca] map = (1xxxxxxxxxx) [I'm Not sure of canadian requirement]
sp2 [google] map = (1xxxxxxxxxx|011xx.) [Allow for international]
vg1 [free provider] map = (18(00|33|44|55|66|77|88)xxxxxxx)
User defined maps:
tfree = (18(00|33|44|55|66|77|88)xxxxxxx)
feat=(<211:14163974636>|<311:14163922489>|<511:14162354686>|<611:14164772010>|<811:18667970000>|933)
phone port digit map (911|!1900xxxxxxx|[1-9]S9|[1-9][0-9]S9|(Mfeat)|(Msp1)|011xx.S3)
Voice Services -> Gateways and TGs -> Trunk Group 1
Trunk List: sp1,sp2
DigitMap: (Msp2)
Primary Line: tg1 [trunk group 1]
Outbound call route: {(911|933):sp1},{(Mtfree):vg1},{(Mpli):pli}
The Phone DigitMap validates numbers and performs transforms.
A canadian mask is not needed because either
freephoneline.ca or google can handle them.
The same is true for the "x11" numbers because they are transformed to standard numbers.
Toll free numbers are "picked off" by the outbound route first and sent to vg1.
Any other 11 digit number starting with 1 is sent to tg1. tg1 tries sp1 and if not available sends it to sp2
International numbers beginning with 011 are sent to tg1. This is a special case where the sp maps
DO count. Since sp1 can't handle international numbers the call is sent only to google.