Hi All,

I am configuring Kamailio version 4.4 with jsonrpc-s and xhttp module. My
aim is to use Kamailio commands using RPC from a remote server. I need help
to solve error. After send rpc command, I got execution error in response.

I am attaching code in kamailio.cfg file for jsonrp.

event_route[xhttp:request] {
        if(src_ip!=127.0.0.1){
                xhttp_reply("403", "Forbidden", "text/html",
                        "<html><body>Not allowed from $si</body></html>"
                );
                exit;
        }
        if ($hu =~ "^/RPC"){
                xlog("json rpc dispatch");
                # xlog($jsonrpl(method));
                jsonrpc_exec('{"jsonrpc": "2.0", "method":
"dispatcher.reload", "id": 1}');
                jsonrpc_dispatch();
                # xlog($jsonrpl(code));
                # xlog($jsonrpl(text));
                # xlog($jsonrpl(body));
                xhttp_reply("200", "OK", "text/html", "<html><body>
$jsonrpl(text), $jsonrpl(body)</body></html>");
        } else {
                xhttp_reply("200", "OK", "text/html",
            "<html><body>Wrong URL $hu</body></html>");
        }
        return;
}

Also, I am attaching logs. which could help you.



If you can dream it, we will deliver it.

<https://www.facebook.com/linteltechnologies/>
<https://www.linkedin.com/company/7045679/> <http://blog.lintel.in/>

Deepen Patel

Python Developer

A  507, Ashwamegh Elegance-2, Beside Central Mall,

Ahmedabad - 380015 Gujarat, India

P +1(281) 205-9247  M +91-898-077-3553

E [email protected]

Skype deepenpatel.lintel W <http://lintel.in>http://lintel.in

The science of today is Technology of tomorrow.

Attachment: kamailio_jsonrpc_error
Description: Binary data

_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to