Page 1 of 1

Manipulation of Vicidial remote agent table

PostPosted: Tue May 20, 2014 4:05 am
by Stevicci
Hello World,

Apologies if this is in the wrong section, but it seems appropriate.

I am working on a survey script and would like to control the state of remote agents using this script. I have been using the Web interface until now and alternating the remote agents active and inactive status as well as moving the agent between inbound and outbound campaigns.

Is it unwise to modify the 'vicidial_remote_agents' table directly? I would like to use a php script to toggle the status and was thinking of modifying the `campaign_id`, 'closer_campaign' and `conf_exten` fields directly but I am not sure what the repercussions will be. I have looked at the API but there only seems to be an function for manipulating normal agents.

-----------------
Vicibox Redux v.4.0.3 from .iso | Vicidial 2.8-431a Build 140314-1134 | Asterisk 1.4.44-vici built by abuild @ build19 on a x86_64 running Linux | Single Server running ESXi-5.5.0-1331820-standard | No Digium/Sangoma Hardware | No Extra Software After Installation | Hp Proliant DL320e Gen8 | Intel Xeon CPU E3-1220 V2

Re: Manipulation of Vicidial remote agent table

PostPosted: Tue May 20, 2014 6:20 am
by mflorell
For Remote Agents only manipulating the vicidial_remote_agents table only should work. I have done that a few times myself, usually just to set active or inactive, but I can't see why it would be a problem for Remote Agents only.

Re: Manipulation of Vicidial remote agent table

PostPosted: Mon May 26, 2014 6:18 am
by Stevicci
Thanks for the speedy response!

I have been playing around with the webGUI and find that if I have multiple remote agents, I am only able to edit the "number of lines" for the most recently added remote agent, from the `vicidial_remote_agents` table:

remote_agent_id......user_start......number_of_lines etc...
1.........................101.............3
2.........................102.............1
3.........................103.............10

With the entries above, I can update the value number_of_lines (to say 20 or 30) for user_start=103 . However when I try and update user_start=102's number_of_lines to say 5 I get an error "REMOTE AGENTS NOT MODIFIED - your number of lines overlaps with another remote agent". If I delete user_start=103, I am then able to edit the number_of_lines for user_start_102.

The reason I am trying to do this is so that I can vary the number_of_lines based on demand placed on different remote agents. Is this the incorrect approach?

-----------------
Vicibox Redux v.4.0.3 from .iso | Vicidial 2.8-431a Build 140314-1134 | Asterisk 1.4.44-vici built by abuild @ build19 on a x86_64 running Linux | Single Server running ESXi-5.5.0-1331820-standard | No Digium/Sangoma Hardware | No Extra Software After Installation | Hp Proliant DL320e Gen8 | Intel Xeon CPU E3-1220 V2

Re: Manipulation of Vicidial remote agent table

PostPosted: Mon May 26, 2014 11:47 am
by mflorell
Remote agent numbers can't overlap. This is why we usually recommend staggering the Remote Agent user IDs by 1000 so you never run into that problem.

Re: Manipulation of Vicidial remote agent table

PostPosted: Tue May 27, 2014 5:23 am
by Stevicci
Ah! hence user_"start". Thanks for the feedback.