Loading LibSip_SIPTypesAndValues.ttcn +15 −15 Original line number Diff line number Diff line Loading @@ -90,21 +90,21 @@ group SimpleConstants const charstring c_plainText := "text/plain"; //text content of 1300 bytes for messages with message body const charstring c_longMessageContent_1300Bytes :="Hello!"; // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // c_CRLF; const charstring c_longMessageContent_1300Bytes :=//"Hello!"; "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& c_CRLF; // Default SIP port number : 5060 Loading LibSip_Steps.ttcn +33 −6 Original line number Diff line number Diff line Loading @@ -995,7 +995,10 @@ group SetHeaders { function f_setHeadersACK() runs on SipComponent { // vc_requestUri.hostPort := vc_reqHostPort; if(vc_response.statusLine.statusCode >= 200 and vc_response.statusLine.statusCode <= 299 ) //ref. RFC3261 8.1.1.7 Via { vc_branch := c_branchCookie & f_getRndTag(); } vc_via:={ fieldName := VIA_E, viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} Loading Loading @@ -1034,7 +1037,7 @@ group SetHeaders { { p_cSeq_s.method := "CANCEL"; vc_branch := c_branchCookie & f_getRndTag(); //vc_branch := c_branchCookie & f_getRndTag(); vc_via:={ fieldName := VIA_E, viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} Loading Loading @@ -1335,6 +1338,28 @@ group SetHeaders { }// end function f_setHeadersNOTIFY /** * * @desc setting of general and basic Publish header fields * in additon to the addresses (To, From, ReqUri) * @param p_cSeq_s */ function f_setHeadersPUBLISH(inout CSeq p_cSeq_s) runs on SipComponent { f_setHeadersGeneral(p_cSeq_s, "PUBLISH"); // cseq, contact, branch, via //after SUBSCRIBE message callid shall be same //vc_callId := { fieldName:=CALL_ID_E, callid:=f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr }; vc_cancel_To := vc_to; vc_caller_To := vc_to; vc_caller_From := vc_from; vc_reqHostPort := vc_requestUri.hostPort; }// end function f_setHeadersPUBLISH /** * * @desc function sets header field for the next outgoing SUBSCRIBE message Loading Loading @@ -2091,6 +2116,7 @@ group SDPOperations{ { var integer mn, cn := 0, i, j, k :=0; var charstring v_PT, v_rtpmap := ""; var template charstring v_mypat := pattern "[ \t]#(0,)([\d]+)*"; var SDP_attribute_list v_mediaAttributes := {}; //increase session version vc_sdp_local.origin.session_version := int2str(str2int(vc_sdp_local.origin.session_version)+1); Loading @@ -2112,7 +2138,7 @@ group SDPOperations{ { if (ischosen(vc_sdp_local.media_list[i].attributes[j].rtpmap)) { if (v_PT == regexp(vc_sdp_local.media_list[i].attributes[j].rtpmap.attr_value, "[ \t]#(0,)([/d]+)*", 0)) if (v_PT == regexp(vc_sdp_local.media_list[i].attributes[j].rtpmap.attr_value, v_mypat, 0)) { v_rtpmap := vc_sdp_local.media_list[i].attributes[j]. rtpmap.attr_value; Loading Loading @@ -3040,7 +3066,7 @@ group SendMessage { */ function f_SendACK(template ACK_Request p_request) runs on SipComponent { p_request.msgHeader.route := f_route(); // update the route header field depending on vc_boo_route //p_request.msgHeader.route := f_route(); // update the route header field depending on vc_boo_route // n/a p_request.msgHeader.recordRoute := f_recordroute(); // update the route header field depending on vc_boo_route SIPP.send(p_request) to vc_sent_label; } Loading Loading @@ -3218,6 +3244,7 @@ group GlobalSteps { */ function f_terminate_component() runs on SipComponent { log("component terminated - forced!"); deactivate; stop; } Loading Loading @@ -3436,7 +3463,7 @@ group Registration { { tc_resp.stop; f_setHeadersOnReceiptOfResponse(vc_cSeq, vc_response); log ("Authorization was not requested as expected"); //log ("Authorization was not requested as expected"); } } } Loading LibSip_Templates.ttcn +6 −4 Original line number Diff line number Diff line Loading @@ -1460,7 +1460,7 @@ group base_templates{ messageBody := omit } //* in reality PUBLISH request contain xml in content template PUBLISH_Request m_PUBLISH_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Event p_event, template RAck p_RAck, template MessageBody p_mb) modifies m_PUBLISH_Dummy := Loading @@ -1473,7 +1473,7 @@ group base_templates{ { callId := p_callId, contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_plainText/*c_sdpAplication*/}, cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "PUBLISH"}, event := p_event, fromField := p_from, Loading Loading @@ -1939,6 +1939,7 @@ group request_receive { template From p_from, template CSeq p_cSeq, template Route p_route, template RecordRoute p_recordRoute, template Reason p_reason ) modifies mw_BYE_Request_Base := { requestLine := Loading @@ -1952,6 +1953,7 @@ group request_receive { fromField := p_from, cSeq := p_cSeq, route := p_route, recordRoute := p_recordRoute, reason := p_reason } } Loading Loading @@ -3340,7 +3342,7 @@ group TemplatePreparationFunctions { template RecordRoute v_recordRoute := omit; if (vc_boo_recordRoute) {return vc_recordRoute} else {return(v_recordRoute)} else {return(v_recordRoute)} //* TODO: RecordRoute is not OPTIONAL!!! Check IT! } /** Loading @@ -3353,7 +3355,7 @@ group TemplatePreparationFunctions { template Route v_route := omit; if (vc_boo_route) {return vc_route} //* TODO: Route header need to be in reverse order than RecordRoute, question of return value - RecordRoute else {return(v_route)} else {return(v_route)} //* TODO: Route is not OPTIONAL!!! Check IT! } } //* end group GiveHeaders Loading Loading
LibSip_SIPTypesAndValues.ttcn +15 −15 Original line number Diff line number Diff line Loading @@ -90,21 +90,21 @@ group SimpleConstants const charstring c_plainText := "text/plain"; //text content of 1300 bytes for messages with message body const charstring c_longMessageContent_1300Bytes :="Hello!"; // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& // c_CRLF; const charstring c_longMessageContent_1300Bytes :=//"Hello!"; "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789"& c_CRLF; // Default SIP port number : 5060 Loading
LibSip_Steps.ttcn +33 −6 Original line number Diff line number Diff line Loading @@ -995,7 +995,10 @@ group SetHeaders { function f_setHeadersACK() runs on SipComponent { // vc_requestUri.hostPort := vc_reqHostPort; if(vc_response.statusLine.statusCode >= 200 and vc_response.statusLine.statusCode <= 299 ) //ref. RFC3261 8.1.1.7 Via { vc_branch := c_branchCookie & f_getRndTag(); } vc_via:={ fieldName := VIA_E, viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} Loading Loading @@ -1034,7 +1037,7 @@ group SetHeaders { { p_cSeq_s.method := "CANCEL"; vc_branch := c_branchCookie & f_getRndTag(); //vc_branch := c_branchCookie & f_getRndTag(); vc_via:={ fieldName := VIA_E, viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} Loading Loading @@ -1335,6 +1338,28 @@ group SetHeaders { }// end function f_setHeadersNOTIFY /** * * @desc setting of general and basic Publish header fields * in additon to the addresses (To, From, ReqUri) * @param p_cSeq_s */ function f_setHeadersPUBLISH(inout CSeq p_cSeq_s) runs on SipComponent { f_setHeadersGeneral(p_cSeq_s, "PUBLISH"); // cseq, contact, branch, via //after SUBSCRIBE message callid shall be same //vc_callId := { fieldName:=CALL_ID_E, callid:=f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr }; vc_cancel_To := vc_to; vc_caller_To := vc_to; vc_caller_From := vc_from; vc_reqHostPort := vc_requestUri.hostPort; }// end function f_setHeadersPUBLISH /** * * @desc function sets header field for the next outgoing SUBSCRIBE message Loading Loading @@ -2091,6 +2116,7 @@ group SDPOperations{ { var integer mn, cn := 0, i, j, k :=0; var charstring v_PT, v_rtpmap := ""; var template charstring v_mypat := pattern "[ \t]#(0,)([\d]+)*"; var SDP_attribute_list v_mediaAttributes := {}; //increase session version vc_sdp_local.origin.session_version := int2str(str2int(vc_sdp_local.origin.session_version)+1); Loading @@ -2112,7 +2138,7 @@ group SDPOperations{ { if (ischosen(vc_sdp_local.media_list[i].attributes[j].rtpmap)) { if (v_PT == regexp(vc_sdp_local.media_list[i].attributes[j].rtpmap.attr_value, "[ \t]#(0,)([/d]+)*", 0)) if (v_PT == regexp(vc_sdp_local.media_list[i].attributes[j].rtpmap.attr_value, v_mypat, 0)) { v_rtpmap := vc_sdp_local.media_list[i].attributes[j]. rtpmap.attr_value; Loading Loading @@ -3040,7 +3066,7 @@ group SendMessage { */ function f_SendACK(template ACK_Request p_request) runs on SipComponent { p_request.msgHeader.route := f_route(); // update the route header field depending on vc_boo_route //p_request.msgHeader.route := f_route(); // update the route header field depending on vc_boo_route // n/a p_request.msgHeader.recordRoute := f_recordroute(); // update the route header field depending on vc_boo_route SIPP.send(p_request) to vc_sent_label; } Loading Loading @@ -3218,6 +3244,7 @@ group GlobalSteps { */ function f_terminate_component() runs on SipComponent { log("component terminated - forced!"); deactivate; stop; } Loading Loading @@ -3436,7 +3463,7 @@ group Registration { { tc_resp.stop; f_setHeadersOnReceiptOfResponse(vc_cSeq, vc_response); log ("Authorization was not requested as expected"); //log ("Authorization was not requested as expected"); } } } Loading
LibSip_Templates.ttcn +6 −4 Original line number Diff line number Diff line Loading @@ -1460,7 +1460,7 @@ group base_templates{ messageBody := omit } //* in reality PUBLISH request contain xml in content template PUBLISH_Request m_PUBLISH_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Event p_event, template RAck p_RAck, template MessageBody p_mb) modifies m_PUBLISH_Dummy := Loading @@ -1473,7 +1473,7 @@ group base_templates{ { callId := p_callId, contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_plainText/*c_sdpAplication*/}, cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "PUBLISH"}, event := p_event, fromField := p_from, Loading Loading @@ -1939,6 +1939,7 @@ group request_receive { template From p_from, template CSeq p_cSeq, template Route p_route, template RecordRoute p_recordRoute, template Reason p_reason ) modifies mw_BYE_Request_Base := { requestLine := Loading @@ -1952,6 +1953,7 @@ group request_receive { fromField := p_from, cSeq := p_cSeq, route := p_route, recordRoute := p_recordRoute, reason := p_reason } } Loading Loading @@ -3340,7 +3342,7 @@ group TemplatePreparationFunctions { template RecordRoute v_recordRoute := omit; if (vc_boo_recordRoute) {return vc_recordRoute} else {return(v_recordRoute)} else {return(v_recordRoute)} //* TODO: RecordRoute is not OPTIONAL!!! Check IT! } /** Loading @@ -3353,7 +3355,7 @@ group TemplatePreparationFunctions { template Route v_route := omit; if (vc_boo_route) {return vc_route} //* TODO: Route header need to be in reverse order than RecordRoute, question of return value - RecordRoute else {return(v_route)} else {return(v_route)} //* TODO: Route is not OPTIONAL!!! Check IT! } } //* end group GiveHeaders Loading