Project

General

Profile

Bug #4240

test: incoming call when already Paging

Added by neels 29 days ago. Updated 29 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
10/21/2019
Due date:
% Done:

0%

Resolution:

Description

Looking at the CC code in osmo-msc, I notice this:

http://git.osmocom.org/osmo-msc/tree/src/libmsc/gsm_04_08_cc.c?id=a09f4987c1e636052a4e37dae9d183d5aea49a8f#n1944

                /* If subscriber has no conn */
                if (!msc_a) {

                        if (vsub->cs.is_paging) {
                                LOG_TRANS(trans, LOGL_DEBUG,
                                          "rx %s, subscriber not yet connected, paging already started\n",
                                          get_mncc_name(msg->msg_type));
                                vlr_subscr_put(vsub, __func__);
                                trans_free(trans);                   <--------- Problem?
                                return 0;
                        }

                        /* store setup information until paging succeeds */
                        memcpy(&trans->cc.msg, data, sizeof(struct gsm_mncc));

                        /* Request a channel */
                        trans->paging_request = paging_request_start(vsub, PAGING_CAUSE_CALL_CONVERSATIONAL,
                                                                     cc_paging_cb, trans, "MNCC: establish call");

If the subscriber has no conn yet, we Page it.
But if we are already Paging, we should keep the transaction and act on it once the Paging Response is received.
However, this code seems to free the transaction.

We need a test for this scenario:

  • Subscriber is being Paged (e.g. for SMS or whatever), no Paging Response has come in yet
  • An MT call is starting for this subscriber
  • Expect the MT call to proceed

When the test has confirmed erratic behavior, see if this patch fixes the problem:

--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -1944,18 +1944,17 @@ static int mncc_tx_to_gsm_cc(struct gsm_network *net, const union mncc_msg *msg)
                /* If subscriber has no conn */
                if (!msc_a) {

+                       /* store setup information until paging succeeds */
+                       memcpy(&trans->cc.msg, data, sizeof(struct gsm_mncc));
+
                        if (vsub->cs.is_paging) {
                                LOG_TRANS(trans, LOGL_DEBUG,
                                          "rx %s, subscriber not yet connected, paging already started\n",
                                          get_mncc_name(msg->msg_type));
                                vlr_subscr_put(vsub, __func__);
-                               trans_free(trans);
                                return 0;
                        }

-                       /* store setup information until paging succeeds */
-                       memcpy(&trans->cc.msg, data, sizeof(struct gsm_mncc));
-
                        /* Request a channel */
                        trans->paging_request = paging_request_start(vsub, PAGING_CAUSE_CALL_CONVERSATIONAL,
                                                                     cc_paging_cb, trans, "MNCC: establish call");

History

#1 Updated by neels 29 days ago

(above patch is on branch neels/mncc_codecs as Idd4537b5f4817d17e5c87d9a93775a32aee0e7be )

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)