Newer
Older
template REGISTER_Request m_REGISTER_Request_expires
(SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
From p_from, To p_to, Via p_via, Contact p_contact,
template Authorization p_authorization, charstring p_expires)
modifies m_REGISTER_Request_Base
:=
{
msgHeader :=
{
authorization := p_authorization,
expires := {
fieldName := EXPIRES_E,
deltaSec := p_expires }
}
}
template NOTIFY_Request m_NOTIFY_Request_contact (
SipUrl p_requestUri,
CallId p_callId,
CSeq p_cSeq,
From p_from,
To p_to,
Via p_via,
Contact p_contact
) modifies m_NOTIFY_Request_Base
:=
{
msgHeader :=
{
contact := p_contact,
event := m_Event_reg,
subscriptionState := m_SubscriptionState_active
}
}
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
template NOTIFY_Request m_NOTIFY_Request_sipfrag (
SipUrl p_requestUri,
CallId p_callId,
CSeq p_cSeq,
From p_from,
To p_to,
Via p_via,
charstring p_state,
charstring p_sipfrag
) modifies m_NOTIFY_Request_Base := {
requestLine :=
{
method := NOTIFY_E,
requestUri :=
{
hostPort:= p_requestUri.hostPort
}
},
msgHeader :=
{
contentLength := {fieldName := CONTENT_LENGTH_E, len:= lengthof(p_sipfrag)},
contentType := {fieldName := CONTENT_TYPE_E, mediaType := "message/sipfrag"},
subscriptionState := {
fieldName := SUBSCRIPTION_STATE_E,
subState := p_state,
substateParams := omit
},
event := m_Event_refer
},
messageBody := {
sipfrag := p_sipfrag
}
}
} //* end group request_send
group request_receive {
bergengruen
committed
template BYE_Request mw_BYE_Request_Reason(template CallId p_callId, template charstring p_cause) modifies mw_BYE_Request_Base :=
{
msgHeader :=
{
reason := mw_Reason(p_cause)
}
}
bergengruen
committed
template BYE_Request mw_BYE_Request_ReasonSIP(template CallId p_callId, template charstring p_cause) modifies mw_BYE_Request_Base :=
{
msgHeader :=
{
reason := mw_ReasonSIP(p_cause)
}
}
template BYE_Request mw_BYE_Request_headerfieldlist
(
template CallId p_callId,
template SipUrl p_requestUri,
template To p_to,
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 :=
{
requestUri := p_requestUri
},
msgHeader :=
{
callId := p_callId,
toField := p_to,
fromField := p_from,
cSeq := p_cSeq,
route := p_route,
recordRoute := p_recordRoute,
reason := p_reason
}
}
template BYE_Request mw_BYE_Request_UserToUser(template CallId p_callId) modifies mw_BYE_Request_Base :=
{
msgHeader :=
{
userToUser := ?
}
}
template INVITE_Request mw_INVITE_Request_RequestURI (template SipUrl p_sipUrl) modifies mw_INVITE_Dummy :=
{
requestLine :=
{
requestUri := p_sipUrl,
sipVersion := c_sipNameVersion
}
}
template INFO_Request mw_INFO_Request_MB (template CallId p_callId, template MessageBody p_mb) modifies mw_INFO_Request_Base :=
{
messageBody := p_mb
}
template INVITE_Request mw_INVITE_Request_expires modifies mw_INVITE_Request_Base
:=
{
msgHeader := {expires := ?}
}
template INVITE_Request mw_INVITE_Request_callid(CallId p_callid) modifies mw_INVITE_Request_Base
:=
{
msgHeader := {callId := p_callid}
}
template INVITE_Request mw_INVITE_Request_MB (template CallId p_callId, template MessageBody p_mb) modifies mw_INVITE_Request_Base :=
{
msgHeader := {callId := p_callId},
messageBody := p_mb
}
template INVITE_Request mw_INVITE_Request_noPaccessNetworkInfo (template CallId p_callId)
modifies mw_INVITE_Request_Base
:=
{
msgHeader := { pAccessNetworkInfo := omit}
}
template INVITE_Request mw_INVITE_Request_PaccessNetworkInfo (template CallId p_callId)
modifies mw_INVITE_Request_Base
:=
{
msgHeader := { pAccessNetworkInfo := ?}
}
template REGISTER_Request mw_REGISTER_Request_ISC (template PAccessNetworkInfo p_access , template PVisitedNetworkID p_visited )modifies mw_REGISTER_Request_Base :=
{
msgHeader := {
pAccessNetworkInfo := p_access,
pVisitedNetworkID := p_visited
}
template UPDATE_Request mw_UPDATE_Request_SDP(template CallId p_callId, template MessageBody p_mb) modifies mw_UPDATE_Dummy :=
{
messageBody := p_mb
}
template NOTIFY_Request mw_NOTIFY_Request_MB (template CallId p_callId, template MessageBody p_mb) modifies mw_NOTIFY_Request_Base :=
} //* end group request_receive
group response_send {
template Response m_Response_AlertInfo (
StatusLine p_statusLine,
CallId p_callId,
CSeq p_cSeq,
From p_from,
To p_to,
Via p_via,
Contact p_contact,
AlertInfo p_alertInfo
) modifies m_Response_Base:= {
msgHeader := {
alertInfo := p_alertInfo,
contact := p_contact
template Response m_Response_Contact (
StatusLine p_statusLine,
CallId p_callId,
CSeq p_cSeq,
From p_from,
To p_to,
Via p_via,
Contact p_contact
) modifies m_Response_Base:= {
msgHeader := {
contact := p_contact
}
}
template Response m_Response_ext (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordroute) modifies m_Response_Base:=
route := p_route, //f_route(),
recordRoute := p_recordroute //f_recordroute()
}
}
template Response m_Response_mbody (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordroute, template MessageBody p_mb) modifies m_Response_ext:=
{
msgHeader :=
{
contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}
},
messageBody := p_mb
}
template Response m_Response_PAsserted_Privacy (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordroute, template PAssertedID p_pAssertedID, template Privacy p_privacy) modifies m_Response_ext:=
{
msgHeader :=
{
pAssertedID := p_pAssertedID,
privacy := p_privacy
}
}
template Response mw_Response_PAsserted_Privacy_Supported (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq, template PAssertedID p_pAssertedID, template Privacy p_privacy, template Supported p_supported) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
pAssertedID := p_pAssertedID,
privacy := p_privacy,
supported := p_supported
}
}
template Response m_Response_PAsserted_Privacy_mbody (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordroute, template PAssertedID p_pAssertedID, template Privacy p_privacy, MessageBody p_mb) modifies m_Response_ext:=
{
msgHeader :=
{
contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication},
pAssertedID := p_pAssertedID,
privacy := p_privacy
},
messageBody := p_mb
}
} //* end group response_send
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
group response_receive {
template Response mw_Response_Expires (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq, template DeltaSec p_deltaSec) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
expires := {fieldName := EXPIRES_E, deltaSec := p_deltaSec}
}
}
template Response mw_Response_PAsserted_Privacy (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq, template PAssertedID p_pAssertedID, template Privacy p_privacy) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
pAssertedID := p_pAssertedID,
privacy := p_privacy
}
}
template Response mw_Response_Reason (template StatusLine p_statusLine, template CallId p_callId,
bergengruen
committed
template CSeq p_cSeq, template charstring p_cause) modifies mw_Response_Base:=
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
reason := mw_Reason(p_cause)
}
}
template Response mw_Response_RecordRoute (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq, template RecordRoute p_recordRoute) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
recordRoute := p_recordRoute
}
}
template Response mw_Response_Via (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq, template Via p_via) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
via := p_via
}
}
template Response mw_Response_Contact (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq, template Contact p_contact) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
contact := p_contact
}
}
template Response mw_Response_AlertInfo (
template StatusLine p_statusLine,
template CallId p_callId,
template CSeq p_cSeq,
template AlertInfo p_alertInfo
) modifies mw_Response_Base:= {
statusLine := {
sipVersion := c_sipNameVersion,
statusCode := p_statusLine.statusCode,
reasonPhrase := ?
},
msgHeader :=
{
alertInfo := p_alertInfo
}
}
template Response mw_Response_HistoryInfo (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq, template HistoryInfo p_historyInfo) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
historyInfo:=p_historyInfo
}
}
template Response mw_Response_messageBody (
template StatusLine p_statusLine,
template CallId p_callId,
template CSeq p_cSeq,
template Require p_require,
template MessageBody p_mb
) modifies mw_Response_Base:= {
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
require := p_require
},
messageBody := p_mb
}
template Response mw_Response_Require (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq, template Require p_require) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
require := p_require
}
}
template Response mw_Response_Require_ifpresent (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq, template Require p_require) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
require := p_require ifpresent
}
}
template Response mw_Response_Supported (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq, template Supported p_supported) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
supported := p_supported
}
}
template Response mw_Response_UserToUser (template StatusLine p_statusLine, template CallId p_callId,
template CSeq p_cSeq) modifies mw_Response_Base:=
{
statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
msgHeader :=
{
userToUser := ?
}
}
} //* end group response_receive
} //* end group modified_templates
} //* end group MessageTemplates
group SDP_Templates {
group SDP_Messages {
group base_templates {
template SDP_Message m_SDP(SDP_media_desc p_media, in SipUserProfile p_userprofile) := {
protocol_version := 0, //* v=0
origin := {
user_name := "voicesession",
session_id := "30000",
session_version := "0",
net_type := c_in,
addr_type := c_ip4,
addr := p_userprofile.contactIpaddr },
//* o=voicesession 12345 12345 IN IP4 172.27.1.219
session_name := "Voice Session", //* s=Voice Session
information := omit,
uri := omit,
emails := omit,
phone_numbers := omit,
connection := {
net_type := c_in,
addr_type := c_ip4,
conn_addr := { addr:= p_userprofile.bearerIpaddr, ttl:=omit, num_of_addr:=omit }
}, //* c=IN IP4 172.27.1.219
bandwidth := omit,
times := { { time_field := { "0", "0" }, time_repeat:=omit
}
}, //* t=0 0
timezone_adjustments := omit,
key := omit,
attributes := omit,
media_list := {p_media}
};
template SDP_Message m_SDP_mediaList(SDP_media_desc_list p_media_list, in SipUserProfile p_userprofile)
:= {
protocol_version := 0, //* v=0
origin := {
user_name := "voicesession",
session_id := "30000",
session_version := "0",
net_type := c_in,
addr_type := c_ip4,
addr := p_userprofile.contactIpaddr },
//* o=voicesession 12345 12345 IN IP4 172.27.1.219
session_name := "Voice Session", //* s=Voice Session
information := omit,
uri := omit,
emails := omit,
phone_numbers := omit,
connection := {
net_type := c_in,
addr_type := c_ip4,
conn_addr := { addr:= p_userprofile.bearerIpaddr, ttl:=omit, num_of_addr:=omit }
}, //* c=IN IP4 172.27.1.219
bandwidth := omit,
times := { { time_field := { "0", "0" }, time_repeat:=omit
}
}, //* t=0 0
timezone_adjustments := omit,
key := omit,
attributes := omit,
media_list := p_media_list
};
template SDP_Message m_SDP_media_attr_preconditions(SDP_media_desc p_media, in SipUserProfile p_userprofile, SDP_attribute_list p_attribute_list)
modifies m_SDP
:= {
media_list := {
{
media_field := {
media := c_audio,
ports := { port_number := 8500, num_of_ports:=omit },
transport := c_rtpAvp,
fmts := { "0" }
}, //* m=audio 8500 RTP/AVP 0
information := omit,
connections := omit,
bandwidth := omit,
key := omit,
}}
}
template SDP_Message m_SDP_attribute(SDP_media_desc p_media, in SipUserProfile p_userprofile, SDP_attribute loc_attribute)
modifies m_SDP
:= {
attributes := {loc_attribute}
};
template SDP_Message mw_SDP := {
protocol_version := 0, //* v=0
origin := ?,
session_name := ?,
information := omit,
uri := omit,
emails := omit,
phone_numbers := omit,
connection := ?,
bandwidth := omit,
times := { { time_field := { "0", "0" }, time_repeat:=omit
}
}, //* t=0 0
timezone_adjustments := omit,
key := omit,
attributes := omit,
media_list := ?
};
}//* end group base_templates
group modified_templates{
template SDP_Message m_SDP_bandwidth(SDP_media_desc p_media, in SipUserProfile p_userprofile)
modifies m_SDP
:= {
bandwidth := {{PX_SIP_SDP_b_modifier, PX_SIP_SDP_b_bandwidth}}
};
template SDP_Message m_SDP_unacceptable(SDP_media_desc p_media, in SipUserProfile p_userprofile)
modifies m_SDP
:= {
protocol_version := 1, //* v=1 unacceptable version of SDP
bandwidth := {{PX_SIP_SDP_b_modifier, PX_SIP_SDP_b_bandwidth}}
};
template SDP_Message m_SDP_encrypted(SDP_media_desc p_media, in SipUserProfile p_userprofile)
modifies m_SDP
:= {
protocol_version := 1, //* v=1 unacceptable version of SDP
bandwidth := {{PX_SIP_SDP_b_modifier, PX_SIP_SDP_b_bandwidth}}
};
}//* end group modified_templates
} //* end group SDP_Messages
group SDP_Fields {
template SDP_media_desc m_media(template SDP_media_field p_mf) := {
media_field := p_mf,
information := omit,
connections := omit,
bandwidth := omit,
key := omit,
attributes := omit
};
//TODO - delete old
// template SDP_media_desc m_mediaFieldBandwdthAttributes(template SDP_media_field p_mf, template SDP_bandwidth p_bw, template SDP_attribute_list p_attributes) := {
// media_field := p_mf,
// information := omit,
// connections := omit,
// bandwidth := {p_bw},
// key := omit,
// attributes := p_attributes
// };
template SDP_media_desc m_mediaFieldBandwdthAttributes(template SDP_media_field p_mf, template SDP_bandwidth_list p_bw_l, template SDP_attribute_list p_attributes) := {
media_field := p_mf,
information := omit,
connections := omit,
bandwidth := p_bw_l,
key := omit,
attributes := p_attributes
};
template SDP_media_desc m_media_dynPT(charstring p_PT, charstring p_encod) := {
media_field := {
media := c_audio,//* "audio",
ports := { port_number := 8500, num_of_ports:=omit },
transport := c_rtpAvp,//* "RTP/AVP",
}, //* m=audio 8500 RTP/AVP 8
information := omit,
connections := omit,
bandwidth := omit,
key := omit,
attributes := { { rtpmap := { attr_value := p_PT & " " & p_encod }
}
} //* a=rtpmap:8 PCMA/8000
};
template SDP_media_desc m_media_unsupported := {
media_field := {
media := "video",
ports := { port_number := 11500, num_of_ports:=omit },
transport := "RTP/AVP",
fmts := { "99" }
}, //* m=audio 8500 RTP/AVP 0
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
information := omit,
connections := omit,
bandwidth := omit,
key := omit,
attributes := { {
rtpmap := { attr_value := "99 X-Experimental/180000"}
}}
};
template SDP_bandwidth m_bandwidth(template charstring loc_m, template integer loc_b) := {
modifier:=loc_m,
bandwidth:=loc_b
};
template SDP_bandwidth m_bandwidth_as_64:=
{
modifier:="AS",
bandwidth:=64
}
template SDP_bandwidth mw_bandwidth_rs:=
{
modifier:="RS",
bandwidth:=?
}
template SDP_bandwidth mw_bandwidth_rr:=
{
modifier:="RR",
bandwidth:=?
}
template SDP_media_field m_media_field(charstring p_media, integer p_portNum, charstring p_transport, charstring p_fmts) :=
{
media := p_media,
ports := { port_number := p_portNum, num_of_ports:=omit },
transport := p_transport,
fmts := { p_fmts }
}
template SDP_media_field mw_media_PCMU :=
{
media := c_audio,
ports := { port_number := ?, num_of_ports:=* },
transport := c_rtpAvp,
fmts := { "0" }
}
template SDP_media_field mw_media_PCMA :=
{
media := c_audio,
ports := { port_number := 8500, num_of_ports:=omit },
transport := c_rtpAvp,
fmts := { "8" }
}
template SDP_media_field mw_media_PCMA_U_DPT :=
{
media := c_audio,
ports := { port_number := ?, num_of_ports:=* },
transport := c_rtpAvp,
fmts := { * }
}
template SDP_media_field mw_media_T38 :=
{
media := c_image,
ports := { port_number := ?, num_of_ports:=* },
transport := pattern "*ptl", //* udptl,tcptl
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
fmts := { "t38" }
}
template SDP_media_field mw_media_G722 :=
{
media := c_audio,
ports := { port_number := ?, num_of_ports:=* },
transport := "RTP/AVP",
fmts := { "9" }
}
template SDP_media_field mw_media_AMR_DPT :=
{
media := c_audio,
ports := { port_number := ?, num_of_ports:=* },
transport := c_rtpAvp,
fmts := { * }
}
template SDP_attribute m_attribute_sendonly := {sendonly:={}};
template SDP_attribute mw_attribute_sendonly := {sendonly:={}};//MRO
template SDP_attribute m_attribute_recvonly := {recvonly:={}};
template SDP_attribute mw_attribute_recvonly := {recvonly:={}};//MRO
template SDP_attribute m_attribute_sendrecv := {sendrecv:={}};
template SDP_attribute mw_attribute_sendrecv := {sendrecv:={}};//MRO
template SDP_attribute m_attribute_inactive := {inactive:={}};
template SDP_attribute mw_attribute_inactive := {inactive:={}};//MRO
template SDP_attribute mw_attribute_sendonly_inactive := (mw_attribute_sendonly,mw_attribute_inactive);
template SDP_attribute mw_attribute_sendrecv_recvonly_omit := (mw_attribute_sendrecv,mw_attribute_recvonly,omit);
template SDP_attribute m_attribute_AMR_DPT := { rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " AMR" }};
template SDP_attribute m_attribute_CLEARMODE_DPT := {rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " CLEARMODE/8000" }};
template SDP_attribute m_attribute_G722 := { rtpmap := { attr_value := "9 G722/8000" }};
template SDP_attribute m_attribute_PCMU := { rtpmap := { attr_value := "0 PCMU/8000" }};
template SDP_attribute m_attribute_PCMU_DPT := { rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " PCMU/8000" }};
template SDP_attribute m_attribute_PCMA := { rtpmap := { attr_value := "8 PCMA/8000" }};
template SDP_attribute m_attribute_PCMA_DPT := { rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " PCMA/8000" }};
template SDP_attribute m_attribute_T38 := { unknown := { name:=?, attr_value := pattern "*t38*" }};
template SDP_attribute m_attribute_curr (charstring p_preconditionType, charstring p_statusType, charstring p_direction):=
{
curr:={preconditionType := p_preconditionType,
statusType := p_statusType,
direction := p_direction}
};
template SDP_attribute mw_attribute_curr :=
{
curr := ?
};
template SDP_attribute m_attribute_des (charstring p_preconditionType, charstring p_strength, charstring p_statusType, charstring p_direction):=
{
des:={preconditionType := p_preconditionType,
strength := p_strength,
statusType := p_statusType,
direction := p_direction}
};
template SDP_attribute mw_attribute_des :=
{
des := ?
};
template SDP_attribute m_attribute_conf (charstring p_preconditionType, charstring p_statusType, charstring p_direction):=
{
conf:={preconditionType := p_preconditionType,
statusType := p_statusType,
direction := p_direction}
} //* end group SDP_Fields
} //* end group SDP_Templates
group SimpleMsgSummary_Templates {
template SimpleMsgSummary m_SMS(template Msg_summary_line_list p_summaryLineList, template charstring p_uri) :=
{
msg_status_line := m_msgStatusLine_yes,
msg_account := m_msgAccount(p_uri),
msg_summary_line_list :=p_summaryLineList,
opt_msg_headers := omit
}
template SimpleMsgSummary mw_SMS :=
{
msg_status_line := ?,
msg_account := *,
msg_summary_line_list := *,
opt_msg_headers := *
}
template SimpleMsgSummary mw_SMS_yes :=
{
msg_status_line := mw_msgStatusLine_yes,
msg_account := *,
msg_summary_line_list := *,
opt_msg_headers := *
}
template SimpleMsgSummary mw_SMS_yesUri :=
{
msg_status_line := mw_msgStatusLine_yes,
msg_account := mw_msgAccount,
msg_summary_line_list := *,
opt_msg_headers := *
}
template SimpleMsgSummary mw_SMS_yesVoice :=
{
msg_status_line := mw_msgStatusLine_yes,
msg_account := *,
msg_summary_line_list := {mw_msgSummaryLine(c_voiceMessage)},
opt_msg_headers := *
}
template SimpleMsgSummary mw_SMS_yesUriVoice :=
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
{
msg_status_line := mw_msgStatusLine_yes,
msg_account := mw_msgAccount,
msg_summary_line_list := {mw_msgSummaryLine(c_voiceMessage)},
opt_msg_headers := *
}
template Msg_status_line m_msgStatusLine_yes:=
{
msg_type := c_messageWaiting,
msg_status := "yes"
}
template Msg_status_line mw_msgStatusLine_yes:=
{
msg_type := c_messageWaiting,
msg_status := "yes"
}
template Msg_account m_msgAccount(template charstring p_uri) :=
{
msg_type_account := c_messageAccount,
account_URI := p_uri//m_SipUrl_NumberHostParam(PX_IMS_SUT_UE2_PUBLIC_USER,PX_IMS_SUT_UE2_HOME_DOMAIN,omit)
}
template Msg_account mw_msgAccount :=
{
msg_type_account := c_messageAccount,
account_URI := ?
}
template Msg_summary_line m_msgSummaryLine(template charstring p_msgContexClass,template charstring p_msgs,template charstring p_urgent_msgs) :=
{
msg_context_class := p_msgContexClass,
msgs := p_msgs,
urgent_msgs := p_urgent_msgs
}
template Msg_summary_line mw_msgSummaryLine(template charstring p_msgContexClass) :=
{
msg_context_class := p_msgContexClass,
msgs := ?,
urgent_msgs :=*
}
} //end group Templates_SMS
group MessageBodies {
template MessageBody m_MBody_SDP(template SDP_Message p_SDP):=
{
sdpMessageBody := p_SDP
};
template MessageBody m_MBody_XML(template XmlBody p_xmlBody):=
{
xmlBody := p_xmlBody
};
template MessageBody m_mBody_SMS(template SimpleMsgSummary p_SMS):=
simpleMsgSummary := p_SMS
};
template MessageBody m_MBody_longPlainText:=
{
textplain := c_longMessageContent_1300Bytes
};
template MessageBody m_mBody_plainText(charstring p_plaitext):=
{
textplain := p_plaitext
};
template MessageBody m_MBody_sipfrag(charstring p_sipfrag) := {
sipfrag := p_sipfrag
}
template MessageBody m_MBody_MIMESdpXml(template SDP_Message p_sdp, template XmlBody p_xmlBody):=
{
mimeMessageBody := {boundary:="--boundary1", //"PX_SIP_MIME_Boundary",
mimeEncapsulatedList:= {
{content_type:="application/sdp",//"PX_SIP_SDP_ContentType",
content_disposition:=omit,
mime_encapsulated_part:={sdpMessageBody := p_sdp}},
{content_type:="application/vnd.3gpp.cw+xml",//"PX_SIP_ISUP_ContentType",
content_disposition:=omit,
mime_encapsulated_part:={xmlBody := p_xmlBody}}
}
}
}
template MessageBody mw_MBody_SDP(template SDP_Message p_SDP):=
{
sdpMessageBody := p_SDP
};
template MessageBody mw_MBody_XML(template XmlBody p_xmlBody):=
{
xmlBody := p_xmlBody
};
template MessageBody mw_mBody_SMS(template SimpleMsgSummary p_SMS):=
simpleMsgSummary := p_SMS
template MessageBody mw_MBody_MIMESdpXml(template SDP_Message p_sdp, template XmlBody p_xmlBody):=
{
mimeMessageBody := {boundary:=?,
mimeEncapsulatedList:= {
{content_type:=?,
content_disposition:=*,
mime_encapsulated_part:={sdpMessageBody := p_sdp}},
{content_type:=?,
content_disposition:=*,
mime_encapsulated_part:={xmlBody := p_xmlBody}}
}
}
}
template MessageBody mw_MBody_MIME_Ims3gpp(
template charstring p_disposition,
):= {
mimeMessageBody := {boundary:=?,
mimeEncapsulatedList:= {
*,
{
content_type:= c_ims3gppAplication,
content_disposition:= p_disposition,
mime_encapsulated_part :={
xmlBody := {
ims3gpp := p_ims3gpp
}
}
},
*
}
}
}
template MessageBody mw_MBody_MIME_Ims3gppCW(
template charstring p_disposition,
):= {
mimeMessageBody := {boundary:=?,
mimeEncapsulatedList:= {
*,
{
content_type:= c_ims3gppCwApplication,
content_disposition:= p_disposition,
mime_encapsulated_part :={
xmlBody := {
ims3gpp := p_ims3gpp
}
}
},
*
}
}
}
* @desc group TemplatePreparationFunctions contain functions which are used for templates
*/
group TemplatePreparationFunctions {
group MessageBody_Calculation{
/**
*
* @desc Calculation of Message Body length
* @param p_mb_par contain message body part
* @return message body length
*/
function f_MessageBodyLength(MessageBody p_mb_par) return integer {
var integer v_result:=0;
if (MB_LENGTH_FROM_ENCVAL){ //by default it is set to true
v_result:= lengthof(encvalue(p_mb_par))/8; // length in bypes, let get length of encoded value
}
else{
// assume SDP_Message ONLY in the message body
if (ischosen(p_mb_par.sdpMessageBody))
{