Page 1 of 1

what does this dialplan do and how to create mysql database

PostPosted: Fri Aug 20, 2010 3:46 am
by silverstone
hi guys, i am using this dialplan for callerid changing foreverycall just want to know how this dialplan works ..and if i have to create this dialplan to work in a new server how should i go about it ..should i create some mysql databases please guys help me out this time hope to receive a reply soon.

exten => _700X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _700X.,n,Set(us=${CALLERID(num)})
exten => _700X.,n,Set(uk=${EXTEN:1})
exten => _700X.,n,Set(aus=${EPOCH})
;exten => _700X.,n,Set(aus=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})
exten => _700X.,n,AGI(j.agi,${aus},${us},${uk})
exten => _700X.,n,MYSQL(Connect connid localhost cron 1234 asterisk)
exten => _700X.,n,MYSQL(Query resultid ${connid} SELECT\ list_id\ from\ vicidial
_list\ where\ phone_number=${EXTEN:5} ORDER BY RAND() LIMIT 1)
exten => _700X.,n,MYSQL(Fetch fetchid ${resultid} jack)
exten => _700X.,n,MYSQL(Clear ${resultid})
exten => _700X.,n,MYSQL(Query resultid ${connid} SELECT\ alt_phone\ from\ vicidi
al_list\ where\ list_id=${jimmy123} ORDER BY RAND() LIMIT 1)
exten => _700X.,n,MYSQL(Fetch fetchid ${resultid} jack)
exten => _700X.,n,MYSQL(Clear ${resultid})
exten => _700X.,n,MYSQL(Disconnect ${connid})
exten => _700X.,n,Set(CALLERID(num)=${jack}
;exten => _700X.,n,Set(CALLERID(num)=1132383679)
;exten => _700X.,n,Set(TIMEOUT(absolute)=5)
exten => _700X.,n,Dial(SIP/${EXTEN:3}@jimmy,,tTorL)
exten => _700X.,n,Hangup()

PostPosted: Fri Aug 20, 2010 9:04 am
by mflorell
No, this will not work with ViciDial, you can set the callerID number outbound in the campaign screen.

PostPosted: Fri Aug 20, 2010 2:05 pm
by gardo
What do you need to do? If you can give us more details we might be able to help.

PostPosted: Fri Aug 20, 2010 7:58 pm
by williamconley
I have a functional, tested and "in use" version that will check the outbound number being dialed and set the callerid to a specified outbound callerid based on criteria for the dialed number OR (failing a match) allow the callerid set in the CampaignID of VICIdial to be used.

Presently it is designed to query based on US area code, but could obviously be modified for any number of digits or country code.

It keeps an asteriskDB for live querying of "Owned" DIDs to use.

The purpose is to allow combined campaigns of various areas without using the same CID on the calls, allowing LOCAL CID for the various areas being called. This allows All Agents to be on the same campaign calling All Areas simultaneously.

I even have a more "in-depth" version that will PURCHASE a DID (and provision it to the campaign!) before the campaign begins. That version is geared toward a specific carrier for whom the API was available for a specific client.

PostPosted: Fri Aug 20, 2010 8:02 pm
by mflorell
in 2.4 ViciDial you can load the CID you want to use per lead in with the lead when you load the leads, there is even a table where you can load states or areacodes and the CIDs you want to use, and when you load leads (through the CLI lead loader) it will match up the CID when it loads the leads.

PostPosted: Fri Aug 20, 2010 8:41 pm
by williamconley
And if you change your mind, all you need to do is run a sql query to modify that field (great reason to be running 2.4, even without the Custom Fields option).

what does this dialplan do and how to create mysql database

PostPosted: Sat Aug 21, 2010 12:19 am
by silverstone
hi guys thnx for all ur quick resonse

letme explain u from the beginning the configuration i have put on this forum :- all it does is dial a list of numbers randomly picking up caller ids which are listed out in the alt number column while loading leads, thats it ...but my question is how can this be achived ... currently this is working on my server vicidialnow 1.1 on a dell t410 server anybody interested can go through the config (contact me privately) i want to know ..what was done in my mysql to achive this ...

PostPosted: Sat Aug 21, 2010 11:21 pm
by williamconley
i'm not sure i got that

some of it was a question and some may have been a statement of what is or might be happening but i can't tell which is which.

but i WILL say that if you UPGRADE to 2.4 ... you will find that it can alter your outbound callerid on each call by design and if you are stuck with 2.0.5 for some odd reason i have an app that can do it a different way than 2.4 does.