[SR-Users] http_async_client

2025-09-25 Thread David Villasmil via sr-users
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:

[SR-Users] http_async_client and sl_send_reply()

2024-04-27 Thread Masud Muborakshohi via sr-users
Hello! I have a problem when sending a response sl_send_reply("415", "The other party does not support video calling!"); in route[HTTP_REPLY]. When I make a request using http_async_query() to send a push notification to a mobile device, I need to process the response from the push server and res

Re: [SR-Users] http_async_client "route_name" is what type of route?

2022-09-29 Thread Daniel-Constantin Mierla
nit 6 >> Boca Raton, FL 33487 >> Office: 916-235-2097 Main: 888-444- >> email: bbrid...@call48.com | web: www.call48.com >> >> >> -----Original Message- >> From: sr-users On Behalf Of Brooks >> Bridges >> Sent: Thursday, September 29,

Re: [SR-Users] http_async_client "route_name" is what type of route?

2022-09-29 Thread Alex Balashov
. Rogers Circle, Unit 6 > Boca Raton, FL 33487 > Office: 916-235-2097 Main: 888-444- > email: bbrid...@call48.com | web: www.call48.com > > > -Original Message- > From: sr-users On Behalf Of Brooks > Bridges > Sent: Thursday, September 29, 2022 14:09 &

Re: [SR-Users] http_async_client "route_name" is what type of route?

2022-09-29 Thread Brooks Bridges
ptember 29, 2022 14:09 To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] http_async_client "route_name" is what type of route? That was kind of my thought too, but ... Anyway, that just brought up a whole host of other problems, so I don't see that being feasible either.

Re: [SR-Users] http_async_client "route_name" is what type of route?

2022-09-29 Thread Brooks Bridges
ssage- > From: sr-users On Behalf Of Alex > Balashov > Sent: Thursday, September 29, 2022 13:50 > To: Kamailio (SER) - Users Mailing List > Subject: Re: [SR-Users] http_async_client "route_name" is what type of route? > > It’s a module-specific event route. >

Re: [SR-Users] http_async_client "route_name" is what type of route?

2022-09-29 Thread Alex Balashov
Balashov > Sent: Thursday, September 29, 2022 13:50 > To: Kamailio (SER) - Users Mailing List > Subject: Re: [SR-Users] http_async_client "route_name" is what type of route? > > It’s a module-specific event route. > > Are you using $http_req(suspend)? If so, try

Re: [SR-Users] http_async_client "route_name" is what type of route?

2022-09-29 Thread Brooks Bridges
| web: www.call48.com -Original Message- From: sr-users On Behalf Of Alex Balashov Sent: Thursday, September 29, 2022 13:50 To: Kamailio (SER) - Users Mailing List Subject: Re: [SR-Users] http_async_client "route_name" is what type of route? It’s a module-specific event route.

Re: [SR-Users] http_async_client "route_name" is what type of route?

2022-09-29 Thread Alex Balashov
It’s a module-specific event route. Are you using $http_req(suspend)? If so, try — and it’s a long shot, but try it: route[HTTP_REPLY] { … route(ANOTHER_ROUTE); } Are the functions you want available inside route[ANOTHER_ROUTE]? — Alex > On Sep 29, 2022, at 4:46 PM, Brooks B

[SR-Users] http_async_client "route_name" is what type of route?

2022-09-29 Thread Brooks Bridges
Running into an issue where I can't access certain functions inside the response route or "route_name" for handling the asynchronous reply from an http_async_query() that's being run. Does anyone know what type of route that is considered to be? I know it's not a request route or a failure rou

Re: [SR-Users] http_async_client "route_name" is considered a failure route?

2021-10-15 Thread ‪M S‬
alling this function, in which case it is best to call this function in branch route instead of main or failure route.Hope this helps.--Muhammad Shahzad ShafiTel: +49 176 99 83 10 85 Original message From: Brooks Bridges Date: Fri, 15 Oct 2021, 17:03To: sr-users@lists.kamailio.o

[SR-Users] http_async_client "route_name" is considered a failure route?

2021-10-15 Thread Brooks Bridges
So I've been working on this for a while, and I cannot seem to find a way around this. When using the http_async_client to request data from an external API, the returned data in the "route_name" target is being treated as a failure route, so most of the subsequent processing and messaging that

Re: [SR-Users] http_async_client expected result in $http_rr

