Thank you so much for the help!
On Tue, Jun 22, 2021 at 8:47 AM Liviu Chircu wrote:
> On 15.06.2021 20:30, Alexander Perkins wrote:
> > Where should we include the x-api-key header with using rest_client.
>
> I would suggest looking into the rest_append_hf() function [1], which
> can be used to
On 15.06.2021 20:30, Alexander Perkins wrote:
Where should we include the x-api-key header with using rest_client.
I would suggest looking into the rest_append_hf() function [1], which
can be used to append as many HTTP headers to a request as you need.
[1]:
https://opensips.org/docs/module
Hi All. We are using the REST_Client to parse a web service. However, our
provider requires an API key to be passed in the header. Can somebody
point me in the right direction? Where should we include the x-api-key
header with using rest_client.
Thank you,
Alex
unexpected.
Thanks for the time and quick responses!
Ben Newlin
From: Users on behalf of Liviu Chircu
Reply-To: OpenSIPS users mailling list
Date: Thursday, June 27, 2019 at 5:05 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Rest Client Async operation
On 26.06.2019 17
I have updated the async docs [1], so everyone can read more about this
limitation,
along with a mitigation solution for it.
Cheers,
[1]: https://www.opensips.org/Documentation/Script-Async-3-0#toc8
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
___
On 26.06.2019 17:48, Ben Newlin wrote:
Thanks again for the info. I think what you are saying is that the
async operation is not launching a new process to handle the called
function, but is performing the function in the original worker thread
and only taking advantage of any suspend/resume
-To: OpenSIPS users mailling list
Date: Wednesday, June 26, 2019 at 9:23 AM
To: "users@lists.opensips.org"
Subject: Re: [OpenSIPS-Users] Rest Client Async operation
It's the same process doing both the connect and the transfer. The problem is
that libcurl, as it stands now,
is n
That is exactly why we need to extract the connection/transfer fd in the
first place: so we can throw it into epoll_wait() and have it act as
an event generator :)
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 26.06.2019 16:38, SamyGo wrote:
once we somehow get the event
Hi Liviu,
Is it possible to suspend the transaction and resume it once we somehow get
the event from libcurl as soon as the connect is done?
Im imagining the way usually APNS is done these days. The only thing
missing here is the event from the rest_client !
Can this mechanism help with the probl
It's the same process doing both the connect and the transfer. The
problem is that libcurl, as it stands now,
is not able to give me a file descriptor to poll on, until it connects
[1]. See this section:
"When libcurl returns -1 in max_fd, it is because libcurl currently does
something that
users mailling list
Date: Tuesday, June 25, 2019 at 8:52 AM
To: "users@lists.opensips.org"
Subject: Re: [OpenSIPS-Users] Rest Client Async operation
Hi Ben,
Regarding the "blocking rest_get()" problem: due to the specifics of the
libcurl API, there is
no direct acces
Hi Ben,
Regarding the "blocking rest_get()" problem: due to the specifics of the
libcurl API, there is
no direct access to the socket file descriptors during the initial TCP
connect handshake. Thus,
this phase will be synchronous (blocking), while all transfers (send
HTTP req, receive reply)
Hello all,
During testing I have found behavior that I cannot explain based on our current
understanding of the operation of the async and rest_client functionality. I
have reproduced this behavior with a fairly simple script configuration, the
relevant piece of which is below:
children=8
loa
Hi Tito,
yes, the calculate_ha1 must be correlated with how the password is kept
in the DB - see
https://blog.opensips.org/2016/11/11/how-to-avoid-plaintext-passwords/
In regards, to $var(username), usually it is just the username part ($fU)
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder a
Bogdan,
I found the solution to the issue I wasnt setting
modparam("auth", "calculate_ha1", 1)
which allows the password to be in plaintext in the pseudo var. In addition
I had to join the $fU+"@"+$fd since the $fu carries sip:
Thanks,
TIto
On Thu, Jun 22, 2017 at 8:49 PM, Tito Cumpen wrote:
Hey Bogdan,
I see that the module params define the spec variables now and I tried the
following in my register method block
exec("php /etc/opensips/authenticate.php $var(input)","" , "$var(out)",
"$var(err)", "$avp(env)");
this returns the text password
$var(username)= $fu;
Bogdan,
would I have to use the exec module to cast the into the username and
password variables? Also I am not sure how the function expects those
variables to be passed to it ? It is based on variables with these two
names to be set prior to being called?
$var(username)="abc";
$avp(password)="
Hi Tito,
You can do that by fetching the password via an explicit DB query from
script and pushing it for auth check using pv_www_authorize():
http://www.opensips.org/html/docs/modules/2.3.x/auth.html#idp5590848
Best regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.o
Group,
Is it possible to use a rest api for auth_db? Meaning can opensips
authenticate a user based on a rest query against a rest api? I thought
about using db http by fronting the request with a local http server but I
don't see a way to pass a custom headers to the query. This custom header
wou
19 matches
Mail list logo