First off, thanks to RonR and many others for their support in these forums. I've been reading through a number of topics and learned far more here than from the admin guide.
I'm trying to create a star code script that inserts a variable number into a call string.
Specifically, a company I do business with has all of their DIDs use their extension number, By that I mean that extension 1288 has a DID of 212-555-1288. Also, all of their extensions start with 12 (it's a small company).
So I want a star code - *12 - with which I can dial the last 2 digits and have the full DID dialed.
I tried this:
*12xx, dial company, call(**1121255512$code)
and several variations.
I expect $code to be the last 2 digits I dial after *12.
As in the predefined *75 -- *75(x|xx), Check Speed Dial, say($Spd[$Code])
With that failing, I thought maybe setting and using a speed dial might work:
*12xx, dial company, set($spd[99],**1121255512$code),call($spd[99])
In either case, when I dial *1288, I get "the number you dialed was rejected by the service provider".
One variation I tried -
*12xx, dial company, call(**1121255512($code))
produces a busy signal.
Any ideas on how this might work? I suspect that $code is not getting replaced as I thought it would.
It appears the Star Code processor in the OBi isn't as flexible as we might like.
*99(xx), Test, say(123) Announces "The value is 123" when *9988 is dialed.
*99(xx), Test, say($Code) Announces "The value is 88" when *9988 is dialed.
*99(xx), Test, say($Code123) gets a busy when *9988 is dialed.
*99(xx), Test, say(123$Code) crashes the OBi when *9988 is dialed.
It looks like a token can be a literal OR a variable, but not a combination of both.
*99(xx), Test, say($Code$Code) also gets a busy when *9988 is dialed.
So it looks like stuffing a couple of variables with the pieces and using multiple tokens won't work either.
Quote from: RevKev on November 27, 2011, 06:53:38 PM
So I want a star code - *12 - with which I can dial the last 2 digits and have the full DID dialed.
It seems that this shouldn't require star codes at all -- just have the digit map translate *12xx to **1121255512xx .
I'm not an expert at this, but wouldn't something like <*12:**1121255512>xx work?
RonR - Thanks for your testing. Using say() is a good way to try this out. I also later thought to check the call log and I can see that obi dials (literally) "121255512$code". So it obviously doesn't do variable replacement within a string.
Stewart - Your idea works. What I don't like is that it makes my digit map that much longer. I added "<*12:**1121255512>xx" at the end of Phone:DigitMap (before "(Mpli)") and it works fine. I then tried adding it to a user defined digit map - ext - and referencing that as "(Mext)" in Phone:DigitMap - that didn't work. As soon as I dialed "*12" I got another dial tone.
Obihai -
Please consider enhancing the star code variable replacement to allow replacement within a string. This, I think, adds valuable functionality.
RevKev,
Assuming SP1/ITSP A is your PrimaryLine, you should be adding:
Service Providers -> ITSP Profile A -> General -> DigitMap: (<*12:121255512>xx|...)
Dialing *1212 will send 12125551212 out SP1.
Thanks RonR. SP1 isn't my primary line. I have it set to trunk group 1 which is li,sp1,sp2. But if not that it would be line as primary is my home phone. sp1 is my office so for work, I normally dial #1... (I've set #1 to do the same thing as **1). In this case, I'm trying to force the number out on sp1 so I don't have to dial #1*1212.
I tried putting the digitmap on trunk group1 but that didn't work - gives me a busy signal.
If you've changed things to use #1, #2, #8, and #9, then using **1 in a DigitMap isn't going to be valid.
I also have TG1 as my PrimaryLine and setting:
Trunk Group1 -> DigitMap : (<*12:180055512>xx|...)
works as expected : *1212 calls 18005551212
You've got something amuck there as several things you've said don't work should have.
Yep, something amuck. I didn't have the enclosing parenthesis. Works perfectly now - and much cleaner than using phone:digitmap. Thanks!
Also, I left the **1, etc. in the digitmap as well as the #1 so both work.