siremis:install53x:jsonrpc-commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

siremis:install53x:jsonrpc-commands [2020/02/26 14:31] (current)
admin created
Line 1: Line 1:
 +====== Siremis - JSONRPC Commands Panel ======
  
 +===== Config File =====
 +
 +In your Kamailio configuration file you have to load //​**jsonrpcs**//​ module and configure it. See:
 +
 +  * http://​kamailio.org/​docs/​modules/​stable/​modules/​jsonrpcs.html
 +
 +==== Siremis Config ====
 +
 +The configuration related to JSONRPC for SIREMIS ​ resides in file:
 +<​code>​
 +    siremis/​modules/​sipadmin/​service/​siremisJRCommands.xml
 +</​code>​
 +
 +The content can look like:
 +
 +<code xml>
 +<?xml version="​1.0"​ standalone="​no"?>​
 +<​PluginService Name="​siremisJRCommands"​ Package="​asipto"​ Class="​siremisJRCommands">​
 +    <​JRConfig name="​JRConfig"​ type="​unixsock"​ mode="​rich">​
 + <!-- used for type="​http"​ -->
 + <​RSocket name="​rsocket"​ address="​http://​127.0.0.1:​5060/​RPC2"​ timeout="​3"​
 +                 ​username="​alice"​ password="​wonderland"/>​
 + <!-- used for type="​udp"​ -->
 + <​UDPLocal name="​udplocal"​ address="​127.0.0.1"​ port="​8044"​ timeout="​3.0"/>​
 + <​UDPRemote name="​udpremote"​ address="​127.0.0.1"​ port="​8033"​ timeout="​3.0"/>​
 + <!-- used for type="​unixsock"​ *** note: avoid sockets in /tmp/ if you haven'​t reconfigured systemd -->
 + <​UnixSockLocal name="​unixsocklocal"​ address="/​var/​run/​siremis/​siremis_rpc.sock"​ timeout="​3.0"/>​
 + <​UnixSockRemote name="​unixsockremote"​ address="/​var/​run/​kamailio/​kamailio_rpc.sock"​ timeout="​3.0"/>​
 +        <​JRCommands>​
 + <cmd name="​help"​ title="​List RPC Commands"​ command="​system.listMethods"/>​
 + <cmd name="​uptime"​ title="​Server - Uptime"​ command="​core.uptime"/>​
 + <cmd name="​psx"​ title="​Server - List Processes"​ command="​core.psx"/>​
 + <cmd name="​getstatsall"​ title="​Server - All Statistics"​ command="​stats.get_statistics all"/>​
 + <cmd name="​corexsockets"​ title="​Server - Listen Sockets"​ command="​corex.list_sockets"/>​
 + <cmd name="​corexaliases"​ title="​Server - Domain Aliases"​ command="​corex.list_aliases"/>​
 + <cmd name="​dslist"​ title="​Dispatcher - List Records"​ command="​dispatcher.list"/>​
 + <cmd name="​dsreload"​ title="​Dispatcher - Reload Records"​ command="​dispatcher.reload"/>​
 + <cmd name="​uldump"​ title="​UsrLoc - Location Records"​ command="​ul.dump"/>​
 + <cmd name="​uldumpbrief"​ title="​UsrLoc - Brief Location Records"​ command="​ul.dump brief"/>​
 + <cmd name="​addrlist"​ title="​Permissions - List IP Address Records"​ command="​permissions.addressDump"/>​
 + <cmd name="​subnlist"​ title="​Permissions - List IP Subnet Records"​ command="​permissions.subnetDump"/>​
 + <cmd name="​addrreload"​ title="​Permissions - Reload DB Address Records"​ command="​permissions.addressReload"/>​
 + <cmd name="​mtlist"​ title="​MTree - List Records"​ command="​mtree.list"/>​
 + <cmd name="​mtreload"​ title="​MTree - Reload Records"​ command="​mtree.reload"/>​
 + <cmd name="​pdtlist"​ title="​PDT - List Records"​ command="​pdt.list"/>​
 + <cmd name="​pdtreload"​ title="​PDT - Reload Records"​ command="​pdt.reload"/>​
 +        </​JRCommands>​
 +    </​JRConfig>​
 +</​PluginService>​
 +</​code>​
 +
 +The IP, Port and URL path for Kamailio'​s JSONRPC socket (default is Kamailio'​s IP and SIP port) has to be set in **RSocket**.
 +
 +In case you want to have a drop-down menu with JSONRPC commands, fill in new ‘cmd’ tags in ‘JRCommands’ node.
 +
 +{{tag>​siremis kamailio}}


Copyright 2010-2020 Asipto.com