hello,
I’m new in writing dialplan and I need help with adding a feature to set random outbound CallerID from the list for serveral extensions
I found the code below, which is belongs @lgaetz, it is working perfect but for all outbounds:
[macro-dialout-trunk-predial-hook]
exten => s,1,noop(Entering context ${CONTEXT} defined in extensions_custom.conf)
exten => s,n,Set(foo=${RAND(1,3)}) ;choose a random number between 1 and 3
exten => s,n,noop(choosing random CID #${foo})
exten => s,n,goto(${foo},1)
exten => 1,1,set(CALLERID(number)=1111111111)
exten => 2,1,set(CALLERID(number)=2222222222)
exten => 3,1,set(CALLERID(number)=3333333333)
how to apply for specific trunk and extensions ?
thank you