fix RTP/RTCP Port in N5 Request on term side (#391)
* fix RTP/RTCP Port in N5 Request Fix storing and retrieving SDP RTP/RTCP Ports from Orig User on term side * fix RTP/RTCP Port in N5 Request Fix storing and retrieving SDP RTP/RTCP Ports from Orig User on term side
This commit is contained in:
committed by
GitHub
parent
9560e618b4
commit
1f8a419635
@@ -223,27 +223,27 @@ route[N5_INIT_MT_REQ] {
|
||||
|
||||
|
||||
$var(term_ue_ip) = $dd;
|
||||
$var(term_ue_port) = $rp;
|
||||
$var(pcscf_ip) = $Ri;
|
||||
$var(pcscf_port) = $Rp;
|
||||
$var(term_sip_ue_port) = $rp;
|
||||
$var(pcscf_sip_ip) = $Ri;
|
||||
$var(pcscf_sip_port) = $Rp;
|
||||
|
||||
# now checking it on console if I got what I wanted :
|
||||
xlog("L_INFO", "connection Info for Term UE $var(term_ue_ip) $var(term_ue_port)\n");
|
||||
xlog("L_INFO", "connection Info for P-CSCF is: $var(pcscf_ip) $var(pcscf_port)\n");
|
||||
xlog("L_INFO", "SIP connection Info for Term UE $var(term_ue_ip) $var(term_sip_ue_port)\n");
|
||||
xlog("L_INFO", "SIP connection Info for P-CSCF is: $var(pcscf_sip_ip) $var(pcscf_sip_port)\n");
|
||||
|
||||
# now trying some way to store IP of Term UE
|
||||
$var(term_user_id_req_ip) = $tU; # should get the user part of the Orig UE from request
|
||||
|
||||
# Store the IP in the hash table associated with the UE
|
||||
$sht(user_sip_ips=>$var(term_user_id_req_ip)) = $var(term_ue_ip);
|
||||
xlog("L_INFO", "IP Info for Term UE MSISDN $var(term_user_id_req_ip): $var(term_ue_ip)\n");
|
||||
xlog("L_INFO", "SIP/SDP IP Info for Term UE MSISDN $var(term_user_id_req_ip): $var(term_ue_ip)\n");
|
||||
|
||||
# now trying some way to store Port of Term UE
|
||||
$var(term_user_id_req_port) = $tU; # should get the user part of the Orig UE from request
|
||||
|
||||
# Store the Port in the hash table associated with the UE
|
||||
$sht(user_sip_ports=>$var(user_id_req_port)) = $var(term_ue_port);
|
||||
xlog("L_INFO", "Port Info for UE MSISDN $var(term_user_id_req_port): $var(term_ue_port)\n");
|
||||
$sht(user_sip_ports=>$var(term_user_id_req_port)) = $var(term_sip_ue_port);
|
||||
xlog("L_INFO", "SIP Port Info for UE MSISDN $var(term_user_id_req_port): $var(term_sip_ue_port)\n");
|
||||
|
||||
#### 5G VoNR N5 NPCF Authorization reuqest
|
||||
|
||||
@@ -251,60 +251,54 @@ route[N5_INIT_MT_REQ] {
|
||||
xlog("L_INFO", "IMS: MTC INVITE TO $tU\n");
|
||||
|
||||
|
||||
## retrieving SDP Connection Info and Media Port for Orig UE ( in case we will start with INVITE), the values should be already there if the call fom UE registred to this P-CSCF, in case the call coming from outside then we need to get them from the initial INVITE
|
||||
## retrieving SDP Connection Info and Media Port for Orig UE ( in case we will start with INVITE):
|
||||
|
||||
$var(sdp_src_ip) = $sdp(c:ip);
|
||||
$var(sdp_src_port) = $sdp(m0:rtp:port);
|
||||
$var(sdp_src_rtcp_port) = $sdp(m0:rtcp:port);
|
||||
$var(orig_ue_sdp_rtcp_port) = $sdp(m0:rtcp:port);
|
||||
$var(sdp_mline_raw) = $sdp(m0:raw);
|
||||
|
||||
xlog("L_INFO", "SDP Info From INVITE: $sdp(c:ip) -- $sdp(m0:rtp:port) -- $sdp(m0:rtcp:port)\n");
|
||||
|
||||
# SDP IP Orig Party
|
||||
|
||||
$var(orig_sdp_id_ue) = $fU; # User Part of the from Header to get the USER
|
||||
$var(ue_sdp_ip) = $sht(user_sdps_ip=>$var(sdp_id_ue));
|
||||
if $var(ue_sdp_ip) == 0 {
|
||||
xlog("L_INFO", "SDP RTP IP for Orig Party is 0, need to get it from the INVITE, happend if INVITE coming from outside\n");
|
||||
|
||||
# now trying some way to store SDP SRC_IP of Orig Party
|
||||
$var(user_id_sdp_ip) = $fU; # should get the user part of the Orig UE from request
|
||||
|
||||
# Store the AppSession in the hash table associated with the UE
|
||||
$sht(user_sdps_ip=>$var(user_id_sdp_ip)) = $var(sdp_src_ip);
|
||||
xlog("L_INFO", "SDP SRC_IP of External UE $var(user_id_sdp_ip): $var(sdp_src_ip)\n");
|
||||
} else {
|
||||
xlog("L_INFO", "SDP IP for UE with MSISDN $var(sdp_id_ue) is: $var(ue_sdp_ip)\n");
|
||||
}
|
||||
$var(call_id_sdp_ip) = $ci; # call-ID
|
||||
|
||||
# SDP Port Orig Party
|
||||
# Store the SDP IP in the hash table associated with the Call-ID
|
||||
$sht(user_sdps_ip=>$var(call_id_sdp_ip)) = $var(sdp_src_ip);
|
||||
|
||||
#Testing retrival
|
||||
|
||||
$var(ret_call_id_sdp_ip) = $ci; # User Port of the from Header to get the USER
|
||||
$var(sdp_src_ip) = $sht(user_sdps_ip=>$var(ret_call_id_sdp_ip));
|
||||
|
||||
xlog("L_INFO", "SDP IP of orig UE $fU Call-ID $var(call_id_sdp_ip): $var(sdp_src_ip)\n");
|
||||
|
||||
# SDP RTP Port Orig Party
|
||||
|
||||
$var(sdp_id_ue_port) = $fU; # User Port of the from Header to get the USER
|
||||
$var(ue_sdp_port) = $sht(user_sdps_port=>$var(sdp_id_ue_port));
|
||||
$var(sdp_call_id_port) = $ci; # call-ID
|
||||
|
||||
if $var(ue_sdp_port) == 0 {
|
||||
xlog("L_INFO", "SDP RTP port for Orig Party is 0, need to get it from the INVITE, happend if INVITE coming from outside\n");
|
||||
# now trying some way to store SDP Media_Port of Orig UE
|
||||
$var(user_id_sdp_port) = $fU; # should get the user part of the Orig UE from request
|
||||
# store SDP Media_Port in the hash table associated with the Call-ID
|
||||
$sht(user_sdps_port=>$var(sdp_call_id_port)) = $var(sdp_src_port);
|
||||
|
||||
# store SDP Media_Port in the hash table associated with the UE
|
||||
$sht(user_sdps_port=>$var(user_id_sdp_port)) = $var(sdp_src_port);
|
||||
xlog("L_INFO", "SDP Media_Port of External UE $var(user_id_sdp_port): $var(sdp_src_port)\n");
|
||||
} else {
|
||||
xlog("L_INFO", "SDP Port for UE with MSISDN $var(sdp_id_ue_port) is: $var(ue_sdp_port)\n");
|
||||
}
|
||||
xlog("L_INFO", "SDP Port for MTC Call-ID $var(sdp_call_id_port) is: $var(sdp_src_port)\n");
|
||||
|
||||
$var(sdp_id_ue_rtcp_port) = $fU; # User Port of the from Header to get the USER
|
||||
$var(ue_sdp_rtcp_port) = $sht(user_sdps_rtcp_port=>$var(sdp_id_ue_rtcp_port));
|
||||
# SDP RTCP Port Orig Party
|
||||
|
||||
if $var(ue_sdp_port) == 0 {
|
||||
xlog("L_INFO", "SDP RTCP port for Orig Party is 0, need to get it from the INVITE, happend if INVITE coming from outside\n");
|
||||
# now trying some way to store SDP RTCP_Media_Port of Orig UE
|
||||
$var(user_id_sdp_rtcp_port) = $fU; # should get the user part of the Orig UE from request
|
||||
$var(sdp_call_id_rtcp_port) = $ci; # User Port of the from Header to get the USER
|
||||
#Store SDP RTCP Port in the hash table associated with the Call-ID
|
||||
$sht(user_sdps_rtcp_port=>$var(sdp_call_id_rtcp_port)) = $var(orig_ue_sdp_rtcp_port);
|
||||
|
||||
|
||||
# Store the RTCP_Media_Port in the hash table associated with the UE
|
||||
$sht(user_sdps_rtcp_port=>$var(user_id_sdp_rtcp_port)) = $var(sdp_src_rtcp_port);
|
||||
xlog("L_INFO", "SDP RTCP_Media_Port of External UE $var(user_id_sdp_rtcp_port): $var(sdp_src_rtcp_port)\n");
|
||||
} else {
|
||||
xlog("L_INFO", "SDP Port for UE with MSISDN $var(sdp_id_ue_port) is: $var(ue_sdp_port)\n");
|
||||
}
|
||||
#Testing retrival
|
||||
$var(sdp_call_id_rtcp_port) = $ci;
|
||||
$var(orig_ue_sdp_rtcp_port) = $sht(user_sdps_rtcp_port=>$var(sdp_call_id_rtcp_port));
|
||||
|
||||
xlog("L_INFO", "SDP RTCP Port for UE with MSISDN $fU is: $var(orig_ue_sdp_rtcp_port)\n");
|
||||
|
||||
|
||||
#### now start to build the N5 Request
|
||||
|
||||
@@ -340,7 +334,7 @@ $var(sdp_mline_raw) = $sdp(m0:raw);
|
||||
|
||||
### RTCP
|
||||
jansson_set("integer", "fNum", 2, "$var(medSubComp2)");
|
||||
jansson_set("array", "fDescs", "[\"permit out 17 from $var(sdp_src_ip) $var(sdp_src_rtcp_port) to $dd 49000-51000\", \"permit in 17 from $dd 49000-51000 to $var(sdp_src_ip) $var(sdp_src_rtcp_port)\"]", "$var(medSubComp2)");
|
||||
jansson_set("array", "fDescs", "[\"permit out 17 from $var(sdp_src_ip) $var(orig_ue_sdp_rtcp_port) to $dd 49000-51000\", \"permit in 17 from $dd 49000-51000 to $var(sdp_src_ip) $var(orig_ue_sdp_rtcp_port)\"]", "$var(medSubComp2)");
|
||||
jansson_set("string", "fStatus", "ENABLED", "$var(medSubComp2)");
|
||||
jansson_set("string", "marBwDl", "5000 Kbps", "$var(medSubComp2)");
|
||||
jansson_set("string", "marBwUl", "3000 Kbps", "$var(medSubComp2)");
|
||||
@@ -460,22 +454,22 @@ $var(sdp_mline_raw) = $sdp(m0:raw);
|
||||
route[N5_PATCH_MT_REQ] {
|
||||
|
||||
|
||||
xlog("L_DBG", "M5 PATCH: Received SDP Change, doing N5 PATCH Request\n");
|
||||
xlog("L_INFO", "N5_PATCH_MT_REQ, building N5 PATCH Request\n");
|
||||
|
||||
|
||||
## retrieving SDP Connection Info and Media Port for UE
|
||||
$var(sdp_id_ue) = $fU; # User Part of the from Header to get the USER
|
||||
$var(ue_sdp_ip) = $sht(user_sdps_ip=>$var(sdp_id_ue));
|
||||
xlog("L_INFO", "SDP IP for UE with MSISDN $var(sdp_id_ue) is: $var(ue_sdp_ip)\n");
|
||||
$var(sdp_call_id) = $ci; # Call-ID for INVITE
|
||||
$var(orig_ue_sdp_ip) = $sht(user_sdps_ip=>$var(sdp_call_id));
|
||||
xlog("L_INFO", "SDP IP for UE with MSISDN $fU Call-ID $var(sdp_call_id) is: $var(orig_ue_sdp_ip)\n");
|
||||
|
||||
$var(sdp_id_ue_port) = $fU; # User Port of the from Header to get the USER
|
||||
$var(ue_sdp_port) = $sht(user_sdps_port=>$var(sdp_id_ue_port));
|
||||
xlog("L_INFO", "SDP Port for UE with MSISDN $var(sdp_id_ue_port) is: $var(ue_sdp_port)\n");
|
||||
$var(sdp_call_id_port) = $ci; # User Port of the from Header to get the USER
|
||||
$var(orig_ue_sdp_port) = $sht(user_sdps_port=>$var(sdp_call_id_port));
|
||||
xlog("L_INFO", "SDP RTP Port for UE with MSISDN $fU Call-ID $var(sdp_call_id_port) is: $var(orig_ue_sdp_port)\n");
|
||||
|
||||
|
||||
$var(sdp_id_ue_rtcp_port) = $fU; # User Port of the from Header to get the USER
|
||||
$var(ue_sdp_rtcp_port) = $sht(user_sdps_rtcp_port=>$var(sdp_id_ue_rtcp_port));
|
||||
xlog("L_INFO", "SDP Port for UE with MSISDN $var(sdp_id_ue_rtcp_port) is: $var(ue_sdp_rtcp_port)\n");
|
||||
$var(sdp_call_id_rtcp_port) = $ci; # Call ID for INVITE
|
||||
$var(orig_ue_sdp_rtcp_port) = $sht(user_sdps_rtcp_port=>$var(sdp_call_id_rtcp_port));
|
||||
xlog("L_INFO", "SDP RTCP Port for UE with MSISDN $fU Call-ID $var(sdp_call_id_rtcp_port) is: $var(orig_ue_sdp_rtcp_port)\n");
|
||||
|
||||
## retrieving SDP Connection Info from SDP Answer
|
||||
$var(sdp_answ_ip) = $sdp(c:ip);
|
||||
@@ -514,7 +508,7 @@ route[N5_PATCH_MT_REQ] {
|
||||
|
||||
### RTP
|
||||
jansson_set("integer", "fNum", 1, "$var(medSubComp1)");
|
||||
jansson_set("array", "fDescs", "[\"permit out 17 from $var(ue_sdp_ip) $var(ue_sdp_port) to $var(sdp_answ_ip) $var(sdp_answ_port)\", \"permit in 17 from $var(sdp_answ_ip) $var(sdp_answ_port) to $var(ue_sdp_ip) $var(ue_sdp_port)\"]", "$var(medSubComp1)");
|
||||
jansson_set("array", "fDescs", "[\"permit out 17 from $var(orig_ue_sdp_ip) $var(orig_ue_sdp_port) to $var(sdp_answ_ip) $var(sdp_answ_port)\", \"permit in 17 from $var(sdp_answ_ip) $var(sdp_answ_port) to $var(orig_ue_sdp_ip) $var(orig_ue_sdp_port)\"]", "$var(medSubComp1)");
|
||||
jansson_set("string", "fStatus", "ENABLED", "$var(medSubComp1)");
|
||||
jansson_set("string", "marBwDl", "5000 Kbps", "$var(medSubComp1)");
|
||||
jansson_set("string", "marBwUl", "3000 Kbps", "$var(medSubComp1)");
|
||||
@@ -523,7 +517,7 @@ route[N5_PATCH_MT_REQ] {
|
||||
|
||||
### RTCP
|
||||
jansson_set("integer", "fNum", 2, "$var(medSubComp2)");
|
||||
jansson_set("array", "fDescs", "[\"permit out 17 from $var(ue_sdp_ip) $var(ue_sdp_rtcp_port) to $var(sdp_answ_ip) $var(sdp_answ_rtcp_port)\", \"permit in 17 from $var(sdp_answ_ip) $var(sdp_answ_rtcp_port) to $var(ue_sdp_ip) $var(ue_sdp_rtcp_port)\"]", "$var(medSubComp2)");
|
||||
jansson_set("array", "fDescs", "[\"permit out 17 from $var(orig_ue_sdp_ip) $var(orig_ue_sdp_rtcp_port) to $var(sdp_answ_ip) $var(sdp_answ_rtcp_port)\", \"permit in 17 from $var(sdp_answ_ip) $var(sdp_answ_rtcp_port) to $var(orig_ue_sdp_ip) $var(orig_ue_sdp_rtcp_port)\"]", "$var(medSubComp2)");
|
||||
jansson_set("string", "fStatus", "ENABLED", "$var(medSubComp2)");
|
||||
jansson_set("string", "marBwDl", "6000 Kbps", "$var(medSubComp2)");
|
||||
jansson_set("string", "marBwUl", "5000 Kbps", "$var(medSubComp2)");
|
||||
|
Reference in New Issue
Block a user