Page 1 of 1

Need to Know how can we change last 7 digits of Caller ID

PostPosted: Fri Sep 27, 2019 8:29 am
by monicalawrence
Hi please help me to do this as my script only changing last 4 digits of caller ID here is the script pasted for your reference.
================================
exten => _931X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _931X.,n,Set(CALLERID(num)=${EXTEN:3:6}${RAND(1001,9999)})
exten => _931X.,n,Dial(SIP/VoipBlaze/1${EXTEN:3})
exten => _931X.,n,Dial(SIP/VB/1${EXTEN:3})
exten => _931X.,n,Hangup()
================================

Re: Need to Know how can we change last 7 digits of Caller I

PostPosted: Fri Sep 27, 2019 9:46 am
by omarrodriguezt
Try this
exten => _931X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _931X.,n,Set(area=${EXTEN:3:6})
exten => _931X.,n,Set(last4=${RAND(1000,9999)})
exten => _931X.,n,Noop(new cid is ${area}${last4} )
exten => _931X.,n,Set(CALLERID(num)=${area}${last4})
exten => _931X.,n,Dial(SIP/VoipBlaze/1${EXTEN:3})
exten => _931X.,n,Dial(SIP/VB/1${EXTEN:3})
exten => _931X.,n,Hangup()