http_async_client

David Villasmil via sr-users <[email protected]>
Newsgroups gmane.comp.voip.ser
Message-ID <CAFGRPVoE4CjNPsebQEAoZS2V0X6Z+=4UBfFj5ZBYnRoqFJSOvg@mail.gmail.com>
Hello guys,

I'm trying to use http_async_client to send a json to a server and it's
supposed to use $http_req(body) to set the content... there's no way i can
make it work:

/usr/sbin/kamailio[3197588]: INFO: <script>: HTTP body:
{"from":"XXXX","to":["XXXX"],"call_id":"fJYJFHAgao","timestamp":"2025-09-25T20:14:52Z"}
<- my var
 /usr/sbin/kamailio[3197588]: INFO: <script>: HTTP body: <null> <- $http_req

cfg:
                xlog("L_INFO", "HTTP body: $var(body)\n");
                $http_req(body) = $var(body);
                xlog("L_INFO", "HTTP body: $http_req(body)\n");

It seems to me that $http_req(body) is write only, BUT on the web server:
{"error":"Invalid request: missing required fields (from,
to)","received":{}} [353]


Help is appreciated, thanks!

Regards,

David Villasmil
email: [email protected]

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [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!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.