[Asterisk-code-review] funcs/func_curl.c: Allow user to set what return codes constitute a f... (asterisk[16])

Joshua Colp asteriskteam at digium.com
Wed Oct 28 14:34:43 CDT 2020


Joshua Colp has uploaded a new patch set (#5) to the change originally created by Dovid Bender. ( https://gerrit.asterisk.org/c/asterisk/+/15066 )

Change subject: funcs/func_curl.c: Allow user to set what return codes constitute a failure. configs/samples/res_curl.conf.sample: Updated demo configs with possible options.
......................................................................

funcs/func_curl.c: Allow user to set what return codes constitute a failure.
configs/samples/res_curl.conf.sample: Updated demo configs with possible options.

Currently any response from res_curl where we get an answer from the web server, regardless of what the response is (404, 403 etc.) Asterisk currently treats it as a success. This patch allows you to set which codes should be considered as a failure by Asterisk. If say we set failurecodes=404,403 then when using curl in realtime if a server gives a 404 error Asterisk will try to failover to the next option set in extconfig.conf

ASTERISK-28825

Reported by: Dovid Bender
Code by: Gobinda Paul

Change-Id: I94443e508343e0a3e535e51ea6e0562767639987
---
M configs/samples/res_curl.conf.sample
M funcs/func_curl.c
2 files changed, 39 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/66/15066/5
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15066
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I94443e508343e0a3e535e51ea6e0562767639987
Gerrit-Change-Number: 15066
Gerrit-PatchSet: 5
Gerrit-Owner: Dovid Bender <dovid at telecurve.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201028/c5e9562d/attachment.html>


More information about the asterisk-code-review mailing list