neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/31698 )


Change subject: send + receive SDP via MNCC
......................................................................

send + receive SDP via MNCC

Transmit and receive full SDP information via MNCC, to accurately pass
codecs choices between the call legs.

In msc_vlr_test_call.c test_call_mt(), show that when receiving MNCC,
the codec information in SDP overrules the Bearer Cap codec information
-- we expect to still receive inaccurate Bearer Cap from e.g.
osmo-sip-connector, because we have chosen to add SDP to MNCC instead of
trying to fix the codecs represented in Bearer Cap.

For internal MNCC, the MT call leg now knows which codec the MO has
chosen and assigned.

For external MNCC, osmo-sip-connector receives SDP about our codecs
choices and sends it in SIP messages, and we also receive the full SDP
information from the remote SIP leg.

Update the SDP in codec_filter every time it is received, to always have
the latest SDP information from the remote leg.

 CC              MNCC
 | ---ALERTING--> |     add local side SDP to MNCC msg
 | <--ALERTING--- |     store remote side SDP
 | <--SETUP-RESP- |     store remote side SDP
 | --SETUP-CNF--> |     add local side SDP to MNCC msg
 | -RTP-CREATE--> |     use codec_filter, add local side SDP to MNCC msg
 | <-RTP-CONNECT- |     store remote side SDP

There still is one problem: when initiating MNCC, we do not yet know the
RTP address and port to be used for the CN side, because the CN CRCX
happens later. So far we send 0.0.0.0:0 as RTP endpoint in the SDP,
until the CN CRCX is done. A subsequent patch moves CN CRCX to an
earlier time, adding proper RTP information right from the start.

Related: SYS#5066
Change-Id: Ie0668c0e079ec69da1532b52d00621efe114fc2c
---
M include/osmocom/msc/rtp_stream.h
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/rtp_stream.c
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_test_call.err
5 files changed, 235 insertions(+), 24 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/98/31698/1

diff --git a/include/osmocom/msc/rtp_stream.h b/include/osmocom/msc/rtp_stream.h
index afc5725..d9a85c2 100644
--- a/include/osmocom/msc/rtp_stream.h
+++ b/include/osmocom/msc/rtp_stream.h
@@ -69,6 +69,7 @@
 void rtp_stream_set_one_codec(struct rtp_stream *rtps, const struct 
sdp_audio_codec *codec);
 void rtp_stream_set_codecs(struct rtp_stream *rtps, const struct 
sdp_audio_codecs *codecs);
 void rtp_stream_set_remote_addr(struct rtp_stream *rtps, const struct 
osmo_sockaddr_str *r);
+void rtp_stream_set_remote_addr_and_codecs(struct rtp_stream *rtps, const 
struct sdp_msg *sdp);
 void rtp_stream_set_remote_osmux_cid(struct rtp_stream *rtps, uint8_t 
osmux_cid);
 int rtp_stream_commit(struct rtp_stream *rtps);

diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index 421845b..0d238b3 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -515,6 +515,8 @@
        unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
        struct tlv_parsed tp;
        struct gsm_mncc setup;
+       struct sdp_msg *sdp;
+       int rc;

        gsm48_start_guard_timer(trans);

@@ -624,6 +626,19 @@

        rate_ctr_inc(rate_ctr_group_get_ctr(trans->net->msc_ctrs, 
MSC_CTR_CALL_MO_SETUP));

+       /* FUTURE: so far this is composing SDP although the RTP address is not 
established yet (sending 0.0.0.0:0).
+        * Subsequent patch 'do CN CRCX first' 
(Ie433db1ba0c46d4b97538a969233c155cefac21c) changes the ordering so that
+        * the CN CRCX is completed before dispatching CC SETUP to remote, so 
that a valid RTP address is set. */
+
+       codec_filter_run(&trans->cc.codecs);
+       sdp = trans->cc.codecs.result.audio_codecs.count ? 
&trans->cc.codecs.result : NULL;
+       rc = sdp_msg_to_sdp_str_buf(setup.sdp, sizeof(setup.sdp), sdp);
+       if (rc >= sizeof(setup.sdp)) {
+               LOG_TRANS(trans, LOGL_ERROR, "MNCC_SETUP_IND: SDP too long (%d 
> %zu bytes)\n", rc, sizeof(setup.sdp));
+               trans_free(trans);
+               return -EINVAL;
+       }
+
        /* indicate setup to MNCC */
        mncc_recvmsg(trans->net, trans, MNCC_SETUP_IND, &setup);

