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
22daced9
Commit
22daced9
authored
8 years ago
by
zuul
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "res_format_attr_g729: Add annexb=no format parameter to SDPs"
parents
d86ee51c
53a2f7dc
Branches
Branches containing commit
Tags
16.2.0-rc2
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
channels/chan_sip.c
+1
-4
1 addition, 4 deletions
channels/chan_sip.c
res/res_format_attr_g729.c
+76
-0
76 additions, 0 deletions
res/res_format_attr_g729.c
with
77 additions
and
4 deletions
channels/chan_sip.c
+
1
−
4
View file @
22daced9
...
@@ -12982,10 +12982,7 @@ static void add_codec_to_sdp(const struct sip_pvt *p,
...
@@ -12982,10 +12982,7 @@ static void add_codec_to_sdp(const struct sip_pvt *p,
framing = ast_format_cap_get_format_framing(p->caps, format);
framing = ast_format_cap_get_format_framing(p->caps, format);
if (ast_format_cmp(format, ast_format_g729) == AST_FORMAT_CMP_EQUAL) {
if (ast_format_cmp(format, ast_format_g723) == AST_FORMAT_CMP_EQUAL) {
/* Indicate that we don't support VAD (G.729 annex B) */
ast_str_append(a_buf, 0, "a=fmtp:%d annexb=no\r\n", rtp_code);
} else if (ast_format_cmp(format, ast_format_g723) == AST_FORMAT_CMP_EQUAL) {
/* Indicate that we don't support VAD (G.723.1 annex A) */
/* Indicate that we don't support VAD (G.723.1 annex A) */
ast_str_append(a_buf, 0, "a=fmtp:%d annexa=no\r\n", rtp_code);
ast_str_append(a_buf, 0, "a=fmtp:%d annexa=no\r\n", rtp_code);
} else if (ast_format_cmp(format, ast_format_g719) == AST_FORMAT_CMP_EQUAL) {
} else if (ast_format_cmp(format, ast_format_g719) == AST_FORMAT_CMP_EQUAL) {
This diff is collapsed.
Click to expand it.
res/res_format_attr_g729.c
0 → 100644
+
76
−
0
View file @
22daced9
/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2016, Digium, Inc.
*
* Jason Parker <jparker@sangoma.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*** MODULEINFO
<support_level>core</support_level>
***/
#include
"asterisk.h"
ASTERISK_REGISTER_FILE
()
#include
"asterisk/module.h"
#include
"asterisk/format.h"
/* Destroy is a required callback and must exist */
static
void
g729_destroy
(
struct
ast_format
*
format
)
{
}
/* Clone is a required callback and must exist */
static
int
g729_clone
(
const
struct
ast_format
*
src
,
struct
ast_format
*
dst
)
{
return
0
;
}
static
void
g729_generate_sdp_fmtp
(
const
struct
ast_format
*
format
,
unsigned
int
payload
,
struct
ast_str
**
str
)
{
/*
* According to the rfc the joint annexb format parameter should be set to 'yes'
* or 'no' based on the answerer (rfc7261 - 3.3). However, Asterisk being a B2BUA
* makes things tricky. So for now Asterisk will set annexb=no.
*/
ast_str_append
(
str
,
0
,
"a=fmtp:%u annexb=no
\r\n
"
,
payload
);
}
static
struct
ast_format_interface
g729_interface
=
{
.
format_destroy
=
g729_destroy
,
.
format_clone
=
g729_clone
,
.
format_generate_sdp_fmtp
=
g729_generate_sdp_fmtp
,
};
static
int
load_module
(
void
)
{
if
(
ast_format_interface_register
(
"g729"
,
&
g729_interface
))
{
return
AST_MODULE_LOAD_DECLINE
;
}
return
AST_MODULE_LOAD_SUCCESS
;
}
static
int
unload_module
(
void
)
{
return
0
;
}
AST_MODULE_INFO
(
ASTERISK_GPL_KEY
,
AST_MODFLAG_LOAD_ORDER
,
"G.729 Format Attribute Module"
,
.
support_level
=
AST_MODULE_SUPPORT_CORE
,
.
load
=
load_module
,
.
unload
=
unload_module
,
.
load_pri
=
AST_MODPRI_CHANNEL_DEPEND
,
);
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