[SR-Users] Forwarding SIP status code to HTTP client

Henning Westerholt hw at gilawa.com
Thu May 19 09:31:21 CEST 2022


Hello,

you can send arbitrary status codes back in the http reply, I think. Just get the SIP status code and use it.
There are async client http modules that offers resume functionality for the client side.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Tim Anderson
Sent: Thursday, May 19, 2022 2:01 AM
To: sr-users at lists.kamailio.org
Subject: [SR-Users] Forwarding SIP status code to HTTP client


Hi,

I have a kamailio that is has an HTTP message server. Is it possible to send the SIP status code back in the HTTP reply? Is it possible to suspend an xhttp request while some other stuff happens and then send the reply later?

The relevant bit of the config currently looks like

event_route[xhttp:request]{

    if($hu == "/sms"){

        $uac_req(method)="MESSAGE";

        $uac_req(ruri)="sip:1234 at example.com"<sip:1234 at example.com>;

        $uac_req(furi)="sip:4567 at example.com"<sip:4567 at example.com>;

        $uac_req(turi)="sip:1234 at example.com"<sip:1234 at example.com>;

        $uac_req(body)=$rb;

        uac_req_send();

        xhttp_reply("200", "OK", "text/plain", "Sent")

    }

}



Regards,

Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220519/4735f4ab/attachment.htm>


More information about the sr-users mailing list