@@ -633,6 +648,20 @@
        return 0;
 }

+static void rx_mncc_sdp(struct gsm_trans *trans, uint32_t mncc_msg_type, const 
char *sdp)
+{
+       int rc;
+       if (!sdp[0])
+               return;
+       rc = sdp_msg_from_sdp_str(&trans->cc.codecs.remote, sdp);
+       if (rc)
+               LOG_TRANS_CAT(trans, DMNCC, LOGL_ERROR, "rx %s: Failed to parse 
SDP: %d\n",
+                             get_mncc_name(mncc_msg_type), rc);
+       else
+               LOG_TRANS(trans, LOGL_DEBUG, "rx %s SDP: remote=%s\n", 
get_mncc_name(mncc_msg_type),
+                         sdp_msg_to_str(&trans->cc.codecs.remote));
+}
+
 static int gsm48_cc_tx_setup(struct gsm_trans *trans, void *arg)
 {
        struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 CC SETUP");
@@ -685,17 +714,15 @@
        codec_filter_set_ran(&trans->cc.codecs, trans->msc_a->c.ran->type);
        codec_filter_set_bss(&trans->cc.codecs, 
&trans->msc_a->cc.compl_l3_codec_list_bss_supported);
        /* sdp.remote: if SDP is included in the MNCC, take that as definitive 
list of remote audio codecs. */
-       if (setup->sdp[0]) {
-               rc = sdp_msg_from_sdp_str(&trans->cc.codecs.remote, setup->sdp);
-               if (rc)
-                       LOG_TRANS(trans, LOGL_ERROR, "Failed to parse remote 
call leg SDP: %d\n", rc);
-       }
+       rx_mncc_sdp(trans, setup->msg_type, setup->sdp);
        /* sdp.remote: if there is no SDP information or we failed to parse it, 
try using the Bearer Capability from
         * MNCC, if any. */
        if (!trans->cc.codecs.remote.audio_codecs.count && (setup->fields & 
MNCC_F_BEARER_CAP)) {
                trans->cc.codecs.remote = (struct sdp_msg){};
                
sdp_audio_codecs_from_bearer_cap(&trans->cc.codecs.remote.audio_codecs,
                                                 &setup->bearer_cap);
+               LOG_TRANS_CAT(trans, DMNCC, LOGL_DEBUG, "rx %s Bearer Cap: 
remote=%s\n",
+                             get_mncc_name(setup->msg_type), 
sdp_msg_to_str(&trans->cc.codecs.remote));
        }
        if (!trans->cc.codecs.remote.audio_codecs.count)
                LOG_TRANS(trans, LOGL_INFO,
@@ -875,6 +902,7 @@
        unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
        struct tlv_parsed tp;
        struct gsm_mncc alerting;
+       int rc;

        gsm48_stop_cc_timer(trans);
        gsm48_start_cc_timer(trans, 0x301, GSM48_T301);
@@ -904,6 +932,16 @@

        new_cc_state(trans, GSM_CSTATE_CALL_RECEIVED);

+       codec_filter_run(&trans->cc.codecs);
+       LOG_TRANS(trans, LOGL_DEBUG, "codecs: %s\n", 
codec_filter_to_str(&trans->cc.codecs));
+       rc = sdp_msg_to_sdp_str_buf(alerting.sdp, sizeof(alerting.sdp), 
&trans->cc.codecs.result);
+       if (rc >= sizeof(alerting.sdp)) {
+               LOG_TRANS(trans, LOGL_ERROR, "MNCC_ALERT_IND: SDP too long (%d 
> %zu bytes)\n",
+                         rc, sizeof(alerting.sdp));
+               trans_free(trans);
+               return -EINVAL;
+       }
+
        return mncc_recvmsg(trans->net, trans, MNCC_ALERT_IND,
                            &alerting);
 }
@@ -928,6 +966,19 @@

        new_cc_state(trans, GSM_CSTATE_CALL_DELIVERED);

+       if (alerting->sdp[0]) {
+               struct call_leg *cl = trans->msc_a->cc.call_leg;
+               struct rtp_stream *rtp_cn = cl ? cl->rtp[RTP_TO_CN] : NULL;
+               codec_filter_set_remote(&trans->cc.codecs, alerting->sdp);
+               codec_filter_run(&trans->cc.codecs);
+               LOG_TRANS(trans, LOGL_DEBUG, "%s codecs: %s\n",
+                         get_mncc_name(alerting->msg_type), 
codec_filter_to_str(&trans->cc.codecs));
+               if (rtp_cn) {
+                       rtp_stream_set_remote_addr_and_codecs(rtp_cn, 
&trans->cc.codecs.remote);
+                       rtp_stream_commit(rtp_cn);
+               }
+       }
+
        return trans_tx_gsm48(trans, msg);
 }

