[SR-Users] Communicate with Kamailio through external application

Charles Chance charles.chance at sipcentric.com
Fri Sep 27 13:35:11 CEST 2013


Hi,

Have you added the appropriate listen= and/or port= directive to your
config?

http://www.kamailio.org/wiki/cookbooks/4.0.x/core#listen
http://www.kamailio.org/wiki/cookbooks/4.0.x/core#port

Also make sure you have not disabled TCP.

Regards,

Charles


On 27 September 2013 12:27, Grant Bagdasarian <GB at cm.nl> wrote:

> What am I doing wrong here?****
>
> ** **
>
> # ----- xhttp params ------****
>
> modparam("xhttp", "url_match", "null")****
>
> ** **
>
> # ----- xhttp_rpc params ------****
>
> modparam("xhttp_rpc", "xhttp_rpc_root", "http_rpc")****
>
> ** **
>
> ####### Routing Logic ########****
>
> ** **
>
> event_route[xhttp:request] {****
>
>        xlog("L_INFO", "************************************** RECEIVED
> NEW HTTP REQUEST:  $hu *********************************");****
>
>        xhttp_reply("200", "OK", "text/html","<html><body>OK – Request
> Received</body></html>");****
>
> }****
>
> ** **
>
> It seems like Kamailio isn’t receiving the HTTP requests.****
>
> Im doing a simple HTTP GET (http://192.168.1.10/http_rpc) using my
> browser to see if it hits the event_route.****
>
> From what I understand, the RCP command is in the url of the HTTP request,
> and is extracted using string transformations.****
>
> I’ve never done anything with RPC directly, so maybe I’m just wrong.****
>
> ** **
>
> Also, I don’t see Kamailio binding to the HTTP port.****
>
> The xhttp_rpc_root param only allows alphanumeric values, so I can’t
> specify a full URL.****
>
> ** **
>
> ** **
>
> ** **
>
> *From:* sr-users-bounces at lists.sip-router.org [mailto:
> sr-users-bounces at lists.sip-router.org] *On Behalf Of *Grant Bagdasarian
> *Sent:* Friday, September 27, 2013 10:04 AM
> *To:* Kamailio (SER) - Users Mailing List
> *Subject:* Re: [SR-Users] Communicate with Kamailio through external
> application****
>
> ** **
>
> Thanks, I’ll have a look at it. ****
>
> Looks much easier than setting up Ssh connections programmatically. ****
>
> ** **
>
> *From:* sr-users-bounces at lists.sip-router.org [
> mailto:sr-users-bounces at lists.sip-router.org<sr-users-bounces at lists.sip-router.org>]
> *On Behalf Of *Charles Chance
> *Sent:* Wednesday, September 25, 2013 1:12 PM
> *To:* Kamailio (SER) - Users Mailing List
> *Subject:* Re: [SR-Users] Communicate with Kamailio through external
> application****
>
> ** **
>
> Hi,****
>
> ** **
>
> Take a look at
> http://www.kamailio.org/docs/modules/stable/modules/xhttp_rpc.html, which
> allows you to receive/handle RPC commands over HTTP.****
>
> ** **
>
> Then use the appropriate RPC command in dispatcher module to reload table:
> http://www.kamailio.org/docs/modules/stable/modules/dispatcher.html#idp16998512
> ****
>
> ** **
>
> Regards,****
>
> ** **
>
> Charles****
>
> ** **
>
> ** **
>
> On 25 September 2013 11:40, Grant Bagdasarian <GB at cm.nl> wrote:****
>
> Hello,****
>
>  ****
>
> When adding rows to the dispatcher table, the table in memory needs to be
> refreshed. Since we have multiple Kamailio instances running on different
> machines, I’d like to automate the process of reloading the table.****
>
> Is there an easy way of doing this with an already existing module, which
> provides easy connectivity from the outside?****
>
> Or do I need to write an application which basically sets up a SSH socket
> connection with the machine and sends the command “kamctl dispatcher
> reload” then exit? Not that hard either, but there might be a finer
> solution available.****
>
>  ****
>
> Regards,****
>
>  ****
>
> Grant****
>
>  ****
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users****
>
> ** **
>
>
> www.sipcentric.com
>
> Follow us on twitter @sipcentric <http://twitter.com/sipcentric>
>
> Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered
> office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham
> B7 4EJ.****
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>

-- 
www.sipcentric.com

Follow us on twitter @sipcentric <http://twitter.com/sipcentric>

Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Unit 10 iBIC, Birmingham Science Park, Holt Court South, Birmingham 
B7 4EJ.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130927/25a5e818/attachment-0001.html>


More information about the sr-users mailing list