Browse Source

modules/ims_qos: changed Rx signalling to registration status to use flow usage AF signalling

Richard Good 9 years ago
parent
commit
bb8d1dfa1e
3 changed files with 11 additions and 10 deletions
  1. 4 3
      modules/ims_qos/rx_aar.c
  2. 5 5
      modules/ims_qos/rx_avp.c
  3. 2 2
      modules/ims_qos/rx_avp.h

+ 4 - 3
modules/ims_qos/rx_aar.c

@@ -416,7 +416,7 @@ int add_media_components_using_current_flow_description(AAAMessage* aar, rx_auth
                     &flow_description->req_sdp_port, &flow_description->rpl_sdp_ip_addr,
                     &flow_description->rpl_sdp_port, &flow_description->rpl_sdp_transport,
                     &flow_description->req_sdp_raw_stream,
-                    &flow_description->rpl_sdp_raw_stream, flow_description->direction);
+                    &flow_description->rpl_sdp_raw_stream, flow_description->direction, AVP_EPC_Flow_Usage_No_Information);
         }
 
         flow_description = flow_description->next;
@@ -530,7 +530,7 @@ int add_media_components(AAAMessage* aar, struct sip_msg *req,
                                 &req_sdp_stream->port, &ipB,
                                 &rpl_sdp_stream->port, &rpl_sdp_stream->transport,
                                 &req_sdp_stream->raw_stream,
-                                &rpl_sdp_stream->raw_stream, direction);
+                                &rpl_sdp_stream->raw_stream, direction, AVP_EPC_Flow_Usage_No_Information);
                     }
                     add_flow = 1;
                 }
@@ -965,13 +965,14 @@ int rx_send_aar_register(struct sip_msg *msg, AAASession* auth, saved_transactio
     protocol.s = "IP";
     protocol.len = strlen("IP");
 
+    //rx_add_media_component_description_avp_register(aar);
     /* Add media component description avp for register*/
     rx_add_media_component_description_avp(aar, 1,
                &media, &saved_t_data->via_host,
                &port_from, &af_signaling_ip,
                &port_to, &protocol,
                &raw_stream,
-               &raw_stream, DLG_MOBILE_REGISTER);
+               &raw_stream, DLG_MOBILE_REGISTER, AVP_EPC_Flow_Usage_AF_Signaling);
 
     /* Add specific action AVP's */
     rx_add_specific_action_avp(aar, 1); // CHARGING_CORRELATION_EXCHANGE

+ 5 - 5
modules/ims_qos/rx_avp.c

@@ -390,7 +390,7 @@ inline static unsigned int sdp_b_value(str * payload, char * subtype)
 }
 
 inline int rx_add_media_component_description_avp(AAAMessage *msg, int number, str *media_description, str *ipA, str *portA, str *ipB, str *portB, str *transport,
-		str *req_raw_payload, str *rpl_raw_payload, enum dialog_direction dlg_direction)
+		str *req_raw_payload, str *rpl_raw_payload, enum dialog_direction dlg_direction, int flow_usage_type)
 {
 		str data;
 		AAA_AVP_LIST list;
@@ -425,10 +425,10 @@ inline int rx_add_media_component_description_avp(AAAMessage *msg, int number, s
 
 		/*media-sub-component*/
 		if (dlg_direction != DLG_MOBILE_ORIGINATING) {
-				media_sub_component[media_sub_component_number] = rx_create_media_subcomponent_avp(number, transport, ipA, portA, ipB, portB);
+				media_sub_component[media_sub_component_number] = rx_create_media_subcomponent_avp(number, transport, ipA, portA, ipB, portB, flow_usage_type);
 				cdpb.AAAAddAVPToList(&list, media_sub_component[media_sub_component_number]);
 		} else {
-				media_sub_component[media_sub_component_number] = rx_create_media_subcomponent_avp(number, transport, ipB, portB, ipA, portA);
+				media_sub_component[media_sub_component_number] = rx_create_media_subcomponent_avp(number, transport, ipB, portB, ipA, portA, flow_usage_type);
 				cdpb.AAAAddAVPToList(&list, media_sub_component[media_sub_component_number]);
 		}
 
@@ -670,7 +670,7 @@ int reg_match(char *pattern, char *string, regmatch_t *pmatch)
 
 AAA_AVP *rx_create_media_subcomponent_avp(int number, str* proto,
 		str *ipA, str *portA,
-		str *ipB, str *portB)
+		str *ipB, str *portB, int flow_usage_type)
 {
 		str data;
 		int len, len2, len3;
@@ -871,7 +871,7 @@ AAA_AVP *rx_create_media_subcomponent_avp(int number, str* proto,
 				cdpb.AAAAddAVPToList(&list, flow_description4);
 		}
 
-		set_4bytes(x, AVP_EPC_Flow_Usage_No_Information);
+		set_4bytes(x, flow_usage_type);
 		flow_usage = cdpb.AAACreateAVP(AVP_IMS_Flow_Usage,
 				AAA_AVP_FLAG_MANDATORY | AAA_AVP_FLAG_VENDOR_SPECIFIC,
 				IMS_vendor_id_3GPP, x, 4,

+ 2 - 2
modules/ims_qos/rx_avp.h

@@ -80,11 +80,11 @@ int rx_add_subscription_id_avp(AAAMessage *msg, str identifier, int identifier_t
 int rx_add_auth_application_id_avp(AAAMessage *msg, unsigned int data);
 
 int rx_add_media_component_description_avp(AAAMessage *msg, int number, str *media_description, str *ipA, str *portA, str *ipB, str *portB, str *transport, 
-        str *raw_payload, str *rpl_raw_payload, enum dialog_direction dlg_direction);
+        str *raw_payload, str *rpl_raw_payload, enum dialog_direction dlg_direction, int flow_usage_type);
 
 int rx_add_media_component_description_avp_register(AAAMessage *msg);
 
-AAA_AVP *rx_create_media_subcomponent_avp(int number, str *proto, str *ipA, str *portA, str *ipB, str *portB);
+AAA_AVP *rx_create_media_subcomponent_avp(int number, str *proto, str *ipA, str *portA, str *ipB, str *portB, int flow_usage_type);
 
 AAA_AVP *rx_create_media_subcomponent_avp_register();