Hi Liviu,

I have downloaded 2.1.4 version if opensips and trying to use rest_put call in 
async mode.

I have added the necessary code for rest_put () similar to rest_post() in 
rest_methods.c, rest_methods.h and rest_client.c

If I just call, rest_put from config file, without async it works fine. I could 
see rest_put() is called and do the necessary steps.

And am trying to call async from config file as,
 async(rest_put("http://***url*** ", "$fU,$tU,$ci ", "application/json", 
"$var(body)", "$var(ct)", "$var(rcode)"),resume_put);

But I never see rest_put() is called. Rather am getting below error 
continuously.
Aug  9 17:27:47 sturn-test /usr/local/sbin/opensips[18525]: 
WARNING:core:handle_timer_job: utimer job <tm-utimer> has a 403840000 us delay 
in execution
Aug  9 17:27:47 sturn-test /usr/local/sbin/opensips[18525]: 
WARNING:core:handle_timer_job: utimer job <tm-utimer> has a 403840000 us delay 
in execution
Aug  9 17:27:47 sturn-test /usr/local/sbin/opensips[18525]: 
WARNING:core:handle_timer_job: utimer job <tm-utimer> has a 403840000 us delay 
in execution
Aug  9 17:27:47 sturn-test /usr/local/sbin/opensips[18525]: 
WARNING:core:handle_timer_job: utimer job <tm-utimer> has a 403840000 us delay 
in execution

Am I missing something here? I am sure it is a small thing. Do we need to do 
anything else before calling async in the script?

Regards,
Agalya

From: [email protected] 
[mailto:[email protected]] On Behalf Of Liviu Chircu
Sent: Friday, August 05, 2016 4:47 AM
To: [email protected]
Subject: Re: [OpenSIPS-Users] Asynchronous operation for REST queries

Hi Agalya,

1.11 has no async support at core level. If you need that, you will have to use 
2.1+

Async rest_put() is currently not implemented, but its logic would be fairly 
similar to the GET and POST counterparts.


Liviu Chircu

OpenSIPS Developer

http://www.opensips-solutions.com
On 04.08.2016 23:14, Ramachandran, Agalya (Contractor) wrote:
Hi team,

We are using opensips1.11.3 version for our project.
I have a question here. Right now we are using a REST API call from config file 
for our project requirement and it is in synchronous mode currently.
>From the opensips document, I see asynchronous support at script level can be 
>done in 2.1 version.
Is it possible to change in asynchronous mode in 1.11 version?
If not, is there a way to achieve asynchronous REST calls for the version of 
opensips what we are using?

Also I see from documentation,

The following functions may also be called asynchronously:

  *   
avp_db_query<http://www.opensips.org/html/docs/modules/2.1.x/avpops.html#id294986>
  *   
rest_get<http://www.opensips.org/html/docs/modules/2.1.x/rest_client.html#id293741>
  *   
rest_post<http://www.opensips.org/html/docs/modules/2.1.x/rest_client.html#id293886>
  *   exec<http://www.opensips.org/html/docs/modules/2.1.x/exec#id294052>
Can rest_put can also be called asynchronously if we use 2.1 version ?
Please clarify.

Regards,
Agalya




_______________________________________________

Users mailing list

[email protected]<mailto:[email protected]>

http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to