2021-02-10 Thread Anthony Joseph Messina
After a bit more research, it seems that since my connection is using HTTP/2, there is no Reason-Phrase... So I'll need to parse the json in the body. https://tools.ietf.org/html/rfc7540#section-8.1.2.4 DEBUG: http_async_client [async_http.c:162]: async_http_cb(): query result = HTTP/2 202 dat

Re: [SR-Users] http_async_client expected result in $http_rr

2021-02-10 Thread Federico Cabiddu
Hi, just tested on latest 5.4 (ubuntu 20.04, curl 7.68.0) and http_rr works as expected, returning the reason phrase. Can you give some more detail and maybe run a test with increased debug level? Regards, Federico On Wed, Feb 10, 2021 at 4:14 AM Anthony Joseph Messina < amess...@messinet.com>

[SR-Users] http_async_client expected result in $http_rr

2021-02-09 Thread Anthony Joseph Messina
https://www.kamailio.org/docs/modules/stable/modules/http_async_client says $http_rr will be the HTTP reason phrase. I'm understanding this to mean: Code: Reason: 200 OK 404 Not Found In my current 5.4 build, $http_rr returns empty (not or anything else) regardless of what the serve

Re: [SR-Users] http_async_client

2020-11-02 Thread Brandon Armstead
Thanks for the update. Working on making peace with it :P, moving some stuff around has resolved my immediate issue. On Mon, Nov 2, 2020 at 5:45 PM Alex Balashov wrote: > It will not go back to request_route; you'll have to make peace with that. > > Most things are valid in the continued route.

Re: [SR-Users] http_async_client

2020-11-02 Thread Alex Balashov
It will not go back to request_route; you'll have to make peace with that. Most things are valid in the continued route. A few will doubtless exhibit quirky behaviour as the state doesn't make it across properly from the original requet_route. I haven't been adversely impacted by this in my ex

Re: [SR-Users] http_async_client

2020-11-02 Thread Brandon Armstead
Alex, Hey hows it going! I realize execution continues in ROUTENAME however after this route is completed it does not go back to request_route { }. I suppose I could move the config around, just wanted to double check. Also part of the issue here is that I'm finding certain functions i.e. ms

Re: [SR-Users] http_async_client

2020-11-02 Thread Alex Balashov
Correct, this is expected behaviour. Execution will continue in ROUTENAME instead of returning to the calling route. On 11/2/20 8:33 PM, Brandon Armstead wrote: kamailio 5.5.0-dev3 I'm unsure if this is expected behavior, so thought I would ask... When using http_async_query("URI", "ROUTENAME

[SR-Users] http_async_client

2020-11-02 Thread Brandon Armstead
kamailio 5.5.0-dev3 I'm unsure if this is expected behavior, so thought I would ask... When using http_async_query("URI", "ROUTENAME") request_route { route(AUTH); # this does not get executed below route(AUTH) xinfo("[$ci][$rm] we hit this line"); } route[AUTH] { t_newtran();

Re: [SR-Users] http_async_client and HTTP2

2019-11-18 Thread Federico Cabiddu
amailio services – https://gilawa.com > > Kamailio Merchandising – https://skalatan.de/merchandising > > > > *From:* sr-users *On Behalf Of *Igor > Olhovskiy > *Sent:* Thursday, November 14, 2019 7:41 PM > *To:* Kamailio (SER) - Users Mailing List > *Subject:* [SR-Users] http_

Re: [SR-Users] http_async_client and HTTP2

2019-11-15 Thread Henning Westerholt
://gilawa.com<https://gilawa.com/> Kamailio Merchandising – https://skalatan.de/merchandising From: sr-users On Behalf Of Igor Olhovskiy Sent: Thursday, November 14, 2019 7:41 PM To: Kamailio (SER) - Users Mailing List Subject: [SR-Users] http_async_client and HTTP2 HI! Seems to be, http_async cli

Re: [SR-Users] http_async_client and HTTP2

