Page 1 of 1

Random CID Not Working

PostPosted: Tue Aug 13, 2019 4:27 pm
by zenithbsolutions
Hi,

I have a vicidial standalone installation from vicibox 8.1.2 ISO

Vicidial Version
------------------------
VERSION: 2.14-711a
BUILD: 190607-1525
© 2019 ViciDial Group

Asterisk Version
------------------------
Asterisk 13.21.1

I have 10 DID numbers and need to set this series of 10 DID numbers as CIDs for outbound calling.

The dial plan set as shown below

exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9X.,2,Set(Callerid(num)=${RAND(50005001,50005010)})
exten => _9X.,3,Dial(SIP/VOIP/${EXTEN:1},,Tto)
exten => _9X.,4,Hangup()

I have set the Campaign CID to one of the DID numbers.
Custom CallerID is set to N

But, when I try to dial an outbound call the CID is only showing the number that was assigned in the Campaign CID and its not displaying the random cids from the dial plan.

Kindly help me or guide me to resolve this issue.

Thank you.

Re: Random CID Not Working

PostPosted: Tue Aug 13, 2019 8:59 pm
by ambiorixg12
Set the Campaign CallerID option to blank and try

Re: Random CID Not Working

PostPosted: Wed Aug 14, 2019 3:16 am
by zenithbsolutions
Hi,

If we set the Campaign Caller ID blank at the calle end it is showing the CID as : asterisk

Re: Random CID Not Working

PostPosted: Wed Aug 14, 2019 4:56 pm
by Vince-0
asterisk is the callerid(name) part, your rand dialplan maybe not being allowed by voip provider?

Re: Random CID Not Working

PostPosted: Wed Aug 14, 2019 5:54 pm
by ambiorixg12
zenithbsolutions wrote:Hi, If we set the Campaign Caller ID blank at the calle end it is showing the CID as : asterisk


I learned CID name it is used by VICIdial and it cant be changed, CID number can be changed, this is a working example

exten=>_1nxxnxxxxxx,1,Noop(catching the caller id ${CALLERID(num)})

same=>n,Set(cid=${RAND(50005001,50005010)})

same=>n,Set(CALLERID(num)=${cid})

same=>n,Dial(SIP/carriername/${EXTEN})

Re: Random CID Not Working

PostPosted: Thu Aug 15, 2019 2:37 pm
by ghernandez
zenithbsolutions wrote:Hi,

I have a vicidial standalone installation from vicibox 8.1.2 ISO

Vicidial Version
------------------------
VERSION: 2.14-711a
BUILD: 190607-1525
© 2019 ViciDial Group

Asterisk Version
------------------------
Asterisk 13.21.1

I have 10 DID numbers and need to set this series of 10 DID numbers as CIDs for outbound calling.

The dial plan set as shown below

exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9X.,2,Set(Callerid(num)=${RAND(50005001,50005010)})
exten => _9X.,3,Dial(SIP/VOIP/${EXTEN:1},,Tto)
exten => _9X.,4,Hangup()

I have set the Campaign CID to one of the DID numbers.
Custom CallerID is set to N

But, when I try to dial an outbound call the CID is only showing the number that was assigned in the Campaign CID and its not displaying the random cids from the dial plan.

Kindly help me or guide me to resolve this issue.

Thank you.






Here this layout will work for you. enjoy!!






exten => _2525X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _2525X.,n,Gosub(pickCallerIDnum,cell${RAND(1,3)},1)
exten => _2525X.,n,Dial(SIP/1${EXTEN:4}@ADDCARRIER,,tTo)
exten => _2525X.,n,Hangup

exten => XXXXXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => XXXXXXXXXX,2,Gosub(pickCallerIDnum,cell${RAND(1,3)},1)
exten => XXXXXXXXXX,3,Dial(SIP/1${EXTEN}@ADDCARRIER,,tTo)
exten => XXXXXXXXXX,4,Hangup



[pickCallerIDnum]

exten => cell1,1,Set(CALLERID(num)=Phone Number)
same => n,Return
exten => cell2,1,Set(CALLERID(num)=Phone Number)
same => n,Return
exten => cell3,1,Set(CALLERID(num)=Phone Number)
same => n,Return

Re: Random CID Not Working

PostPosted: Mon Aug 19, 2019 11:22 am
by zenithbsolutions
Thank you ghernandez.

This seems to be working. Will test it in production and let you know if I have any issues today.

Do you know the procedure to call CIDs from a text document using PHP to the dialplan ?

Re: Random CID Not Working

PostPosted: Mon Aug 19, 2019 3:14 pm
by ghernandez
zenithbsolutions wrote:Thank you ghernandez.

This seems to be working. Will test it in production and let you know if I have any issues today.

Do you know the procedure to call CIDs from a text document using PHP to the dialplan ?




On the second part, no.

Re: Random CID Not Working

PostPosted: Wed Aug 21, 2019 10:15 pm
by ambiorixg12
Do you know the procedure to call CIDs from a text document using PHP to the dialplan ?

[/quote]

Open a new thread with details about the request and I can help you

Re: Random CID Not Working

PostPosted: Thu Aug 22, 2019 10:09 pm
by williamconley
First: I"m going to avoid asking why you want to set your CID Number to a random number. I probably don't want to know.

zenithbsolutions wrote:exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9X.,2,Set(Callerid(num)=${RAND(50005001,50005010)})
exten => _9X.,3,Dial(SIP/VOIP/${EXTEN:1},,Tto)
exten => _9X.,4,Hangup()

1) Do not use _9X. as the extension. Use at least 7 digits. _9XXXXXXX. for instance. This can avoid collisions with other extensions that are used internally.
2) While trying to wrap my head around coding issues, I ALWAYS find a way to View The Code as it executes. However, you have not posted the asterisk CLI from a failure, so it's hard to say what's going wrong.
zenithbsolutions wrote:I have set the Campaign CID to one of the DID numbers.
Custom CallerID is set to N

Irrelevant. Vicidial will set the CID in the first line (AGI). You are changing it after that happens. So yours should override. The question is why it does not.