On my OBi 200 I have SP1 - SP4 all configured with different providers. I want the OBi to choose one of those four SPs at random to dial out when using a connected phone.
I am thinking this could be done with a carefully crafted OutboundCallRoute string.
Is this possible?
IMHO not possible as I cannot think of any way to access a source of randomness.
I think this can be done. You would have to use a star code to dial the number and make changes to the ITSP auto provisioning. The ITSP provisioning would generate a random number.
I already have an application that uses this technique, so I'm pretty sure this will work. Before I spend time testing, are you interested?
Yes, please.
There's no way to do it without the user having to dial a star code? I'll take what I can, but if there's a way to do it without having to do anything differently, that would certainly be preferable.
Sorry for getting your hopes up, but I can't get this to work.
This is what I did:
Under Sys Management/Auto Provisioning/ITSP Prov/
I wrote a script for ConfigURL
The script saves a "1" in a SpeedDial and waits 10 seconds.
It then checks the SpeedDial.
If it finds a "1" it changes it to a "2", "2" to a "3", "3" to a "4" and a "4" to a "1".
This works, so every 10 seconds the number changes.
Here is the StarCode:
*3(xxxxxxxxxx), Random Call, call($Spd[96] $Code)
$Spd[96] is a variable that contains the contents of SpeedDial#96.
$Code contains the 10 digit number dialed after the StarCode *3
When a call is placed, only the contents of the SpeedDial is passed, not the dialed number. I knew a literal and a variable works like this "call(2 $Code)", but It won't allow 2 variables.
Any brilliant minds out there have a suggestion on how to code this to get it working?
You could route the call based on one of the digits of the outbound number.
If the 10th digit is 0 thru 2 route to SP1
3-4 route to SP2
5-7 route to SP3
8-9 route to SP4
That would work. How would I set that up?
Use OBi Expert to modify the config.
Physical Interfaces -> Phone1 Port
Add following to the beginning of the OuboundCallRoute:
{(1xxxxxxxxx[0-2]):sp1},{(1xxxxxxxxx[3-4]):sp2},{(1xxxxxxxxx[5-7]):sp3},{(1xxxxxxxxx[8-9]):sp4},