Newer
Older
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
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,
AlertInfo p_alertInfo
) modifies m_Response_Base:= {
msgHeader := {
alertInfo := p_alertInfo
}
}
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
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
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:=
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
{
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
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
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
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
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 :=
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
{
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_messageWaiting,
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_messageWaiting,
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
}
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
template MessageBody m_MBody_MIMESdpXml(template SDP_Message p_sdp, template XmlBody p_xmlBody):=
{
mimeMessageBody := {boundary:="PX_SIP_MIME_Boundary",
mimeEncapsulatedList:= {
{content_type:="PX_SIP_SDP_ContentType",
content_disposition:=omit,
mime_encapsulated_part:={sdpMessageBody := p_sdp}},
{content_type:="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 {
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
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))
{
v_result := f_SDPlength(p_mb_par.sdpMessageBody);
};
// assume XML_Body ONLY in the message body
if (ischosen(p_mb_par.xmlBody))
{
v_result := f_XMLBody_Length(p_mb_par.xmlBody, USE_FX_FOR_XML_LENGTH );
};
// assume MIME_Message in the message body
if (ischosen(p_mb_par.mimeMessageBody))
{
v_result := f_MIMElength(p_mb_par.mimeMessageBody);
};
//assume sipfrag in the message body
if (ischosen(p_mb_par.sipfrag))
{
v_result := f_TextPlainLength(p_mb_par); //same function due to same type with textplain
};
//assume textplain in the message body
if (ischosen(p_mb_par.textplain))
{
v_result := f_TextPlainLength(p_mb_par);
};
}
return v_result
}
group SDP_Len_calculation {
*
* @desc Calculation of SDP length
* @param p_mb contain sdp message
* @return sdp_lenght
*/
function f_SDPlength(SDP_Message p_mb) return integer
{
var integer v_result:=2; //* due to empty line beginning of message body
var charstring v_auxstring;
v_result := 2+c_CRlen + lengthof(int2str(p_mb.protocol_version)); //* "v="