To Siremis Admin,
I'm a bit of a php rookie, and even more of a noob with openbiz cubi, but
I've burnt a day and a half trying to implement a new button on the SER Menu
Server Services > Dialplan List page, and curious
if you could give some
words of advice concerning my plight.
Ideally, I would like dialplan to auto update the Kamailio mySQL database
with the dp_reload feature; I am simply sick of bouncing Kamailio with a
"kamctl restart" from the command line each time I implement a change to the
dialplan in Siremis.
I have successfully enabled this feature on the drop-down menu in SER Menu >
Command Services > MI Commands, however, I don't want to have to navigate to
the MI Commands page each time I wish to refresh dialplan. In
siremisMICommands.xml, I was able to activate dp_reload with the following
code:
(taken from siremisMICommands.xml)
<?xml version="1.0" standalone="no"?>
<PluginService Name="siremisMICommands" Package="asipto"
Class="siremisMICommands">
<MIConfig name="MIConfig" type="udp" mode="rich">
<Local name="local" address="127.0.0.1" port="8044"
timeout="3.0"/>
<Remote name="remote" address="127.0.0.1"
port="8033"/>
<MICommands>
<cmd name="ps" title="List Processes" command="ps"/>
<cmd name="uptime" title="Show Uptime"
command="uptime"/>
<cmd name="getstatsall" title="Get All Statistics"
command="get_statistics
all"/>
<cmd name="which" title="Get All MI Commands"
command="which"/>
<cmd name="dp_reload" title="Reload Dailplan"
command="dp_reload"/>
<------ Code I added, WORKS!
</MICommands>
</MIConfig>
</PluginService>
Here's where I'm stuck: I can't seem to get a new button
to implement dp_reload in the DialplanListForm.xml. I'm not sure if I need
to write a function to call dp_reload, or if I can simply activate dp_reload
from the DialplanListForm.xml. The code I have written creates a button on
the SER Menu > Server Services > Dialplan List page, but thats as far as
I've gotten. My code currently looks like this:
(taken from DialplanListForm.xml)
<Element Name="btn_refresh" Class="Button"
Text="Activate"
CssClass="button_gray_m" Description="Refresh dialplan in Kamailio without
restarting Kamailio">
<EventHandler Name="dp_reload" Event="onclick"
EventLogMsg=""
Function="" ContextMenu="Activate"/>
</Element>
Anything you can say would be most helpful, as this is a feature I'm sure
many using Siremis would appreciate having.
Best,
--
R. Z. Feeser
717.460.8095
www.RZFeeser.com
www.NaturaGardens.com