asterisk: Send P-Associated-URI in IMS Register Response
Change-Id: I4c163f34c052d0463baba799c44fecaaa15be394
diff --git a/asterisk/IMS_ConnectionHandler.ttcn b/asterisk/IMS_ConnectionHandler.ttcn
index 091f5da..a55935a 100644
--- a/asterisk/IMS_ConnectionHandler.ttcn
+++ b/asterisk/IMS_ConnectionHandler.ttcn
@@ -66,6 +66,7 @@
charstring user,
charstring display_name,
charstring password,
+ charstring msisdn,
/* Expected User-Location-Info in P-Access-Network-Info */
charstring uli_str,
octetstring rand,
@@ -150,6 +151,7 @@
user := user,
display_name := f_sip_str_quote(display_name),
password := password,
+ msisdn := "90828",
uli_str := "2380100010000101",
/* The Nonce field is the Base64 encoded version of the RAND value and concatenated with the AUTN: */
rand := '14987631f65f8e3788a0798b6ebcd08e'O,
@@ -404,6 +406,7 @@
var template (value) SipAddr to_addr;
var template (value) CommaParam_List digestCln ;
var template (value) WwwAuthenticate wwwAuthenticate;
+ var template (value) P_Associated_Uri p_associated_uri := ts_P_Associated_Uri({});
var template (value) Security_server security_server;
var template (value) Server server_name := ts_Server({c_sip_server_name});
var template (value) Require require := ts_Require({"sec-agree"});
@@ -487,6 +490,7 @@
wwwAuthenticate,
sip_seq_nr,
"REGISTER",
+ p_associated_uri := p_associated_uri,
security_server := security_server,
server := server_name,
supported := supported,
@@ -537,6 +541,16 @@
/* Validate P-Access-Network-Info: */
f_ims_validate_register_P_Access_Network_info(g_rx_sip_req, exp_present := true);
+ p_associated_uri := ts_P_Associated_Uri({
+ ts_P_Assoc_uri_spec(ts_NameAddr(ts_SipUrl(ts_HostPort(g_pars.realm),
+ ts_UserInfo(g_pars.msisdn),
+ scheme := "sip"))),
+ ts_P_Assoc_uri_spec(ts_NameAddr(ts_SipUrl(ts_HostPort(g_pars.msisdn),
+ omit,
+ scheme := "tel"))),
+ ts_P_Assoc_uri_spec(g_rx_sip_req.msgHeader.toField.addressField.nameAddr)
+ });
+
/* Tx 200 OK */
to_addr.params := f_sip_param_set(to_addr.params, "tag", f_sip_rand_tag());
tx_resp := ts_SIP_Response(sip_call_id,
@@ -546,6 +560,7 @@
sip_seq_nr,
"OK",
via,
+ p_associated_uri := p_associated_uri,
require := require,
server := server_name,
supported := supported,