@@ -974,6 +1025,20 @@

        new_cc_state(trans, GSM_CSTATE_CONNECT_IND);

+       /* Received an MNCC_SETUP_RSP with the remote leg's SDP information. 
Apply codec choice. */
+       if (connect->sdp[0]) {
+               struct call_leg *cl = trans->msc_a->cc.call_leg;
+               struct rtp_stream *rtp_cn = cl ? cl->rtp[RTP_TO_CN] : NULL;
+               rx_mncc_sdp(trans, connect->msg_type, connect->sdp);
+               LOG_TRANS(trans, LOGL_DEBUG, "%s codecs: %s\n",
+                         get_mncc_name(connect->msg_type),
+                         codec_filter_to_str(&trans->cc.codecs));
+               if (rtp_cn) {
+                       rtp_stream_set_remote_addr_and_codecs(rtp_cn, 
&trans->cc.codecs.remote);
+                       rtp_stream_commit(rtp_cn);
+               }
+       }
+
        return trans_tx_gsm48(trans, msg);
 }

@@ -1016,6 +1081,8 @@
        new_cc_state(trans, GSM_CSTATE_CONNECT_REQUEST);
        rate_ctr_inc(rate_ctr_group_get_ctr(trans->net->msc_ctrs, 
MSC_CTR_CALL_MT_CONNECT));

+       codec_filter_run(&trans->cc.codecs);
+       sdp_msg_to_sdp_str_buf(connect.sdp, sizeof(connect.sdp), 
&trans->cc.codecs.result);
        return mncc_recvmsg(trans->net, trans, MNCC_SETUP_CNF, &connect);
 }

@@ -1726,7 +1793,7 @@

 static int mncc_recv_rtp(struct gsm_network *net, struct gsm_trans *trans, 
uint32_t callref,
                         int cmd, struct osmo_sockaddr_str *rtp_addr, uint32_t 
payload_type,
-                        uint32_t payload_msg_type)
+                        uint32_t payload_msg_type, const struct sdp_msg *sdp)
 {
        uint8_t data[sizeof(struct gsm_mncc)];
        struct gsm_mncc_rtp *rtp;
@@ -1742,12 +1809,16 @@
        }
        rtp->payload_type = payload_type;
        rtp->payload_msg_type = payload_msg_type;
+       if (sdp) {
+               LOG_TRANS(trans, LOGL_DEBUG, "%s SDP: remote=%s\n", 
get_mncc_name(rtp->msg_type), sdp_msg_to_str(sdp));
+               sdp_msg_to_sdp_str_buf(rtp->sdp, sizeof(rtp->sdp), sdp);
+       }
        return mncc_recvmsg(net, trans, cmd, (struct gsm_mncc *)data);
 }

 static void mncc_recv_rtp_err(struct gsm_network *net, struct gsm_trans 
*trans, uint32_t callref, int cmd)
 {
-       mncc_recv_rtp(net, trans, callref, cmd, NULL, 0, 0);
+       mncc_recv_rtp(net, trans, callref, cmd, NULL, 0, 0, NULL);
 }

 static int tch_rtp_create(struct gsm_network *net, uint32_t callref)
@@ -1815,7 +1886,7 @@
        }

        return mncc_recv_rtp(net, trans, trans->callref, MNCC_RTP_CREATE, 
rtp_cn_local,
-                            codec->payload_type, mncc_payload_msg_type);
+                            codec->payload_type, mncc_payload_msg_type, 
&trans->cc.codecs.result);
 }

 static int tch_rtp_connect(struct gsm_network *net, const struct gsm_mncc_rtp 
*rtp)
@@ -1823,7 +1894,6 @@
        struct gsm_trans *trans;
        struct call_leg *cl;
        struct rtp_stream *rtps;
