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
ab5b97c0
Commit
ab5b97c0
authored
5 years ago
by
George Joseph
Committed by
Gerrit Code Review
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "features.c: Make Bridge application tolerate unspecified channel."
parents
5b815fe1
0376f2bb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/features.c
+14
-14
14 additions, 14 deletions
main/features.c
with
14 additions
and
14 deletions
main/features.c
+
14
−
14
View file @
ab5b97c0
...
...
@@ -84,7 +84,9 @@
</synopsis>
<syntax>
<parameter name="channel" required="true">
<para>The current channel is bridged to the specified <replaceable>channel</replaceable>.</para>
<para>The current channel is bridged to the channel
identified by the channel name, channel name prefix, or channel
uniqueid.</para>
</parameter>
<parameter name="options">
<optionlist>
...
...
@@ -893,7 +895,7 @@ int ast_bridge_timelimit(struct ast_channel *chan, struct ast_bridge_config *con
config
->
warning_freq
=
atol
(
warnfreq_str
);
if
(
!
config
->
timelimit
)
{
ast_log
(
LOG_WARNING
,
"Bridge does not accept L(%s)
, hanging up.
\n
"
,
limit_str
);
ast_log
(
LOG_WARNING
,
"Bridge does not accept L(%s)
\n
"
,
limit_str
);
config
->
timelimit
=
config
->
play_warning
=
config
->
warning_freq
=
0
;
config
->
warning_sound
=
NULL
;
return
-
1
;
/* error */
...
...
@@ -996,7 +998,7 @@ int ast_bridge_timelimit(struct ast_channel *chan, struct ast_bridge_config *con
*/
static
int
bridge_exec
(
struct
ast_channel
*
chan
,
const
char
*
data
)
{
struct
ast_channel
*
current_dest_chan
;
struct
ast_channel
*
current_dest_chan
=
NULL
;
char
*
tmp_data
=
NULL
;
struct
ast_flags
opts
=
{
0
,
};
struct
ast_bridge_config
bconfig
=
{
{
0
,
},
};
...
...
@@ -1017,22 +1019,20 @@ static int bridge_exec(struct ast_channel *chan, const char *data)
AST_APP_ARG
(
options
);
);
if
(
ast_strlen_zero
(
data
))
{
ast_log
(
LOG_WARNING
,
"Bridge require at least 1 argument specifying the other end of the bridge
\n
"
);
return
-
1
;
}
tmp_data
=
ast_strdupa
(
data
);
tmp_data
=
ast_strdupa
(
data
?:
""
);
AST_STANDARD_APP_ARGS
(
args
,
tmp_data
);
if
(
!
ast_strlen_zero
(
args
.
options
))
if
(
!
ast_strlen_zero
(
args
.
options
))
{
ast_app_parse_options
(
bridge_exec_options
,
&
opts
,
opt_args
,
args
.
options
);
}
/* make sure we have a valid end point */
current_dest_chan
=
ast_channel_get_by_name_prefix
(
args
.
dest_chan
,
strlen
(
args
.
dest_chan
));
if
(
!
ast_strlen_zero
(
args
.
dest_chan
))
{
current_dest_chan
=
ast_channel_get_by_name_prefix
(
args
.
dest_chan
,
strlen
(
args
.
dest_chan
));
}
if
(
!
current_dest_chan
)
{
ast_
log
(
LOG_WARNING
,
"Bridge failed because channel %s does not exist
\n
"
,
args
.
dest_chan
);
ast_
verb
(
4
,
"Bridge failed because channel
'
%s
'
does not exist
\n
"
,
args
.
dest_chan
?:
""
);
pbx_builtin_setvar_helper
(
chan
,
"BRIDGERESULT"
,
"NONEXISTENT"
);
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