[SR-Users] http_async_client - queries

Ramachandran, Agalya (Contractor) Agalya_Ramachandran at comcast.com
Wed Nov 30 20:00:55 CET 2016


Hi team,

We are trying to use kamailio for our project purpose, which will be used as a proxy server.
Am trying to use "http_async_client" module to send my rest queries asynchronously.

I have few queries regarding the usage of http_async_query() and using PUT method.
http_append_header("Authorization: Bearer $var(auth)");
http_append_header("Content-Type: application/json");
http_set_method("PUT");
http_async_query("http://sdk-evm-wcdc-c-001.rtc.sys.comcast.net/events/createxmpprooteventfortn", "{'from_tn':'$fU','to_tn':'$tU','callid':'ci'}", "HTTP_REPLY");

Here am passing from, to, callid in post data field.
Passing as 'key':'value'  is mandatory or I can pass only value- ?

In the file, async_http.c - in async_send_query(), if I modify the post data to the format I need, I see the value is truncated up to three fields only.
How can I achieve that my payload format whatever I form in async_send_query(),doesn't get truncated and will be passed to the server-?
Can you please explain how this works-?

Also, I observed that kamailio is restricting the content-length of HTTP request to 256.
Is this something modifiable-? If so please guide me how this can be achieved.

Regards,
Agalya

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161130/04722c9f/attachment.html>


More information about the sr-users mailing list