-       struct osmo_sockaddr_str rtp_addr;
        char ipbuf[INET6_ADDRSTRLEN];

        /* FIXME: in *rtp we should get the codec information of the remote
@@ -1863,12 +1933,20 @@
                return -EINVAL;
        }

-       if (osmo_sockaddr_str_from_sockaddr(&rtp_addr, &rtp->addr) < 0) {
-               LOG_TRANS_CAT(trans, DMNCC, LOGL_ERROR, "RTP connect with 
invalid IP addr\n");
-               mncc_recv_rtp_err(net, trans, rtp->callref, MNCC_RTP_CONNECT);
-               return -EINVAL;
+       rx_mncc_sdp(trans, rtp->msg_type, rtp->sdp);
+       rtp_stream_set_remote_addr_and_codecs(rtps, &trans->cc.codecs.remote);
+
+       if (!osmo_sockaddr_str_is_nonzero(&rtps->remote)) {
+               /* Didn't get an IP address from SDP. Try legacy MNCC IP 
address */
+               struct osmo_sockaddr_str rtp_addr;
+               if (osmo_sockaddr_str_from_sockaddr(&rtp_addr, &rtp->addr) < 0) 
{
+                       LOG_TRANS_CAT(trans, DMNCC, LOGL_ERROR, "RTP connect 
with invalid IP addr\n");
+                       mncc_recv_rtp_err(net, trans, rtp->callref, 
MNCC_RTP_CONNECT);
+                       return -EINVAL;
+               }
+               rtp_stream_set_remote_addr(rtps, &rtp_addr);
        }
-       rtp_stream_set_remote_addr(rtps, &rtp_addr);
+
        rtp_stream_commit(rtps);
        return 0;
 }
@@ -2050,6 +2128,9 @@
                        return -ENOMEM;
                }

+               /* Remember remote SDP, if any */
+               rx_mncc_sdp(trans, data->msg_type, data->sdp);
+
                /* If subscriber has no conn */
                if (!msc_a) {
                        /* This condition will return before the common logging 
of the received MNCC message below, so
diff --git a/src/libmsc/rtp_stream.c b/src/libmsc/rtp_stream.c
index 6185268..ff30956 100644
--- a/src/libmsc/rtp_stream.c
+++ b/src/libmsc/rtp_stream.c
@@ -455,6 +455,13 @@
        rtp_stream_update_id(rtps);
 }

+void rtp_stream_set_remote_addr_and_codecs(struct rtp_stream *rtps, const 
struct sdp_msg *sdp)
+{
+       rtp_stream_set_codecs(rtps, &sdp->audio_codecs);
+       if (osmo_sockaddr_str_is_nonzero(&sdp->rtp))
+               rtp_stream_set_remote_addr(rtps, &sdp->rtp);
+}
+
 void rtp_stream_set_remote_osmux_cid(struct rtp_stream *rtps, uint8_t 
osmux_cid)
 {
        if (rtps->fi->state == RTP_STREAM_ST_ESTABLISHED)
diff --git a/tests/msc_vlr/msc_vlr_test_call.c 
b/tests/msc_vlr/msc_vlr_test_call.c
index 6c7a8ad..ab92433 100644
--- a/tests/msc_vlr/msc_vlr_test_call.c
+++ b/tests/msc_vlr/msc_vlr_test_call.c
@@ -285,6 +285,30 @@
        struct gsm_mncc mncc = {
                .imsi = IMSI,
                .callref = 0x423,
+               .fields = MNCC_F_BEARER_CAP,
+               .bearer_cap = {
+                       .speech_ver = {
+                               GSM48_BCAP_SV_AMR_F,
+                               GSM48_BCAP_SV_EFR,
+                               GSM48_BCAP_SV_FR,
+                               GSM48_BCAP_SV_AMR_H,
+                               GSM48_BCAP_SV_HR,
+                               -1 },
+               },
+               /* NOTE: below SDP includes only AMR, above bearer_cap includes 
more codecs. Ideally, these would match,
+                * but in reality the bearer cap in MNCC was never implemented 
properly. This test shows that above
+                * bearer_cap is ignored when SDP is present: In the CC Setup 
below, the Bearer Capability is only
+                * "04 04 60 04 05 8b" with speech versions '04' == 
GSM48_BCAP_SV_AMR_F and '05' == GSM48_BCAP_SV_AMR_H.
+                */
+               .sdp = "v=0\r\n"
+                      "o=OsmoMSC 0 0 IN IP4 10.23.23.1\r\n"
+                      "s=GSM Call\r\n"
+                      "c=IN IP4 10.23.23.1\r\n"
+                      "t=0 0\r\n"
+                      "m=audio 23 RTP/AVP 112\r\n"
+                      "a=rtpmap:112 AMR/8000\r\n"
+                      "a=fmtp:112 octet-align=1\r\n"
+                      "a=ptime:20\r\n",
        };

        comment_start();
