From c56f75299c88867bdca56bce1b06ba777c500667 Mon Sep 17 00:00:00 2001 From: Sukchan Lee Date: Wed, 17 Jan 2018 21:47:59 +0900 Subject: [PATCH] if WEBUI activates state dedicated bearer, modify bearer will be initiated --- src/pcrf/pcrf_gx_path.c | 4 ++-- test/rx/testpacket.c | 2 +- test/rx/volte_test.c | 46 +++++++++++++++++++++++++++++++++-------- test/testpacket.c | 2 +- 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/src/pcrf/pcrf_gx_path.c b/src/pcrf/pcrf_gx_path.c index 5b2fb1b09e..a419adb0dd 100644 --- a/src/pcrf/pcrf_gx_path.c +++ b/src/pcrf/pcrf_gx_path.c @@ -787,8 +787,8 @@ status_t pcrf_gx_send_rar( /* Check WEBUI static dedicated bearer */ if (pcc_rule->num_of_flow) { - d_warn("STATIC dedicated bearer has already been activated"); - d_warn("EPC will initiate modify dedicated bearer"); + d_warn("Dedicated bearer has already been activated by WEBUI"); + d_warn("Modify dedicated bearer is initiated by IMS"); for (j = 0; j < pcc_rule->num_of_flow; j++) { diff --git a/test/rx/testpacket.c b/test/rx/testpacket.c index 2ba1a490b7..d5a52c9311 100644 --- a/test/rx/testpacket.c +++ b/test/rx/testpacket.c @@ -1011,7 +1011,7 @@ status_t tests1ap_build_pdn_disconnectivity_request( "0500000005c08000 0108000800030001 00001a000b0a2732 423c53040206d206" "006440080055f501 0019d01000434006 0055f5011022", "000d40380000" - "0500000005c08000 0108000800030001 00001a000b0a2732 423c53040206d206" + "0500000005c08000 0108000800030001 00001a000b0a2777 693066040206d206" "006440080055f501 0019d01000434006 0055f5011022", "", diff --git a/test/rx/volte_test.c b/test/rx/volte_test.c index 1e788c60e0..e2d0db2eee 100644 --- a/test/rx/volte_test.c +++ b/test/rx/volte_test.c @@ -286,7 +286,7 @@ static void volte_test1(abts_case *tc, void *data) rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); - core_sleep(time_from_msec(1000)); + core_sleep(time_from_msec(300)); /* Send Session-Termination-Request */ pcscf_rx_send_str(rx_sid); @@ -394,7 +394,20 @@ static void volte_test2(abts_case *tc, void *data) "\"arp\" : {" "\"priority_level\" : 3," "\"pre_emption_vulnerability\" : 0," - "\"pre_emption_capability\" : 0 } }" + "\"pre_emption_capability\" : 0 } }," + "\"flow\" : [" + "{ \"direction\" : 2," + "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23454\"," + "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd31\" } }," + "{ \"direction\" : 1," + "\"description\" : \"permit out udp from any 50020 to 10.200.136.98/32 1-65535\"," + "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd30\" } }," + "{ \"direction\" : 2," + "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23455\"," + "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2f\" } }," + "{ \"direction\" : 1," + "\"description\" : \"permit out udp from any 50021 to 10.200.136.98/32 1-65535\"," + "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2e\" } } ]" "} ]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"35840\" }," @@ -570,11 +583,6 @@ static void volte_test2(abts_case *tc, void *data) rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); - core_sleep(time_from_msec(300)); - - /* Send AA-Request */ - pcscf_rx_send_aar(&rx_sid, "45.45.0.5", 1, 1); - /* Receive E-RAB Setup Request + * Activate dedicated EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); @@ -582,6 +590,14 @@ static void volte_test2(abts_case *tc, void *data) ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); + /* Send Activate dedicated EPS bearer context accept */ + rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex); + ABTS_INT_EQUAL(tc, CORE_OK, rv); + rv = tests1ap_enb_send(sock, sendbuf); + ABTS_INT_EQUAL(tc, CORE_OK, rv); + + core_sleep(time_from_msec(300)); + /* Send E-RAB Setup Response */ rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 7, 3); ABTS_INT_EQUAL(tc, CORE_OK, rv); @@ -590,8 +606,18 @@ static void volte_test2(abts_case *tc, void *data) core_sleep(time_from_msec(300)); - /* Send Activate dedicated EPS bearer context accept */ - rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex); + /* Send AA-Request */ + pcscf_rx_send_aar(&rx_sid, "45.45.0.5", 0, 1); + + /* Receive E-RAB Setup Request + + * Activate dedicated EPS bearer context request */ + recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); + rv = tests1ap_enb_read(sock, recvbuf); + ABTS_INT_EQUAL(tc, CORE_OK, rv); + pkbuf_free(recvbuf); + + /* Send Modify EPS bearer context accept */ + rv = tests1ap_build_modify_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); @@ -604,6 +630,7 @@ static void volte_test2(abts_case *tc, void *data) rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); +#if 0 /* Receive E-RAB Release Command + * Deactivate EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); @@ -625,6 +652,7 @@ static void volte_test2(abts_case *tc, void *data) rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); +#endif core_sleep(time_from_msec(300)); /********** Remove Subscriber in Database */ diff --git a/test/testpacket.c b/test/testpacket.c index 2ba1a490b7..d5a52c9311 100644 --- a/test/testpacket.c +++ b/test/testpacket.c @@ -1011,7 +1011,7 @@ status_t tests1ap_build_pdn_disconnectivity_request( "0500000005c08000 0108000800030001 00001a000b0a2732 423c53040206d206" "006440080055f501 0019d01000434006 0055f5011022", "000d40380000" - "0500000005c08000 0108000800030001 00001a000b0a2732 423c53040206d206" + "0500000005c08000 0108000800030001 00001a000b0a2777 693066040206d206" "006440080055f501 0019d01000434006 0055f5011022", "",