Thank you for explaining your project, it make much more sense now.

The UAC module is typically used to send SIP ping (SIP OPTIONS requests) to
remote gateways to check their availability, as well as to do cascade SIP
registration etc.

Theoretically, you can use it to send SIP INVITE but it would likely create
more problems then solutions, just like theoretically you can drive a car
over a railway track but it would be hell of a bumpy ride.

Nevertheless, take a look at uac_send documentation which explains its
usage with example, just copy/paste the example and adopt it for your needs
e.g. change SIP method to INVITE, set correct TO, FROM, CONTACT and VIA
headers etc. so the destination can receive your request and you can
receive its responses etc. This will only work if destination does not do
authentication and authorization, otherwise you have to track destination
responses and do authentication as well using same uac_send method.

To send SIP request to remote gateway,
https://kamailio.org/docs/modules/devel/modules/uac.html#uac.f.uac_req_send

To receive responses from remote gateway and process them (e.g. for
authentication),
https://kamailio.org/docs/modules/devel/modules/uac.html#uac.ert.uac_reply

Regards.



On Wed, 28 Jan 2026, 02:36 Sarju Garg, <[email protected]> wrote:

> Hi,
>
>
>
> Sorry for bothering you again.
>
>
>
> We did read your mail and then also read a lot on ChatGPT and got big time
> CONFUSED.
>
>
>
> Just to clarify, we are building a *missed OBD/IBD platform* with *zero
> media involvement and only SIP signalling*.  We are only planning to do
> missed OBD where we dial the number and disconnect as soon as call rings.
> There is no media involved in the call. Also, we would like to build a
> missed call service where a party call us, and we send 480 busy here. Here
> too, no media is involved.
>
>
>
> The link below have reference to UAC module. If kamalio is only a router,
> why UAC functionality is required.
>
>
>
> I agree with you that if need media functionalty then rtp_engine and
> external node is required.
>
>
>
> Please bear with us to write you back but we have build a highly scalable
> call transaction per system and looking forward to do it only with Kamalio
> and no asterisk etc.
>
>
>
> Regards
>
> Sarju
>
>
>
>
>
> *From: *M S <[email protected]>
> *Date: *Tuesday, 27 January 2026 at 11:09 PM
> *To: *Chandra Bhan <[email protected]>
> *Cc: *"Kamailio (SER) - Development Mailing List" <
> [email protected]>, Daniel-Constantin Mierla <[email protected]>,
> Sarju Garg <[email protected]>
> *Subject: *Re: [sr-dev] OBD Based Missed Call issue
>
>
>
> Please read my last email again. Kamailio is NOT an outbound dialer.
> Trying to originate an outbound call from it is NOT possible. Whoever told
> you otherwise is wrong and has misguided you.
>
>
>
> Also, the example code that you mentioned is incorrect as well. Please
> check kamailio documentation of relevant modules at,
>
>
>
> https://kamailio.org/docs/modules/devel/
>
>
>
> Regards.
>
>
>
> On Tue, 27 Jan 2026, 10:09 Chandra Bhan, <[email protected]> wrote:
>
> Hi
>
>
>
> Response is awaited
>
>
>
> Thanks & Regards
> Chandra Bhan Singh
> Mobile No:- 09999909109
>
>
>
> On Mon, 26 Jan, 2026, 19:53 Chandra Bhan, <[email protected]>
> wrote:
>
> Hi M S,
>
> Thank you so much for your quick response.
>
> I should mention that I don’t have deep expertise in Kamailio. I’ve been
> doing a lot of browsing and research (including ChatGPT), and based on that
> I found a few possible approaches to make outbound calls directly from
> Kamailio using a SIP trunk.
>
> Some of the methods I came across are:
>
>    - uac_send_request
>
>
>    - app_lua
>
>
>    - jsonrpc_exec
>
> My goal is to originate outbound calls directly from Kamailio (without
> Asterisk) toward a GSM/SIP gateway. I’m not fully sure which approach is
> the most appropriate or recommended in a production setup.
>
> I would really appreciate your guidance on the correct and supported way
> to achieve this.
>
> Thanks again for your time and support.
>
> For your reference I am sharing some sample code of two method
>
>
>
> 1st method
>
>
>
> event_route[xhttp:request] {
>
>
>
>     if ($hu =~ "^/obd") {
>
>
>
>         $avp(msisdn) = $(hu{param.value,msisdn});
>
>
>
>         if ($avp(msisdn) == $null) {
>
>             xhttp_reply("400", "Bad Request", "text/plain",
>
>                 "Missing msisdn\n");
>
>             exit;
>
>         }
>
>
>
>         # Destination URI for the call
>
>         $var(dst_uri) = "sip:" + $avp(msisdn) + "@182.77.59.145:5060";
>
>
>
>         # From URI (mandatory)
>
>         $var(from_uri) = "sip:[email protected]";
>
>
>
>         xlog("L_INFO", "Calling GSM number: $var(dst_uri)\n");
>
>
>
>         # Send INVITE using UAC
>
>         uac_req_send(
>
>             "INVITE",
>
>             $var(dst_uri),
>
>             $var(from_uri),
>
>             "",
>
>             ""
>
>         );
>
>
>
>         xhttp_reply("200", "OK", "text/plain",
>
>             "Call initiated\n");
>
>         exit;
>
>     }
>
>
>
>     xhttp_reply("404", "Not Found", "text/plain", "Not Found\n");
>
>     exit;
>
> }
>
>
>
> 2nd method .
>
>
>
> event_route[xhttp:request] {
>
>     if ($hu !~ "^/obd/") {
>
>         xhttp_reply("404", "Not Found", "", "");
>
>         exit;
>
>     }
>
>
>
>     $var(uri) = $hu;
>
>     $var(callee) = $(var(uri){s.select,3,/});
>
>
>
>     if ($var(callee) == "") {
>
>         xhttp_reply("400", "Missing MSISDN", "", "");
>
>         exit;
>
>     }
>
>
>
>     xlog("L_INFO", "OBD HTTP caller=9999909109 callee=$var(callee)\n");
>
>
>
>     $var(json) = "{\"jsonrpc\":\"2.0\",\"method\":\"dialog.bridge_dlg\","
>
>                  "\"params\":[\"sip:[email protected]\","
>
>                  "\"sip:$var(callee)@182.77.59.145\"],\"id\":1}";
>
>
>
>     jsonrpc_exec($var(json));
>
>     xhttp_reply("200", "OK", "", "OBD triggered\n");
>
>     exit;
>
> }
>
>
>
> Regards
>
> Chandra Bhan Kumar
> ------------------------------
>
> *From:* M S <[email protected]>
> *Sent:* Monday, January 26, 2026 7:30 PM
> *To:* Kamailio (SER) - Development Mailing List <[email protected]
> >
> *Cc:* Daniel-Constantin Mierla <[email protected]>; Chandra Bhan <
> [email protected]>
> *Subject:* Re: [sr-dev] OBD Based Missed Call issue
>
>
>
> Kamailio is NOT a media endpoint nor a media gateway. It is a SIP proxy
> that routes call between two endpoints, gateways or proxies. What you seems
> to do is trying to originate a call from Kamailio to some provider, which
> will simply not work.
>
>
>
> For Outbound Dialer service you need to setup some media gateway like
> Asterisk, Freeswitch or CUCM (Cisco Unified Media Gateway) etc.
>
>
>
> Regards.
>
>
>
> --
>
> Muhammad Shahzad Shafi.
>
> Tel: +49 176 99 83 10 85
>
>
>
> On Mon, 26 Jan 2026, 13:45 Chandra Bhan via sr-dev, <
> [email protected]> wrote:
>
> Hi Daniel
>
>
>
> I hope you are doing well. Looking for your support on kamailio.
>
>
>
> I am a new for kamailio. I want to build setup OBD Based Missed Call
> Solution
>
>
>
>    1. I able to send http request on kamailio but call not getting dial
>    due to some reason
>
> Here is my code. Could you help me to resolve the issue.
>
>
>
> #!KAMAILIO
>
>
>
> ####### Global Parameters #########
>
>
>
> debug=3
>
> log_stderror=yes
>
> memdbg=5
>
> memlog=5
>
> children=8
>
>
>
> tcp_accept_no_cl=yes
>
> auto_aliases=no
>
>
>
> listen=udp:172.26.12.138:5060
>
> listen=tcp:0.0.0.0:8080
>
>
>
> alias=your.public.ip   # optional
>
>
>
> ####### Modules Section ########
>
>
>
> loadmodule "sl.so"
>
> loadmodule "tm.so"
>
> loadmodule "tmx.so"
>
> loadmodule "rr.so"
>
> loadmodule "pv.so"
>
> loadmodule "xlog.so"
>
> loadmodule "textops.so"
>
> loadmodule "maxfwd.so"
>
> loadmodule "sanity.so"
>
> loadmodule "siputils.so"
>
> loadmodule "xhttp.so"
>
> loadmodule "uac.so"
>
>
>
> ####### Module Parameters ########
>
>
>
> # --- TM
>
> modparam("tm", "fr_timer", 5000)
>
> modparam("tm", "fr_inv_timer", 30000)
>
>
>
> # --- RR
>
> modparam("rr", "enable_double_rr", 1)
>
> modparam("rr", "append_fromtag", 1)
>
>
>
> # --- UAC (authentication profile)
>
> # format:
>
> # name => sip:proxy, username, password
>
> modparam("uac", "uac_reg",
>
>     "obd => sip:GSM-Gateway-IP:5060,2555,123456"
>
> )
>
>
>
> ####### Routing Logic ########
>
>
>
> request_route {
>
>
>
>     # Sanity checks
>
>     if (!sanity_check("1511", "7")) {
>
>         xlog("L_ERR", "Sanity failed\n");
>
>         drop;
>
>     }
>
>
>
>     if (!mf_process_maxfwd_header("10")) {
>
>         sl_send_reply("483", "Too Many Hops");
>
>         exit;
>
>     }
>
>
>
>     # Handle HTTP requests
>
>     if ($Rp == 8080 && $rm == "GET") {
>
>         route(HTTP);
>
>         exit;
>
>     }
>
>
>
>     # SIP requests (only outbound calls expected)
>
>     if (is_method("INVITE")) {
>
>         record_route();
>
>         t_relay();
>
>         exit;
>
>     }
>
>
>
>     if (is_method("ACK|BYE|CANCEL")) {
>
>         t_relay();
>
>         exit;
>
>     }
>
>
>
>     sl_send_reply("404", "Not Here");
>
>     exit;
>
> }
>
>
>
> ####### HTTP ROUTE ########
>
>
>
> route[HTTP] {
>
>
>
>     if ($hu =~ "^/call") {
>
>
>
>         # Example:
>
>         # http://IP:8080/call?msisdn=9999909109
>
>
>
>         $var(msisdn) = $param(msisdn);
>
>
>
>         if ($var(msisdn) == "") {
>
>             xhttp_reply("400", "text/plain", "Missing msisdn\n");
>
>             exit;
>
>         }
>
>
>
>         xlog("L_INFO", "HTTP Call request for $var(msisdn)\n");
>
>
>
>         route(OBD_CALL);
>
>         xhttp_reply("200", "text/plain", "Call initiated\n");
>
>         exit;
>
>     }
>
>
>
>     xhttp_reply("404", "text/plain", "Invalid URL\n");
>
>     exit;
>
> }
>
>
>
> ####### OUTBOUND CALL ROUTE ########
>
>
>
> route[OBD_CALL] {
>
>
>
>     $var(dst_uri) = "sip:" + $var(msisdn) + "@GSM-Gateway-IP:5060";
>
>
>
>     xlog("L_INFO", "Calling $var(dst_uri)\n");
>
>
>
>     uac_req_send(
>
>         "INVITE",
>
>         $var(dst_uri),
>
>         "sip:[email protected]",
>
>         "sip:" + $var(msisdn) + "@your.domain",
>
>         "",
>
>         "obd"
>
>     );
>
>
>
>     exit;
>
> }
>
>
>
>
>
> _______________________________________________
> Kamailio - Development Mailing List -- [email protected]
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
>
>
_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to