@@ -298,6 +322,7 @@
        paging_expect_imsi(IMSI);
        paging_sent = false;
        mncc_sends_to_cc(MNCC_SETUP_REQ, &mncc);
+       mncc.sdp[0] = '\0';

        VERBOSE_ASSERT(paging_sent, == true, "%d");

@@ -316,7 +341,7 @@
        VERBOSE_ASSERT(security_mode_ctrl_sent, == true, "%d");

        btw("MS sends SecurityModeControl acceptance, VLR accepts, sends CC 
Setup");
-       dtap_expect_tx("0305" /* CC: Setup */ "04 07 60 04 05 0b 06 08 87" /* 
Bearer Cap */);
+       dtap_expect_tx("0305" /* CC: Setup */ "04 04 60 04 05 8b" /* Bearer 
Cap, speech ver of AMR-FR and AMR-HR */);
        ms_sends_security_mode_complete(1);

        btw("MS confirms call, we create a RAN-side RTP and forward 
MNCC_CALL_CONF_IND");
@@ -388,6 +413,24 @@
        struct gsm_mncc mncc = {
                .imsi = IMSI,
                .callref = 0x423,
+               .fields = MNCC_F_BEARER_CAP,
+               .bearer_cap = {
+                       .speech_ver = { GSM48_BCAP_SV_FR, -1, },
+               },
+               /* NOTE: below SDP includes only AMR, above bearer_cap includes 
only GSM-FR. Ideally, these would match,
+                * but in reality the bearer cap in MNCC was never implemented 
properly. This test shows that above
+                * bearer_cap is ignored when SDP is present: In the CC Setup 
below, the Bearer Capability is only
+                * "04 04 60 04 05 8b" with speech versions '04' == 
GSM48_BCAP_SV_AMR_F and '05' == GSM48_BCAP_SV_AMR_H.
+                */
+               .sdp = "v=0\r\n"
+                      "o=OsmoMSC 0 0 IN IP4 10.23.23.1\r\n"
+                      "s=GSM Call\r\n"
+                      "c=IN IP4 10.23.23.1\r\n"
+                      "t=0 0\r\n"
+                      "m=audio 23 RTP/AVP 112\r\n"
+                      "a=rtpmap:112 AMR/8000\r\n"
+                      "a=fmtp:112 octet-align=1\r\n"
+                      "a=ptime:20\r\n",
        };

        comment_start();
@@ -419,7 +462,7 @@
        VERBOSE_ASSERT(security_mode_ctrl_sent, == true, "%d");

        btw("MS sends SecurityModeControl acceptance, VLR accepts, sends CC 
Setup");
-       dtap_expect_tx("0305" /* CC: Setup */ "04 07 60 04 05 0b 06 08 87" /* 
Bearer Cap */);
+       dtap_expect_tx("0305" /* CC: Setup */ "04 04 60 04 05 8b" /* Bearer 
Cap, speech ver of AMR-FR and AMR-HR */);
        ms_sends_security_mode_complete(1);

        btw("MS confirms call, we create a RAN-side RTP and forward 
MNCC_CALL_CONF_IND");
diff --git a/tests/msc_vlr/msc_vlr_test_call.err 
b/tests/msc_vlr/msc_vlr_test_call.err
index a07a91c..dd89e64 100644
--- a/tests/msc_vlr/msc_vlr_test_call.err
+++ b/tests/msc_vlr/msc_vlr_test_call.err
@@ -326,6 +326,7 @@
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE
 DIUCS 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 MGW endpoint's RTP address available for the CI RTP_TO_CN: 10.23.23.1:23 
(osmux=no:-2)
 DCC trans(CC:INITIATED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ 
callref-0x80000001 tid-8) codecs: :0{VND.3GPP.IUFP/16000#96} (from: 
assigned=VND.3GPP.IUFP/16000#96 
MS={AMR:octet-align=1#112,GSM-EFR#110,GSM#3,GSM-HR-08#111} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
+DCC trans(CC:INITIATED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ 
callref-0x80000001 tid-8) MNCC_RTP_CREATE SDP: remote=:0{VND.3GPP.IUFP/16000#96}
 DMNCC trans(CC:INITIATED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ 
callref-0x80000001 tid-8) tx MNCC_RTP_CREATE
   MSC --> MNCC: callref 0x80000001: MNCC_RTP_CREATE
 - MNCC says that's fine
@@ -669,10 +670,20 @@

 - after a while, MNCC asks us to setup a call, causing Paging
   MSC <-- MNCC: callref 0x423: MNCC_SETUP_REQ
+v=0
+o=OsmoMSC 0 0 IN IP4 10.23.23.1
+s=GSM Call
+c=IN IP4 10.23.23.1
+t=0 0
+m=audio 23 RTP/AVP 112
+a=rtpmap:112 AMR/8000
+a=fmtp:112 octet-align=1
+a=ptime:20

 DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + 
mncc_tx_to_gsm_cc: now used by 2 (attached,mncc_tx_to_gsm_cc)
 DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + CC: now 
used by 3 (attached,mncc_tx_to_gsm_cc,CC)
 DCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 
callref-0x423 tid-255) New transaction
+DCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 
callref-0x423 tid-255) rx MNCC_SETUP_REQ SDP: 
remote=10.23.23.1:23{AMR:octet-align=1#112}
 DMNCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 
callref-0x423 tid-255) rx MNCC_SETUP_REQ
 DPAG Paging: IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 for MNCC: 
establish call: Starting paging
   paging request (CALL_CONVERSATIONAL) to 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 on UTRAN-Iu
@@ -761,12 +772,12 @@
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 Received Event MSC_A_EV_TRANSACTION_ACCEPTED
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 state_chg to MSC_A_ST_COMMUNICATING
 DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) starting timer T303 with 30 seconds
-DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) Got no information of remote audio codecs: neither SDP nor 
Bearer Capability. Trying anyway.
-DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) codecs: 
:0{AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113} (from: 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
+DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) rx MNCC_SETUP_REQ SDP: 
remote=10.23.23.1:23{AMR:octet-align=1#112}
+DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) codecs: :0{AMR:octet-align=1#112} (from: 
remote=10.23.23.1:23{AMR:octet-align=1#112} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
 DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) new state NULL -> CALL_PRESENT
 DIUCS 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 Sending DTAP: CC GSM48_MT_CC_SETUP
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 RAN encode: DTAP on UTRAN-Iu
-- DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_SETUP: 030504076004050b060887
+- DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_SETUP: 030504046004058b
 - DTAP matches expected message
 DMSC 
dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){0}:
 Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST
 DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - Paging: 
now used by 3 (attached,CC,active-conn)
@@ -815,7 +826,8 @@
 DCC 
call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}:
 Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE
 DIUCS 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 MGW endpoint's RTP address available for the CI RTP_TO_CN: 10.23.23.1:23 
(osmux=no:-2)
-DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) codecs: :0{VND.3GPP.IUFP/16000#96} (from: 
assigned=VND.3GPP.IUFP/16000#96 
MS={AMR:octet-align=1#112,GSM-EFR#110,GSM#3,GSM-HR-08#111} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
+DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) codecs: :0{VND.3GPP.IUFP/16000#96} (from: 
assigned=VND.3GPP.IUFP/16000#96 remote=10.23.23.1:23{AMR:octet-align=1#112} 
MS={AMR:octet-align=1#112,GSM-EFR#110,GSM#3,GSM-HR-08#111} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
+DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) MNCC_RTP_CREATE SDP: remote=:0{VND.3GPP.IUFP/16000#96}
 DMNCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) tx MNCC_RTP_CREATE
   MSC --> MNCC: callref 0x423: MNCC_RTP_CREATE
 - Total time passed: 1.000023 s
@@ -827,6 +839,7 @@
 DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) stopping pending timer T310
 DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) starting timer T301 with 180 seconds
 DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) new state MO_TERM_CALL_CONF -> CALL_RECEIVED
