Skip to content
GitLab
Explore
Sign in
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
407fa895
Commit
407fa895
authored
2 months ago
by
Lukasz Kotasa
Browse files
Options
Downloads
Patches
Plain Diff
Create forked dialog for forked 183 response, REF 17077
parent
d8dedeeb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
third-party/pjproject/patches/0024-fork-dialog-183-early-media.patch
+60
-0
60 additions, 0 deletions
.../pjproject/patches/0024-fork-dialog-183-early-media.patch
with
60 additions
and
0 deletions
third-party/pjproject/patches/0024-fork-dialog-183-early-media.patch
0 → 100644
+
60
−
0
View file @
407fa895
From 1ac54b7eb7504f23470f3536f06c201fa1dc9e22 Mon Sep 17 00:00:00 2001
From: Lukasz Kotasa <lukasz.kotasa@genexis.eu>
Date: Wed, 28 May 2025 14:24:37 +0200
Subject: [PATCH] fork dialog 183 early media
---
pjsip/src/pjsip/sip_ua_layer.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/pjsip/src/pjsip/sip_ua_layer.c b/pjsip/src/pjsip/sip_ua_layer.c
index e6a7eaa..1f32367 100644
--- a/pjsip/src/pjsip/sip_ua_layer.c
+++ b/pjsip/src/pjsip/sip_ua_layer.c
@@ -751,6 +751,18 @@
retry_on_deadlock:
return PJ_TRUE;
}
+pjsip_dialog* dlg_fork(pjsip_dialog *dlg, pjsip_rx_data *res)
+{
+ pjsip_dialog *forked_dlg;
+ pj_status_t status;
+
+ /* Create forked dialog */
+ status = pjsip_dlg_fork(dlg, res, &forked_dlg);
+ if (status != PJ_SUCCESS)
+ return NULL;
+
+ return forked_dlg;
+}
/* On rx response notification.
*/
@@ -900,13 +912,21 @@
retry_on_deadlock:
return PJ_TRUE;
}
} else {
- dlg = dlg_set->dlg_list.next;
-
- PJ_LOG(4,(THIS_FILE,
+ if (st_code != 183){
+ dlg = dlg_set->dlg_list.next;
+ PJ_LOG(4,(THIS_FILE,
"Unhandled forked %s from %s:%d, response will be "
"handed over to the first dialog",
pjsip_rx_data_get_info(rdata),
rdata->pkt_info.src_name, rdata->pkt_info.src_port));
+ } else {
+ // received forked 183 response, create forked dialog
+ dlg = dlg_fork(dlg_set->dlg_list.next, rdata);
+ if (!dlg) {
+ PJ_LOG(4, (THIS_FILE, "Forking dialog for 183 response failed"));
+ dlg = dlg_set->dlg_list.next;
+ }
+ }
}
} else if (dlg == (pjsip_dialog*)&dlg_set->dlg_list) {
--
2.43.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