Skip to main content

Changing announcement in mysql is not set after reloading asterisk

Posted by magixnetworks on Thu, 03/09/2017

Hi I have made a script that is designed to change the announcement in a Voice Menu with a feature code (For easily setting notifications of outages)

I am updating the ogm field in the menu_source table but when doing an asterisk reload it is still playing the original announcement.

How do I apply manual changes made in the database to asterisk?

Thanks


Submitted by thirdlane on Fri, 03/10/2017 Permalink

menu_source is just a "source" for generating actual dialplan to handle menu processing which is stored in ast_static_config table as you should be able to see below.


mysql> select * from ast_static_config where filename = 'menus.include' and category = 'tl-main-menu-open-thirdlane';
+-----+----------+------------+------------+-----------+---------------+-----------------------------+----------+---------------------------------------------------------------+
| id | tenantid | cat_metric | var_metric | commented | filename | category | var_name | var_val |
+-----+----------+------------+------------+-----------+---------------+-----------------------------+----------+---------------------------------------------------------------+
| 272 | 1 | 1 | 0 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | s,1,GotoIf($["${TL_LEVEL}" != ""]?6) |
| 273 | 1 | 1 | 1 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | s,2,Set(TL_LEVEL=1) |
| 274 | 1 | 1 | 2 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | s,3,Ringing |
| 275 | 1 | 1 | 3 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | s,4,Wait(1) |
| 276 | 1 | 1 | 4 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | s,5,Answer |
| 277 | 1 | 1 | 5 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | s,6,Set(TIMEOUT(digit)=5) |
| 278 | 1 | 1 | 6 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | s,7,Set(TIMEOUT(response)=15) |
| 279 | 1 | 1 | 7 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | s,8,Background(ogm/thirdlane/sampleopen) |
| 280 | 1 | 1 | 8 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | 8,1,Directory(default-thirdlane,local-extensions-thirdlane,b) |
| 281 | 1 | 1 | 9 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | t,1,Goto(tl-main-menu-open-thirdlane,s,6) |
| 282 | 1 | 1 | 10 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | i,1,Playback(invalid) |
| 283 | 1 | 1 | 11 | 0 | menus.include | tl-main-menu-open-thirdlane | exten | i,2,Goto(tl-main-menu-open-thirdlane,s,6) |
| 284 | 1 | 1 | 12 | 0 | menus.include | tl-main-menu-open-thirdlane | include | local-extensions-thirdlane |
+-----+----------+------------+------------+-----------+---------------+-----------------------------+----------+---------------------------------------------------------------+
13 rows in set (0.00 sec)

mysql>