+DCC trans(CC:CALL_RECEIVED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) codecs: :0{VND.3GPP.IUFP/16000#96} (from: 
assigned=VND.3GPP.IUFP/16000#96 remote=10.23.23.1:23{AMR:octet-align=1#112} 
MS={AMR:octet-align=1#112,GSM-EFR#110,GSM#3,GSM-HR-08#111} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
 DMNCC trans(CC:CALL_RECEIVED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) tx MNCC_ALERT_IND
   MSC --> MNCC: callref 0x423: MNCC_ALERT_IND
 DREF 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 - rx_from_ms: now used by 1 (cc)
@@ -1141,10 +1154,20 @@

 - after a while, MNCC asks us to setup a call, causing Paging
   MSC <-- MNCC: callref 0x423: MNCC_SETUP_REQ
+v=0
+o=OsmoMSC 0 0 IN IP4 10.23.23.1
+s=GSM Call
+c=IN IP4 10.23.23.1
+t=0 0
+m=audio 23 RTP/AVP 112
+a=rtpmap:112 AMR/8000
+a=fmtp:112 octet-align=1
+a=ptime:20

 DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + 
mncc_tx_to_gsm_cc: now used by 2 (attached,mncc_tx_to_gsm_cc)
 DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 + CC: now 
used by 3 (attached,mncc_tx_to_gsm_cc,CC)
 DCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 
callref-0x423 tid-255) New transaction
+DCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 
callref-0x423 tid-255) rx MNCC_SETUP_REQ SDP: 
remote=10.23.23.1:23{AMR:octet-align=1#112}
 DMNCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 
callref-0x423 tid-255) rx MNCC_SETUP_REQ
 DPAG Paging: IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 for MNCC: 
