Hi,
I have a question regarding the XMLRPC commands in the siremis GUI.
【Environment】
・Centos7
・kamailio 5.5.2
・siremis 5.3
(installed by git clone
https://github.com/asipto/siremis
<https://github.com/asipto/siremis> siremis-5.3.x)
・php:
$ rpm -qa | grep php
php-process-5.4.16-48.el7.x86_64
php-common-5.4.16-48.el7.x86_64
php-mysqlnd-5.4.16-48.el7.x86_64
php-pdo-5.4.16-48.el7.x86_64
php-xml-5.4.16-48.el7.x86_64
php-cli-5.4.16-48.el7.x86_64
php-5.4.16-48.el7.x86_64
php-pear-1.9.4-22.el7.noarch
・apache 2.4.6
When I execute commands in command service → XMLPRC from siremis GUI, it always shows no
result.
It looks like the command is not being executed.
I also executed these commands on server, and there are no problem.
There is no error in apache log and kamailio is also working.
This is what I have in /etc/kamailio/kamailio.cfg
#!KAMAILIO
#!define WITH_XMLRPC
#!define WITH_DEBUG
#!define DBURL "mysql://kamailio:kamailiorw@localhost/kamailio"
# - flags
#FLT_ - per transaction (message) flags
#FLB_ - per branch flags
#!define FLT_ACC 1
#!define FLT_ACCMISSED 2
#!define FLT_ACCFAILED 3
#!define WITH_MYSQL
#!define WITH_NAT
####### Global Parameters #########
#!ifdef WITH_DEBUG
debug=4
log_stderror=yes
#!else
debug=2
log_stderror=no
#!endif
#!ifdef WITH_MYSQL
loadmodule "db_mysql.so"
#!endif
#!ifdef WITH_NAT
loadmodule "nathelper.so"
#!ifdef WITH_RTPENGINE
loadmodule "rtpengine.so"
#!else
loadmodule "rtpproxy.so"
#!endif
#!endif
#!ifdef WITH_JSONRPC
loadmodule "xhttp.so"
#!endif
memdbg=5
memlog=5
log_facility=LOG_LOCAL0
fork=yes
children=4
disable_tcp=yes
auto_aliases=no
port=5060
listen=udp:172.23.0.246:5060 <http://172.23.0.246:5060> advertise 52.69.75.254:5060
<http://52.69.75.254:5060>
sip_warning=no
####### Modules Section ########
# set module path
#mpath="/usr/local/lib/kamailio/modules/"
#loadmodule "db_mysql.so"
loadmodule "tm.so"
loadmodule "tmx.so"
loadmodule "sl.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "maxfwd.so"
loadmodule "textops.so"
loadmodule "siputils.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "ctl.so"
loadmodule "acc.so"
loadmodule "dispatcher.so"
loadmodule "uac.so"
loadmodule "sqlops"
loadmodule "rtimer"
loadmodule "jsonrpcs.so"
loadmodule "kex.so"
loadmodule "corex.so"
# ----- jsonrpcs params -----
modparam("jsonrpcs", "pretty_format", 1)
modparam("jsonrpcs", "dgram_socket",
"/var/run/kamailio/kamailio_rpc.sock")
modparam("jsonrpcs", "dgram_mode", 0666)
modparam("jsonrpcs", "dgram_user", "kamailio")
modparam("jsonrpcs", "dgram_group", "kamailio")
modparam("jsonrpcs", "transport", 0)
# ----- xmlrpc params -----
#modparam("xmlrpc", "route", "XMLRPC")
#modparam("xmlrpc", "url_match", "^/RPC")
# ----- rr params -----
modparam("rr", "append_fromtag", 1)
# ----- R Timer -----
modparam("rtimer", "timer",
"name=cdr;interval=300;mode=1;")
modparam("rtimer", "exec", "timer=cdr;route=CDRS")
# ----- acc params -----
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
modparam("acc", "log_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;src_ip=$si")
# ----- tm params -----
modparam("tm", "fr_timer", 2000)
modparam("tm", "fr_inv_timer", 40000)
modparam("tm", "auto_inv_100_reason", "Trying")
# ----- dispatcher params -----
modparam("dispatcher", "db_url", DBURL)
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "xavp_dst", "_dsdst_")
modparam("dispatcher", "xavp_ctx", "_dsctx_")
modparam("dispatcher", "ds_ping_from", "sip:proxy@52.69.75.254
<mailto:sip%3Aproxy@52.69.75.254>")
modparam("dispatcher", "ds_ping_interval", 60)
modparam("dispatcher", "ds_probing_mode", 1)
modparam("dispatcher", "ds_timer_mode", 1)
modparam("dispatcher", "xavp_dst_mode", 0)
modparam("dispatcher", "ds_ping_latency_stats", 1)
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_probing_threshold", 10)
modparam("dispatcher", "ds_inactive_threshold", 10)
modparam("dispatcher",
"ds_ping_reply_codes","class=2;code=403;code=404;code=484;class=3")
# ----- uac params -----
modparam("uac", "reg_db_url", DBURL)
modparam("uac", "reg_contact_addr", "52.69.75.254")
modparam("uac", "reg_db_table", "uacreg")
# ----- mysql -----
modparam("sqlops",
"sqlcon","cb=>mysql://kamailio:kamailiorw@localhost/kamailio")
####### Routing Logic ########
# main request routing logic
request_route {
# per request initial checks
route(REQINIT);
# CANCEL processing
if (is_method("CANCEL")) {
if (t_check_trans()) {
route(RELAY);
}
exit;
}
# handle retransmissions
if (!is_method("ACK")) {
if(t_precheck_trans()) {
t_check_trans();
exit;
}
t_check_trans();
}
# handle requests within SIP dialogs
route(WITHINDLG);
### only initial requests (no To tag)
# record routing for dialog forming requests (in case they are routed)
# - remove preloaded route headers
remove_hf("Route");
if (is_method("INVITE|SUBSCRIBE")) {
record_route();
}
# account only INVITEs
if (is_method("INVITE")) {
setflag(FLT_ACC); # do accounting
}
# handle presence related requests
route(PRESENCE);
# handle registrations
route(REGISTRAR);
if ($rU==$null) {
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}
# dispatch destinations
route(DISPATCH);
}
route[RELAY] {
if (!t_relay()) {
sl_reply_error();
}
exit;
}
# Per SIP request initial checks
route[REQINIT] {
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
}
if(!sanity_check("1511", "7")) {
xlog("Malformed SIP message from $si:$sp\n");
exit;
}
}
# Handle requests within SIP dialogs
route[WITHINDLG] {
if (!has_totag()) {
return;
}
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
}
route(RELAY);
}
if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
}
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
t_relay();
exit;
} else {
exit;
}
}
sl_send_reply("404","Not here");
exit;
}
# Handle SIP registrations
route[REGISTRAR] {
if(!is_method("REGISTER"))
return;
sl_send_reply("404", "No registrar");
exit;
}
# Presence server route
route[PRESENCE] {
if(!is_method("PUBLISH|SUBSCRIBE"))
return;
sl_send_reply("404", "Not here");
exit;
}
# Dispatch requests
route[DISPATCH] {
# round robin dispatching on gateways group '1'
if(!ds_select_dst("1", "11")) {
send_reply("404", "No destination");
exit;
}
xdbg("--- SCRIPT: going to <$ru> via <$du> (attrs:
$xavp(_dsdst_=>attrs))\n");
t_on_failure("RTF_DISPATCH");
route(RELAY);
exit;
}
# Try next destionations in failure route
failure_route[RTF_DISPATCH] {
if (t_is_canceled()) {
exit;
}
# next DST - only for 500 or local timeout
if (t_check_status("500|486")
or (t_branch_timeout() and !t_branch_replied())) {
if(ds_next_dst()) {
xdbg("--- SCRIPT: retrying to <$ru> via <$du>
(attrs: $xavp(_dsdst_=>attrs))\n");
t_on_failure("RTF_DISPATCH");
route(RELAY);
exit;
}
}
}
I have tried my best to do some researches about it, but still stuck.
Any help is appreciated. Thank you!
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
*
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users