2019-11-15 Thread Federico Cabiddu
Hi Igor, I just opened a PR (https://github.com/kamailio/kamailio/pull/2132) for adding http/2 replies parsing in the core. Cheers, Federico On Thu, Nov 14, 2019 at 7:42 PM Igor Olhovskiy wrote: > HI! > > Seems to be, http_async client is not compatible with http2 servers. > > I'm having like

[SR-Users] http_async_client and HTTP2

2019-11-14 Thread Igor Olhovskiy
HI! Seems to be, http_async client is not compatible with http2 servers. I'm having like kamailio_1| 15(20) INFO: http_async_client [http_multi.c:238]: debug_cb(): [cURL] Connection #0 to host relay-api.pbxservice.com left intact kamailio_1| 15(20) ERROR: [core/parser/parse_fline.c:264]

Re: [SR-Users] Http_async_client stops script execution

2018-10-18 Thread Denys Pozniak
By the way, please explain how number of workers affect on performance? modparam("http_async_client", "workers", 10) чт, 18 окт. 2018 г. в 10:35, Denys Pozniak : > Hello! > Version 5.1.3 works well in non-transactional mode ( $http_req(suspend) = > 0; ) > > [root@10-10-10-10 ~]# kamailio -v > ver

Re: [SR-Users] Http_async_client stops script execution

2018-10-18 Thread Denys Pozniak
Hello! Version 5.1.3 works well in non-transactional mode ( $http_req(suspend) = 0; ) [root@10-10-10-10 ~]# kamailio -v version: kamailio 5.1.3 (x86_64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F

Re: [SR-Users] Http_async_client stops script execution

2018-09-28 Thread Federico Cabiddu
Hi, as far as I can see that part has not substantially changed. Can you try with latest stable release in 5.1? Best regards, Federico On Thu, Sep 27, 2018 at 5:03 PM Denys Pozniak wrote: > This example does not work. I do not see log message. > > *Example 1.13. http_async_suspend() usage* > >

Re: [SR-Users] Http_async_client stops script execution

2018-09-27 Thread Denys Pozniak
This example does not work. I do not see log message. *Example 1.13. http_async_suspend() usage* ... t_newtran(); http_async_suspend(0); # the transaction won't be suspended for the next query http_async_query("http://example.com/test.php";, "HTTP_REPLY"); xlog("L_INFO", "query sent\n"); t_reply(

Re: [SR-Users] Http_async_client stops script execution

2018-09-27 Thread Federico Cabiddu
What do you mean with "does not work well "? I don't remember any change in that part but anyway you should switch to 5.0 or 5.1 releases, since those are the maintained ones. Best regards, Federico On Thu, Sep 27, 2018 at 4:50 PM Denys Pozniak wrote: > Looks like http_async_suspend(0); does n

Re: [SR-Users] Http_async_client stops script execution

2018-09-27 Thread Denys Pozniak
Looks like http_async_suspend(0); does not work well in v4.4.2. https://www.kamailio.org/docs/modules/4.4.x/modules/http_async_client.html#http_async_client.f.http_async_suspend 2018-09-27 17:40 GMT+03:00 Denys Pozniak : > So my config is ok and I need to add all next logic with call routing to

Re: [SR-Users] Http_async_client stops script execution

2018-09-27 Thread Denys Pozniak
So my config is ok and I need to add all next logic with call routing to route[HTTP_REPLY] ,correct ? 2018-09-27 16:42 GMT+03:00 Federico Cabiddu : > Hi, > if you are in a transactional contest (as you are since you are calling > t_newtran()), the script execution is suspended, upon calling > h

Re: [SR-Users] Http_async_client stops script execution

2018-09-27 Thread Federico Cabiddu
Hi, if you are in a transactional contest (as you are since you are calling t_newtran()), the script execution is suspended, upon calling http_async_query and resumed in the callback route passed as parameter. The instructions after the call to http_async_query are never executed. If you are not in

[SR-Users] Http_async_client stops script execution

2018-09-27 Thread Denys Pozniak
Hello! Please help me to understand how http_async_client module behaves. I am going to use it for call routing according to the http response. if (is_method("INVITE")) { t_newtran(); xlog("L_ERR", "ASYNC0-$fU-$rU-$rm \n"); http_set_timeout(1000); http_set_meth

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-20 Thread Giacomo Vacca
Hi Giovanni, I'm glad it's fixed. The patch was pushed in 5.0 branch after the latest release (5.0.4, Oct 25th 2017), so it should be available as soon as 5.0.5 will be released (I think soon). Best Regards, Giacomo On 20 November 2017 at 15:12, gmele wrote: > Hi, > > I recompiled the http_asyn

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-20 Thread gmele
Hi, I recompiled the http_async_client instead of using the one provided in the rpm repository: all is working fine! I think we can close the topic! Do do know where we can find rpm with the latest 5.0.4 release? Regards Giovanni -- Sent from: http://sip-router.1086192.n5.nabble.com/Users-

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-20 Thread gmele
Hello Giacomo, I installed latest rpm found on http://download.opensuse.org/repositories/home:/kamailio:/v5.0.x-rpms/CentOS_7/x86_64/. Build date is Nov 16. I also installed curl version 7.52.1. After the installation, I started to test the https connection and still get the same problem with c

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-10 Thread gmele
Hello Giacomo, thx for your investigation. We will move to kamailio 5.1 in 2-3 weeks. I will resume the testing of the http_async_client after the migration on our lab. I hope this will fix the problem :-) Do you think we alsoneed to migrate curl? Or could we stay with the official centos 7 ver

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-09 Thread Giacomo Vacca
Hi Giovanni, This is what I've done, on the same CentOS 7.4.1708 (and libcurl 7.56.1-1.0.cf.rhel7) machine referred to in this thread. - Checked out 071b85f66cabaa3a705a014b26b7c1eb31029b26 from branch 5.0 (which is the last one before Aug 18th). - Used the latest http_async_client module - make

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-09 Thread gmele
Hello Giacomo, any news on this topic? Are you waiting something from me? Thx Giovanni -- Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.or

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-07 Thread gmele
Hello, I reduced the number of kamailio children to 1 and found something that may be interesting: all requests are processed by 1 principal thread, but time to time, another thread handle them (why, I don't know as children=1). When this occurs, the https request ALWAYS fails with error 77. When

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-07 Thread gmele
Hello Giacomo, here are the requested info: 1) unfortunately, I cannot give you this information as we copied the source from git branch 5.0, August 18th and put it in our own source control (Perforce) 2)1-2 requests per seconds seems ok, but as soon rate increases, problem appears 3) I cannot

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-06 Thread Giacomo Vacca
OK Giovanni, then I'd need some more information to try and get to the root cause, like: - 5.0.2 git hash you've applied the patch on. - Rate of requests that seem to trigger this behaviour. - A sample .cfg file I can use to simulate your scenario (you posted one at the beginning but please see if

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-06 Thread gmele
Hello Giacomo, I patched my branch 5.0.2 with your modifications, but the result is the same: same problem occurs with heavy load and lot of http requests in parallel. Same error code 77. I didn't upgrade the version of curl. I will maybe give it a try. Can you give me the link from where you dow

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-04 Thread Giacomo Vacca
Hi Giovanni, This commit attempts to fix the issue: https://github.com/kamailio/kamailio/commit/574a11d8c0c20d3d0c058726609df8ed4e5b68dc Would it be possible to try that branch or patch the module accordingly? I've tested it on CentOS 7.4.1708 with libcurl 7.56.1-1.0.cf.rhel7 (but I don't think th

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-03 Thread gmele
Ok, thx! BTW, do you know if it is possible to build the http_async_client rpm on the openSUSE download server? The http_client is present, but not the http_async one Regards Giovanni -- Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html _

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-03 Thread Giacomo Vacca
OK Giovanni, this is likely to be an issue with the way CURLOPT_CAPATH is set. I'll submit a fix as soon as possible. Giacomo On 3 November 2017 at 09:49, gmele wrote: > Hello Giacomo, > > currently, I don't see these CURL warnings. Here are the logs I get using > the verbose mode of Curl. > >

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-03 Thread gmele
Hello Giacomo, currently, I don't see these CURL warnings. Here are the logs I get using the verbose mode of Curl. When it works: Nov 3 08:41:46 d-wn-sipregistrar-003 kamailio-registrar[18948]: INFO: http_async_client [http_multi.c:238]: debug_cb(): [cURL] About to connect() to pusher-service p

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-02 Thread Giacomo Vacca
Thanks Giovanni, the good news is that I'm able to reproduce the issue (same CentOS and libcurl version, but kamailio 5.1.0-pre0). I still don't understand the root cause though. In my case under some light load in about 1 case every 20 I see something like this logged (debug level 3): Nov 2 23

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-02 Thread gmele
Hello Giacomo, I forgot to put these information ;-) Kamailio : 5.0.2-3.1 OS: Linux CentOS 7.4.178 Curl : 7.29.0-42 Regards Giovanni -- Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html ___ Kamailio (SER) - Users Mailing List sr-

Re: [SR-Users] http_async_client problem with tls_ca_path

2017-11-02 Thread Giacomo Vacca
Hi Giovanni, what's the related OS and libcurl versions please? Regards, Giacomo On 2 November 2017 at 09:54, gmele wrote: > Hello, > > I'm having strange behavior with the http_async_client module and https > connections. Our kamailio config use REST interfaces to send push to mobile > apps wh

[SR-Users] http_async_client problem with tls_ca_path

2017-11-02 Thread gmele
Hello, I'm having strange behavior with the http_async_client module and https connections. Our kamailio config use REST interfaces to send push to mobile apps when calls are initiated. We also use a REST interface to register the client in our push database (and then be able to use the info to se