Disable Single Agent API Confirmation Screen

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Disable Single Agent API Confirmation Screen

Postby inspire888 » Mon Feb 08, 2021 6:22 am

Hi guys,

We're using a HTML form to load leads via the single agent API and that in itself works fine.

The only issue is, after each successful load, you need to go back to the form and load it all over again.

Is there a way to disable to confirmation screen and simply redirect back to the webform after each lead has been sent to the dialer?

If not, what is the best way to implement a form to send leads to the dialer one at a time?

Thanks
Vicibox 9.0.2 from .iso | Vicidial VERSION: 2.14-756a BUILD: 200609-2257 | Asterisk v.13.29.2-vici | No Digium/Sangoma Hardware | No Extra Software After Installation | 4gb RAM
inspire888
 
Posts: 30
Joined: Sun Feb 07, 2021 5:08 pm

Re: Disable Single Agent API Confirmation Screen

Postby carpenox » Mon Feb 08, 2021 7:21 pm

check out this simple method: https://cyburityllc.com/?p=1366
Alma Linux 9.4 | SVN Version: 3890 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2428
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Disable Single Agent API Confirmation Screen

Postby inspire888 » Tue Feb 09, 2021 2:11 am

carpenox wrote:check out this simple method: https://cyburityllc.com/?p=1366


Checked out your link and that is perfect.

Tried to use similar code to what you had (couldn't copy/paste but zoomed in) but I'm getting all sorts of PHP errors.

Any chance you have the code to past here?
Vicibox 9.0.2 from .iso | Vicidial VERSION: 2.14-756a BUILD: 200609-2257 | Asterisk v.13.29.2-vici | No Digium/Sangoma Hardware | No Extra Software After Installation | 4gb RAM
inspire888
 
Posts: 30
Joined: Sun Feb 07, 2021 5:08 pm

Re: Disable Single Agent API Confirmation Screen

Postby carpenox » Tue Feb 09, 2021 3:44 am

Code: Select all
<?php
if (isset($_POST['phone']) && $_POST['phone'] != '') {
   $url = 'https://cyburityllc.com/vicidial/non_agent_api.php';
   $query_fields = [
      'source' => 'sunfunnow.com',
      'user' => 'apiuserid',
      'pass' => 'apipass',
      'function' => 'add_lead',
      'list_id' => '2002',
      'add_to_hopper' => 'Y',
      'hopper_priority' => '99',
      'phone_code' => '1',
      'phone_number' => $_POST['phone'],
      'first_name' => $_POST['fname'],
      'last_name' => $_POST['lname'],
      'email' => $_POST['email'],
         
   ];
   
   $curl = curl_init($url . '?' . http_build_query($query_fields));
   $response = json_decode(curl_exec($curl), true);
   curl_close($curl);
header("Location: https://www.sunfunnow.com/application-received/");
}
?>



this code is just the PHP code snippet, this is the part you meant correct?
Alma Linux 9.4 | SVN Version: 3890 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2428
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: Disable Single Agent API Confirmation Screen

Postby inspire888 » Tue Feb 09, 2021 3:56 am

Yes thanks for that.

I just solved it before you posted.

I had put ( ) instead of { } and the PHP failed.

All works perfectly now.

Thank you very much!!!!!
Vicibox 9.0.2 from .iso | Vicidial VERSION: 2.14-756a BUILD: 200609-2257 | Asterisk v.13.29.2-vici | No Digium/Sangoma Hardware | No Extra Software After Installation | 4gb RAM
inspire888
 
Posts: 30
Joined: Sun Feb 07, 2021 5:08 pm

Re: Disable Single Agent API Confirmation Screen

Postby carpenox » Tue Feb 09, 2021 3:57 am

no problem. anytime you want to see the use of a function just reply to my API post on the forum or thru my business site and I will make a real life example
Alma Linux 9.4 | SVN Version: 3890 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2428
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 53 guests