Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
6113bb47
Commit
6113bb47
authored
8 years ago
by
Joshua Colp
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "pbx_spool: Set AST_OUTGOING_ATTEMPT variable on channel"
parents
60998371
bc2c66b5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES
+6
-0
6 additions, 0 deletions
CHANGES
pbx/pbx_spool.c
+19
-14
19 additions, 14 deletions
pbx/pbx_spool.c
with
25 additions
and
14 deletions
CHANGES
+
6
−
0
View file @
6113bb47
...
@@ -79,6 +79,12 @@ app_queue
...
@@ -79,6 +79,12 @@ app_queue
* Add 'QueueUpdate' application which can be used to track outbound calls
* Add 'QueueUpdate' application which can be used to track outbound calls
using app_queue.
using app_queue.
pbx_spool
------------------
* Asterisk will now set the AST_OUTGOING_ATTEMPT channel variable so that
attempt-specific behavior is possible. This is a 1-based number that
simply increases by 1 for each attempt.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 14.3.0 to Asterisk 14.4.0 ------------
--- Functionality changes from Asterisk 14.3.0 to Asterisk 14.4.0 ------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
pbx/pbx_spool.c
+
19
−
14
View file @
6113bb47
...
@@ -161,6 +161,19 @@ static struct outgoing *new_outgoing(const char *fn)
...
@@ -161,6 +161,19 @@ static struct outgoing *new_outgoing(const char *fn)
return
o
;
return
o
;
}
}
static
void
append_variable
(
struct
outgoing
*
o
,
const
char
*
name
,
const
char
*
value
)
{
struct
ast_variable
*
var
=
ast_variable_new
(
name
,
value
,
o
->
fn
);
if
(
!
var
)
{
return
;
}
/* Always insert at the end, because some people want to treat the spool
* file as a script */
ast_variable_list_append
(
&
o
->
vars
,
var
);
}
static
void
parse_line
(
char
*
line
,
unsigned
int
lineno
,
struct
outgoing
*
o
)
static
void
parse_line
(
char
*
line
,
unsigned
int
lineno
,
struct
outgoing
*
o
)
{
{
char
*
c
;
char
*
c
;
...
@@ -261,20 +274,7 @@ static void parse_line(char *line, unsigned int lineno, struct outgoing *o)
...
@@ -261,20 +274,7 @@ static void parse_line(char *line, unsigned int lineno, struct outgoing *o)
strsep
(
&
c2
,
"="
);
strsep
(
&
c2
,
"="
);
if
(
c2
)
{
if
(
c2
)
{
struct
ast_variable
*
var
=
ast_variable_new
(
c
,
c2
,
o
->
fn
);
append_variable
(
o
,
c
,
c2
);
if
(
var
)
{
/*
* Always insert at the end, because some people
* want to treat the spool file as a script
*/
struct
ast_variable
**
tail
=
&
o
->
vars
;
while
(
*
tail
)
{
tail
=
&
(
*
tail
)
->
next
;
}
*
tail
=
var
;
}
}
else
{
}
else
{
ast_log
(
LOG_WARNING
,
"Malformed
\"
%s
\"
argument. Should be
\"
%s: variable=value
\"\n
"
,
line
,
line
);
ast_log
(
LOG_WARNING
,
"Malformed
\"
%s
\"
argument. Should be
\"
%s: variable=value
\"\n
"
,
line
,
line
);
}
}
...
@@ -328,6 +328,11 @@ static int apply_outgoing(struct outgoing *o, FILE *f)
...
@@ -328,6 +328,11 @@ static int apply_outgoing(struct outgoing *o, FILE *f)
"along with tech and dest in file %s
\n
"
,
o
->
fn
);
"along with tech and dest in file %s
\n
"
,
o
->
fn
);
return
-
1
;
return
-
1
;
}
}
if
(
snprintf
(
buf
,
sizeof
(
buf
),
"%d"
,
o
->
retries
+
1
)
<
sizeof
(
buf
))
{
append_variable
(
o
,
"AST_OUTGOING_ATTEMPT"
,
buf
);
}
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment