Re: [sr-dev] [kamailio/kamailio] ruxc automatic retry (#2820)
@miconda Agreed, have opened an issue in the ruxc repo, was more of an interim fix, but i think it makes absolute sense to have it at lib level -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2820#issuecomment-896769930___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] ruxc automatic retry (#2820)
@nakchak - this is in the kamailio module, isn't better to add a new field in the v_http_request structure and do the retry in libruxc? I saves time for http agent creation or lookup (on reuse). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2820#issuecomment-896760923___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] ruxc automatic retry (#2820)
Just had a bash at adding this myself, and it seems to work nicely for my usecase... Adding this changing calls to post or get, and defining a parameter for retry attempts ``` ruxc_http_get(_http_request, _http_response); //Retry enabled, either have a server error code or a connection error int attempt; attempt = 0; while(attempt < _ruxc_http_retry && (v_http_response.retcode < 0 || (v_http_response.rescode > 499 && v_http_response.rescode < 699)){ attempt++; LM_DBG("Retrying Request Attempt: %d - Response Code: %d - Return Code: %d - URI: %s\n", attempt, v_http_response.retcode, v_http_response.rescode, v_http_request.url); ruxc_http_get(_http_request, _http_response); } ``` Im loving ruxc lol -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2820#issuecomment-896719750___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] ruxc automatic retry (#2820)
Thanks for the idea! This feature is also probably suitable to be implemented in the libruxc, to avoid passing data back and forth many times, rather than using the libruxc as it is now and do the retry in Kamailio module C code. Then kamailio can get a modparam (and/or other options) to control it. I added to my todo for libruxc, if you want to discuss more, let's do it with an issue for ruxc project (https://github.com/miconda/ruxc). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2820#issuecomment-896719294___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] ruxc automatic retry (#2820)
Closed #2820. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2820#event-5141261084___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev