All installation and configuration problems and questions
Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
by thephaseusa » Thu Jul 26, 2018 5:10 am
Almost there.
30 * * * * /usr/bin/mysql -u root -pmypass asterisk <<<'select * from vicidial_list where security_phrase like "\%INTEREST\%" and last_local_call_time like "\%`date +\%Y-\%m-\%d`\%"' > /usr/share/astguiclient/LEADS_IN/newleads.txt
this works if i put in an actual date like 2018-07-26 but not when i ask it to pull todays (date)
-
thephaseusa
-
- Posts: 345
- Joined: Tue May 16, 2017 2:23 pm
by mflorell » Thu Jul 26, 2018 7:44 am
For MySQL I usually use something like this:
CONCAT(DATE_ADD(CURDATE(), INTERVAL -0 DAY),' ',CURTIME()) ) )
-
mflorell
- Site Admin
-
- Posts: 18387
- Joined: Wed Jun 07, 2006 2:45 pm
- Location: Florida
-
by blackbird2306 » Thu Jul 26, 2018 7:57 am
Change SELECT part this way:
30 * * * * /usr/bin/mysql -u root -pmypass asterisk <<< 'select * from vicidial_list WHERE `security_phrase` LIKE "\%INTEREST\%" and DATE(`last_local_call_time`) = CURDATE()' > /usr/share/astguiclient/LEADS_IN/newleads.txt
Vicibox 6.0.2 from Vicibox_v.6.0.x86_64-6.0.2.iso | Vicidial 2.12-560a build: 160617-1427 | Asterisk 1.8.32.3
-
blackbird2306
-
- Posts: 409
- Joined: Mon Jun 23, 2014 5:31 pm
by blackbird2306 » Thu Jul 26, 2018 7:59 am
Sorry Matt I didn't update, so I didn't read your post
Vicibox 6.0.2 from Vicibox_v.6.0.x86_64-6.0.2.iso | Vicidial 2.12-560a build: 160617-1427 | Asterisk 1.8.32.3
-
blackbird2306
-
- Posts: 409
- Joined: Mon Jun 23, 2014 5:31 pm
by thephaseusa » Thu Jul 26, 2018 8:55 am
Hi Guys and thank you!I
When i get it into a file how do i pull the leads in the file and move these new leads into list id 607, like this?
/usr/share/astguiclient/VICIDIAL_IN_new* --forcelistid=607
-
thephaseusa
-
- Posts: 345
- Joined: Tue May 16, 2017 2:23 pm
by blackbird2306 » Thu Jul 26, 2018 11:50 am
Do you need the leads to be copied as new leads or is it OK to "move" them from list A to B ? But this means they are not present in list A anymore. Reimporting is much more complicated than changing their original list_id.
Vicibox 6.0.2 from Vicibox_v.6.0.x86_64-6.0.2.iso | Vicidial 2.12-560a build: 160617-1427 | Asterisk 1.8.32.3
-
blackbird2306
-
- Posts: 409
- Joined: Mon Jun 23, 2014 5:31 pm
Return to Support
Who is online
Users browsing this forum: Bing [Bot] and 45 guests