Discussions about development of VICIDIAL and astGUIclient
Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
by Vince-0 » Wed Jun 28, 2017 6:12 am
Hi guiz!
I needed to create a new option for opt-in on and IVR.
I made an addition to cm_dnc_agi script change to allow for a status INT (created in system statuses):
### process for INT path
if ($new_status =~ /INT/) # set the phone_number to INT
{
if ($g > 0)
{
### update all records for the phone_number in vicidial_list to INT (Interested Opt In)
$stmtA = "UPDATE vicidial_list SET status='INT' where lead_id IN($SleadsSQL);";
$affected_rows = $dbhA->do($stmtA);
if ($AGILOG) {$agi_string = "$affected_rows|$stmtA|"; &agi_output;}
}
}
Looks simple enough to work properly.
Can I submit this to code base for inclusion once it's documented etc?
Please advise,
-
Vince-0
-
- Posts: 272
- Joined: Fri Mar 02, 2012 4:27 pm
- Location: South Africa
by Vince-0 » Wed Jun 28, 2017 7:24 am
There's this parsing logic that needs amending, still figuring it out:
if (length($new_status) < 1)
{$new_status = 'NI';}
if (length($dnc_default) < 2)
{$dnc_default = 'YES';}
if (length($next_step) < 1)
{$next_step = 'B';}
if (length($camp_sys) < 2)
{$camp_sys = 'SYS';}
-
Vince-0
-
- Posts: 272
- Joined: Fri Mar 02, 2012 4:27 pm
- Location: South Africa
by mflorell » Wed Jun 28, 2017 4:07 pm
Sounds like a good idea. Please post the code to the Issue Tracker when it's all done and tested
-
mflorell
- Site Admin
-
- Posts: 18386
- Joined: Wed Jun 07, 2006 2:45 pm
- Location: Florida
-
by Vince-0 » Thu Jun 29, 2017 3:32 am
I think the biggest problem could be that the inbound number format doesn't match the phone number format that is in the list. Clients can never seem to use proper e164 format consistently.
Probably means that there needs to be a separate case for inserting a new record or maybe a fix could be to do the select on a like statement for the phone number field and strip like 2 leading digits for where clause.. I dunno.
I will test some things so long.
This syntax looks OK, just requires that INT status is pre-created:
if (length($new_status) < 1)
{if ($new_status eq 'INT')
{$new_status = 'INT';}
elsif ($new_status eq 'NI')
{$new_status = 'NI';}}
{$new_status = 'NI';}
if (length($dnc_default) < 2)
{$dnc_default = 'YES';}
if (length($next_step) < 1)
{$next_step = 'B';}
if (length($camp_sys) < 2)
{$camp_sys = 'SYS';}
-
Vince-0
-
- Posts: 272
- Joined: Fri Mar 02, 2012 4:27 pm
- Location: South Africa
Return to Development
Who is online
Users browsing this forum: No registered users and 25 guests