]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_curl.c: Allow user to set what return codes constitute a failure.
authorDovid Bender <dovid@telecurve.com>
Sun, 18 Oct 2020 18:40:10 +0000 (18:40 +0000)
committerKevin Harwell <kharwell@digium.com>
Fri, 6 Nov 2020 18:39:03 +0000 (12:39 -0600)
commitbc58e84f477df3af91941ff1f603e5979420fd01
treee841cd9c3efd4350e1a5e684b628c74d32baddd4
parentb82f88064774b6e4def3a6cd542bbf19262e7fce
func_curl.c: Allow user to set what return codes constitute a failure.

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
configs/samples/res_curl.conf.sample
funcs/func_curl.c