establish call: Starting paging
   paging request (CALL_CONVERSATIONAL) to 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 on UTRAN-Iu
@@ -1233,12 +1256,12 @@
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 Received Event MSC_A_EV_TRANSACTION_ACCEPTED
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_AUTHENTICATED}:
 state_chg to MSC_A_ST_COMMUNICATING
 DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) starting timer T303 with 30 seconds
-DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) Got no information of remote audio codecs: neither SDP nor 
Bearer Capability. Trying anyway.
-DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) codecs: 
:0{AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113} (from: 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
+DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) rx MNCC_SETUP_REQ SDP: 
remote=10.23.23.1:23{AMR:octet-align=1#112}
+DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) codecs: :0{AMR:octet-align=1#112} (from: 
remote=10.23.23.1:23{AMR:octet-align=1#112} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
 DCC trans(CC:NULL 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) new state NULL -> CALL_PRESENT
 DIUCS 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 Sending DTAP: CC GSM48_MT_CC_SETUP
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 RAN encode: DTAP on UTRAN-Iu
-- DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_SETUP: 030504076004050b060887
+- DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_SETUP: 030504046004058b
 - DTAP matches expected message
 DMSC 
dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){0}:
 Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST
 DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - Paging: 
now used by 3 (attached,CC,active-conn)
@@ -1264,6 +1287,15 @@
 DREF 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 - rx_from_ms: now used by 1 (cc)
 - MNCC sends MNCC_RTP_CREATE
   MSC <-- MNCC: callref 0x423: MNCC_RTP_CREATE
+v=0
+o=OsmoMSC 0 0 IN IP4 10.23.23.1
+s=GSM Call
+c=IN IP4 10.23.23.1
+t=0 0
+m=audio 23 RTP/AVP 112
+a=rtpmap:112 AMR/8000
+a=fmtp:112 octet-align=1
+a=ptime:20

 DMNCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) rx MNCC_RTP_CREATE
 DIUCS 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 Assignment for this trans already started earlier
@@ -1287,7 +1319,8 @@
 DCC 
