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.orgReview at https://gerrit.osmocom.org/2030 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(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/30/2030/1 diff --git a/src/mncc.c b/src/mncc.c index 2e05465..e647b73 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 * @@ -186,6 +186,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; @@ -198,6 +199,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 afff393..2c14a31 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 * @@ -38,12 +38,16 @@ static void sip_ring_call(struct call_leg *_leg); static void sip_connect_call(struct call_leg *_leg); -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); @@ -157,7 +161,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: newchange Gerrit-Change-Id: I98d173abc46c67b87666ed2f193a581d6e72344b Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Holger Freyther <holger at freyther.de>