Thanks Alex !. I think that will work for me. -RK On Monday, January 13, 2020, 08:14:53 PM PST, Alex Balashov <[email protected]> wrote: Sorry, that should have been jsonrpc_exec().
On Mon, Jan 13, 2020 at 11:12:34PM -0500, Alex Balashov wrote: > On Tue, Jan 14, 2020 at 04:05:48AM +0000, Rupesh Kumar wrote: > > > I know the uac module can send custom requests via uac_req_send, but > > can I invoke this via a kamcmd or kamctl command ?Any pointers/clues > > would be a great help. > > I'm not sure if there's an RPC command, but you can trigger such an > action via a custom HTTP call, i.e. via xhttp: > > https://kamailio.org/docs/modules/5.3.x/modules/xhttp.html#xhttp.f.xhttp_reply > > Get this module set up, add an event route with this functionality, i.e. > > event_route[xhttp:request] { > # Possibly some authentication. > > if($hu =~ '^/send_notify') { > # Access all registered contacts via DB call to `location` or > # via json_exec() to `ul.dump` RPC command or whatnot.[1] > > ... > > uac_req_send(); > exit; > } > } > > Then send an HTTP request to this route, i.e. > > # curl ... http://your_kamailio_tcp_listener:5060/send_notify > > -- Alex > > [1] > https://kamailio.org/docs/modules/5.3.x/modules/jsonrpcs.html#jsonrpcs.f.jsonrpc_exec > > -- > Alex Balashov | Principal | Evariste Systems LLC > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ _______________________________________________ Kamailio (SER) - Users Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ Kamailio (SER) - Users Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