call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}:
 Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE
 DIUCS 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 MGW endpoint's RTP address available for the CI RTP_TO_CN: 10.23.23.1:23 
(osmux=no:-2)
-DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) codecs: :0{VND.3GPP.IUFP/16000#96} (from: 
assigned=VND.3GPP.IUFP/16000#96 
MS={AMR:octet-align=1#112,GSM-EFR#110,GSM#3,GSM-HR-08#111} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
+DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) codecs: :0{VND.3GPP.IUFP/16000#96} (from: 
assigned=VND.3GPP.IUFP/16000#96 remote=10.23.23.1:23{AMR:octet-align=1#112} 
MS={AMR:octet-align=1#112,GSM-EFR#110,GSM#3,GSM-HR-08#111} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
+DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) MNCC_RTP_CREATE SDP: remote=:0{VND.3GPP.IUFP/16000#96}
 DMNCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) tx MNCC_RTP_CREATE
   MSC --> MNCC: callref 0x423: MNCC_RTP_CREATE
 - Total time passed: 1.000023 s
@@ -1299,6 +1332,7 @@
 DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) stopping pending timer T310
 DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) starting timer T301 with 180 seconds
 DCC trans(CC:MO_TERM_CALL_CONF 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) new state MO_TERM_CALL_CONF -> CALL_RECEIVED
+DCC trans(CC:CALL_RECEIVED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) codecs: :0{VND.3GPP.IUFP/16000#96} (from: 
assigned=VND.3GPP.IUFP/16000#96 remote=10.23.23.1:23{AMR:octet-align=1#112} 
MS={AMR:octet-align=1#112,GSM-EFR#110,GSM#3,GSM-HR-08#111} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
 DMNCC trans(CC:CALL_RECEIVED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP 
callref-0x423 tid-0) tx MNCC_ALERT_IND
   MSC --> MNCC: callref 0x423: MNCC_ALERT_IND
 DREF 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}:
 - rx_from_ms: now used by 1 (cc)
@@ -1698,6 +1732,7 @@
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE
 DIUCS 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 MGW endpoint's RTP address available for the CI RTP_TO_CN: 10.23.23.1:23 
(osmux=no:-2)
 DCC trans(CC:INITIATED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ 
callref-0x80000002 tid-8) codecs: :0{VND.3GPP.IUFP/16000#96} (from: 
assigned=VND.3GPP.IUFP/16000#96 
MS={AMR:octet-align=1#112,GSM-EFR#110,GSM#3,GSM-HR-08#111} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
+DCC trans(CC:INITIATED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ 
callref-0x80000002 tid-8) MNCC_RTP_CREATE SDP: remote=:0{VND.3GPP.IUFP/16000#96}
 DMNCC trans(CC:INITIATED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ 
callref-0x80000002 tid-8) tx MNCC_RTP_CREATE
   MSC --> MNCC: callref 0x80000002: MNCC_RTP_CREATE
 - MNCC says that's fine
@@ -2127,6 +2162,7 @@
 DMSC 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 Received Event MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE
 DIUCS 
msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}:
 MGW endpoint's RTP address available for the CI RTP_TO_CN: 10.23.23.1:23 
(osmux=no:-2)
 DCC trans(CC:INITIATED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ 
callref-0x80000003 tid-8) codecs: :0{VND.3GPP.IUFP/16000#96} (from: 
assigned=VND.3GPP.IUFP/16000#96 
MS={AMR:octet-align=1#112,GSM-EFR#110,GSM#3,GSM-HR-08#111} 
RAN={AMR:octet-align=1#112,AMR-WB/16000:octet-align=1#113})
+DCC trans(CC:INITIATED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ 
callref-0x80000003 tid-8) MNCC_RTP_CREATE SDP: remote=:0{VND.3GPP.IUFP/16000#96}
 DMNCC trans(CC:INITIATED 
IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ 
callref-0x80000003 tid-8) tx MNCC_RTP_CREATE
   MSC --> MNCC: callref 0x80000003: MNCC_RTP_CREATE
 - MNCC says that's fine

--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/31698
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ie0668c0e079ec69da1532b52d00621efe114fc2c
Gerrit-Change-Number: 31698
Gerrit-PatchSet: 1
Gerrit-Owner: neels <[email protected]>
Gerrit-MessageType: newchange

Reply via email to