Created
November 28, 2016 04:50
-
-
Save joshelson/da57463001a568cc4777aa77a56017e4 to your computer and use it in GitHub Desktop.
Patch for OUTGOING_RETRY in Asterisk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- pbx_spool.orig.c 2016-11-09 03:21:38.017426604 +0300 | |
+++ pbx_spool.patched.c 2016-11-11 03:45:55.484474036 +0300 | |
@@ -298,6 +298,23 @@ | |
ast_log(LOG_WARNING, "At least one of app or extension must be specified, along with tech and dest in file %s\n", o->fn); | |
return -1; | |
} | |
+ char* r; | |
+ if (asprintf(&r, "%d", o->retries + 1) >= 0) { | |
+ var = ast_variable_new("OUTGOING_RETRY", r, o->fn); | |
+ if (var) { | |
+ if (last) { | |
+ last->next = var; | |
+ } | |
+ else { | |
+ o->vars = var; | |
+ } | |
+ last = var; | |
+ } | |
+ free(r); | |
+ } | |
+ else | |
+ ast_log(LOG_WARNING, "Can not set OUTGOING_RETRY\n"); | |
+ | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment