inserting values in `vicidial_call_menu` table

Discussions about development of VICIDIAL and astGUIclient

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

inserting values in `vicidial_call_menu` table

Postby Stevicci » Wed Jul 30, 2014 7:31 am

Hello All,

What I am looking for is a way to force the values inserted via a script into the `vicidial_call_menu` and `vicidial_call_menu_options` tables to take effect without the need to navigate to the webgui and click the SUBMIT button. If there is a straightforward way to do this please advise, otherwise my approach thus far is as follows:

I have created a script to populate the `asterisk`.`vicidial_call_menu` table directly and I am getting the behaviour I want for example I can set the `Menu prompt` to play and different beaviour for different options by editing the `vicidial_call_menu_options` table. The catch is I need to click the second submit button (this is the one just beneath the `Custom Dialplan Entry:` textbox).

If I look through the admin.php file there is a variable: $modify_url = "$PHP_SELF?ADD=3511&menu_id=$menu_id";
I have added in constants (I know the menu_id I am creating and the the server IP) so that this becomes http://xxx.xxx.xxx.xxx/vicidial/admin.php?ADD=3511&menu_id=191 and called this in my browser and I am taken to the call menu page where I get the same message I would get if I were to click the SUBMIT button i.e "MODIFY A CALL MENU RECORD: 191".

When I add a lead for a remote agent to dial the call flow does not behave as configured. However when navigate to the call menu web interface and I click the second SUBMIT button the call menu behaviour I have configured takes effect. I was hoping I could use a simple cURL to call the string above ($modify_url).

Thanks!



-----------------
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
Stevicci
 
Posts: 9
Joined: Tue May 13, 2014 7:03 am

Re: inserting values in `vicidial_call_menu` table

Postby Stevicci » Wed Jul 30, 2014 10:09 am

I found this in the admin.php file:

$stmtA="UPDATE servers set rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';";

if the values are set in the database is it a case of rebuilding the server config?
Stevicci
 
Posts: 9
Joined: Tue May 13, 2014 7:03 am

Re: inserting values in `vicidial_call_menu` table

Postby Stevicci » Wed Jul 30, 2014 11:00 am

This seems to have done the trick and I think the need is for the dialplans to be updated. With all dialers having `rebuild_conf_files`="Y" in the `asterisk`.`servers` table I made the call and the call flow followoed what I had specified on the call menus. After the call the values for `rebuild_conf_files` update to `N`. In admin.php for the if statement There is a sql insert statement for the admin logs that I have not used but plan on incorporating into my script.
Stevicci
 
Posts: 9
Joined: Tue May 13, 2014 7:03 am

Re: inserting values in `vicidial_call_menu` table

Postby shipmark33 » Wed Oct 01, 2014 2:58 pm

I have created a script to populate the `asterisk`.`vicidial_call_menu` table directly and I am getting the behaviour I want for example I can set the `Menu prompt` to play and different beaviour for different options by editing the `vicidial_call_menu_options` table.
shipmark33
 
Posts: 1
Joined: Wed Oct 01, 2014 2:56 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 17 guests