For a number of years, I’ve been helping a buddy with his FreePBX/Asterisk 1.8 based call center telephone system. It’s been remarkably stable, and very capable. Now they want to add a feature where the outbound caller ID is randomly set from a small pool of their DIDs.
Google leads me to the RAND function, and an example that sounds like a perfect fit. My background is not in programming, however, and I don’t know how to implement this. Any help toward the goal would be very appreciated!
Here’s the example I found…
[code]if we had few caller ID number want to use it, try this:
[outbound]
exten => _886X.,1,Noop
same => n,Gosub(pickCallerIDnum,cell${RAND(1,5)},1)
same => n,Dial(SIP/${EXTEN}@gateway,32,gCX)
[pickCallerIDnum]
exten => cell1,1,Set(CALLERID(num)=09xxxxxxx1)
same => n,Return
exten => cell2,1,Set(CALLERID(num)=09xxxxxxx2)
same => n,Return
exten => cell3,1,Set(CALLERID(num)=09xxxxxxx3)
same => n,Return
exten => cell4,1,Set(CALLERID(num)=09xxxxxxx4)
same => n,Return
exten => cell5,1,Set(CALLERID(num)=09xxxxxxx5)
same => n,Return[/code]
Thanks a lot,
Peter