This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Holger Freyther gerrit-no-reply at lists.osmocom.orgHolger Freyther has submitted this change and it was merged. Change subject: mncc/sip: Attempt to parse the media from session in progress ...................................................................... mncc/sip: Attempt to parse the media from session in progress Parse the media from session in progress and if present in alerting connect the call early. Sadly this sets RTP to the sendrecv mode even if we would like to keep it as recvonly. Change-Id: I98d173abc46c67b87666ed2f193a581d6e72344b Related: OS#1784 --- M src/mncc.c M src/sip.c 2 files changed, 17 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/mncc.c b/src/mncc.c index 5e2a3a1..669a80c 100644 --- a/src/mncc.c +++ b/src/mncc.c @@ -1,5 +1,5 @@ /* - * (C) 2016 by Holger Hans Peter Freyther + * (C) 2016-2017 by Holger Hans Peter Freyther * * All Rights Reserved * @@ -196,6 +196,7 @@ { struct gsm_mncc out_mncc = { 0, }; struct mncc_call_leg *leg; + struct call_leg *other_leg; OSMO_ASSERT(_leg->type == CALL_TYPE_MNCC); leg = (struct mncc_call_leg *) _leg; @@ -208,6 +209,14 @@ out_mncc.progress.descr = 8; /* In-band information or appropriate pattern now available */ mncc_write(leg->conn, &out_mncc, leg->callref); + + /* + * If we have remote IP/port let's connect it already. + * FIXME: We would like to keep this as recvonly... + */ + other_leg = call_leg_other(&leg->base); + if (other_leg && other_leg->port != 0 && other_leg->ip != 0) + send_rtp_connect(leg, other_leg); } static void mncc_call_leg_release(struct call_leg *_leg) diff --git a/src/sip.c b/src/sip.c index 0a642b7..4f3d034 100644 --- a/src/sip.c +++ b/src/sip.c @@ -1,5 +1,5 @@ /* - * (C) 2016 by Holger Hans Peter Freyther + * (C) 2016-2017 by Holger Hans Peter Freyther * * All Rights Reserved * @@ -39,12 +39,16 @@ static void sip_connect_call(struct call_leg *_leg); static void sip_dtmf_call(struct call_leg *_leg, int keypad); -static void call_progress(struct sip_call_leg *leg, const sip_t *sip) +static void call_progress(struct sip_call_leg *leg, const sip_t *sip, int status) { struct call_leg *other = call_leg_other(&leg->base); if (!other) return; + + /* Extract SDP for session in progress with matching codec */ + if (status == 183) + sdp_extract_sdp(leg, sip, false); LOGP(DSIP, LOGL_NOTICE, "leg(%p) is now rining.\n", leg); other->ring_call(other); @@ -159,7 +163,7 @@ leg->state = SIP_CC_DLG_CNFD; if (status == 180 || status == 183) - call_progress(leg, sip); + call_progress(leg, sip, status); else if (status == 200) call_connect(leg, sip); else if (status >= 300) { -- To view, visit https://gerrit.osmocom.org/2030 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I98d173abc46c67b87666ed2f193a581d6e72344b Gerrit-PatchSet: 3 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Holger Freyther <holger at freyther.de> Gerrit-Reviewer: Holger Freyther <holger at freyther.de> Gerrit-Reviewer: Jenkins Builder