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
3a50311c
Commit
3a50311c
authored
8 years ago
by
Joshua Colp
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "CHANNEL(callid): Give dialplan access to the callid."
parents
06c99666
8cb4f9ce
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
+7
-0
7 additions, 0 deletions
CHANGES
funcs/func_channel.c
+14
-0
14 additions, 0 deletions
funcs/func_channel.c
with
21 additions
and
0 deletions
CHANGES
+
7
−
0
View file @
3a50311c
...
...
@@ -118,6 +118,13 @@ app_voicemail
* Added 'fromstring' field to the voicemail boxes. If set, it will override
the global 'fromstring' field on a per-mailbox basis.
func_channel
------------------
* Added CHANNEL(callid) to retrieve the call log tag associated with the
channel. e.g., [C-00000000] Dialplan now has access to the call log
search key associated with the channel so it can be saved in case there
is a problem with the call.
res_pjsip
------------------
* A new transport parameter 'symmetric_transport' has been added.
...
...
This diff is collapsed.
Click to expand it.
funcs/func_channel.c
+
14
−
0
View file @
3a50311c
...
...
@@ -233,6 +233,10 @@
<enum name="max_forwards">
<para>R/W The maximum number of forwards allowed.</para>
</enum>
<enum name="callid">
<para>R/O Call identifier log tag associated with the channel
e.g., <literal>[C-00000000]</literal>.</para>
</enum>
</enumlist>
<xi:include xpointer="xpointer(/docs/info[@name='CHANNEL'])" />
</parameter>
...
...
@@ -450,6 +454,16 @@ static int func_channel_read(struct ast_channel *chan, const char *function,
ast_channel_lock
(
chan
);
snprintf
(
buf
,
len
,
"%d"
,
ast_max_forwards_get
(
chan
));
ast_channel_unlock
(
chan
);
}
else
if
(
!
strcasecmp
(
data
,
"callid"
))
{
ast_callid
callid
;
buf
[
0
]
=
'\0'
;
ast_channel_lock
(
chan
);
callid
=
ast_channel_callid
(
chan
);
if
(
callid
)
{
ast_callid_strnprint
(
buf
,
len
,
callid
);
}
ast_channel_unlock
(
chan
);
}
else
if
(
!
ast_channel_tech
(
chan
)
||
!
ast_channel_tech
(
chan
)
->
func_channel_read
||
ast_channel_tech
(
chan
)
->
func_channel_read
(
chan
,
function
,
data
,
buf
,
len
))
{
ast_log
(
LOG_WARNING
,
"Unknown or unavailable item requested: '%s'
\n
"
,
data
);
ret
=
-
1
;
...
...
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