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
d1495bc0
Commit
d1495bc0
authored
9 years ago
by
zuul
Committed by
Gerrit Code Review
9 years ago
Browse files
Options
Downloads
Plain Diff
Merge "chan_sip.c: Fix T.38 issues caused by leaving a bridge." into 13
parents
84d10362
18a323e5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
channels/chan_sip.c
+30
-9
30 additions, 9 deletions
channels/chan_sip.c
with
30 additions
and
9 deletions
channels/chan_sip.c
+
30
−
9
View file @
d1495bc0
...
@@ -7517,8 +7517,10 @@ static int interpret_t38_parameters(struct sip_pvt *p, const struct ast_control_
...
@@ -7517,8 +7517,10 @@ static int interpret_t38_parameters(struct sip_pvt *p, const struct ast_control_
AST_SCHED_DEL_UNREF(sched, p->t38id, dialog_unref(p, "when you delete the t38id sched, you should dec the refcount for the stored dialog ptr"));
AST_SCHED_DEL_UNREF(sched, p->t38id, dialog_unref(p, "when you delete the t38id sched, you should dec the refcount for the stored dialog ptr"));
change_t38_state(p, T38_REJECTED);
change_t38_state(p, T38_REJECTED);
transmit_response_reliable(p, "488 Not acceptable here", &p->initreq);
transmit_response_reliable(p, "488 Not acceptable here", &p->initreq);
} else if (p->t38.state == T38_ENABLED)
} else if (p->t38.state == T38_ENABLED) {
change_t38_state(p, T38_DISABLED);
transmit_reinvite_with_sdp(p, FALSE, FALSE);
transmit_reinvite_with_sdp(p, FALSE, FALSE);
}
break;
break;
case AST_T38_REQUEST_PARMS: { /* Application wants remote's parameters re-sent */
case AST_T38_REQUEST_PARMS: { /* Application wants remote's parameters re-sent */
struct ast_control_t38_parameters parameters = p->t38.their_parms;
struct ast_control_t38_parameters parameters = p->t38.their_parms;
...
@@ -10676,6 +10678,10 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
...
@@ -10676,6 +10678,10 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
} else if (udptlportno > 0) {
} else if (udptlportno > 0) {
if (debug)
if (debug)
ast_verbose("Got T.38 Re-invite without audio. Keeping RTP active during T.38 session.\n");
ast_verbose("Got T.38 Re-invite without audio. Keeping RTP active during T.38 session.\n");
/* Force media to go through us for T.38. */
memset(&p->redirip, 0, sizeof(p->redirip));
/* Prevent audio RTCP reads */
/* Prevent audio RTCP reads */
if (p->owner) {
if (p->owner) {
ast_channel_set_fd(p->owner, 1, -1);
ast_channel_set_fd(p->owner, 1, -1);
...
@@ -13787,6 +13793,29 @@ static int transmit_reinvite_with_sdp(struct sip_pvt *p, int t38version, int old
...
@@ -13787,6 +13793,29 @@ static int transmit_reinvite_with_sdp(struct sip_pvt *p, int t38version, int old
{
{
struct sip_request req;
struct sip_request req;
if (t38version) {
/* Force media to go through us for T.38. */
memset(&p->redirip, 0, sizeof(p->redirip));
}
if (p->rtp) {
if (t38version) {
/* Silence RTCP while audio RTP is inactive */
ast_rtp_instance_set_prop(p->rtp, AST_RTP_PROPERTY_RTCP, 0);
if (p->owner) {
/* Prevent audio RTCP reads */
ast_channel_set_fd(p->owner, 1, -1);
}
} else if (ast_sockaddr_isnull(&p->redirip)) {
/* Enable RTCP since it will be inactive if we're coming back
* with this reinvite */
ast_rtp_instance_set_prop(p->rtp, AST_RTP_PROPERTY_RTCP, 1);
if (p->owner) {
/* Enable audio RTCP reads */
ast_channel_set_fd(p->owner, 1, ast_rtp_instance_fd(p->rtp, 1));
}
}
}
reqprep(&req, p, ast_test_flag(&p->flags[0], SIP_REINVITE_UPDATE) ? SIP_UPDATE : SIP_INVITE, 0, 1);
reqprep(&req, p, ast_test_flag(&p->flags[0], SIP_REINVITE_UPDATE) ? SIP_UPDATE : SIP_INVITE, 0, 1);
add_header(&req, "Allow", ALLOWED_METHODS);
add_header(&req, "Allow", ALLOWED_METHODS);
...
@@ -32683,14 +32712,6 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *i
...
@@ -32683,14 +32712,6 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *i
} else if (!ast_sockaddr_isnull(&p->redirip)) {
} else if (!ast_sockaddr_isnull(&p->redirip)) {
memset(&p->redirip, 0, sizeof(p->redirip));
memset(&p->redirip, 0, sizeof(p->redirip));
changed = 1;
changed = 1;
if (p->rtp) {
/* Enable RTCP since it will be inactive if we're coming back
* from a reinvite */
ast_rtp_instance_set_prop(p->rtp, AST_RTP_PROPERTY_RTCP, 1);
/* Enable audio RTCP reads */
ast_channel_set_fd(chan, 1, ast_rtp_instance_fd(p->rtp, 1));
}
}
}
if (vinstance) {
if (vinstance) {
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