1 | /*
|
---|
2 | * @author STF 346, STF366, STF368, STF369
|
---|
3 | * @version $Id: LibSip_Templates.ttcn 380 2009-07-23 14:59:16Z rennoch $
|
---|
4 | * @desc This module defines SIP Templates for message, header, and
|
---|
5 | * structured types. <br>
|
---|
6 | * Note that any changes made to the definitions in this module
|
---|
7 | * may be overwritten by future releases of this library
|
---|
8 | * End users are encouraged to contact the distributers of this
|
---|
9 | * module regarding their modifications or additions
|
---|
10 | * @remark Any additions to the templates shall follow the design rules
|
---|
11 | * and always modify base templates only;
|
---|
12 | * Existing templates shall not be changed or removed -
|
---|
13 | * change requests shall be made to http://t-ort.etsi.org
|
---|
14 | */
|
---|
15 |
|
---|
16 | module LibSip_Templates
|
---|
17 | {
|
---|
18 | //LibSip
|
---|
19 | import from LibSip_SIPTypesAndValues all;
|
---|
20 | import from LibSip_SDPTypes all;
|
---|
21 | import from LibSip_Interface all;
|
---|
22 | import from LibSip_PIXITS all;
|
---|
23 | import from LibSip_XMLTypes all;
|
---|
24 |
|
---|
25 | group ModuleParameters {
|
---|
26 |
|
---|
27 | modulepar boolean MB_LENGTH_FROM_ENCVAL:=true; //* to get length of message body from ecoded value
|
---|
28 | modulepar boolean USE_FX_FOR_XML_LENGTH:=true; //* To use external functions for calculation of XML message/body length
|
---|
29 |
|
---|
30 | }//* group ModuleParameters
|
---|
31 |
|
---|
32 | group SubFields
|
---|
33 | {
|
---|
34 |
|
---|
35 | template Addr_Union m_AddrUnion_NameAddr(template NameAddr p_nameAddr) :=
|
---|
36 | {
|
---|
37 | nameAddr := p_nameAddr
|
---|
38 | }
|
---|
39 |
|
---|
40 | template Addr_Union m_AddrUnion_DisplayAndSipUrl(template charstring p_displayName, template SipUrl p_addrSpec) :=
|
---|
41 | {
|
---|
42 | nameAddr := m_CallingAddr(p_displayName, p_addrSpec)
|
---|
43 | }
|
---|
44 |
|
---|
45 | template NameAddr m_CallingAddr(template charstring p_displayName, template SipUrl p_addrSpec) :=
|
---|
46 | {
|
---|
47 | displayName := p_displayName,
|
---|
48 | addrSpec := p_addrSpec
|
---|
49 | }
|
---|
50 |
|
---|
51 | template CommaParam_List mw_digestResponse(in GenericParam p_genericParam) :=
|
---|
52 | {
|
---|
53 | *,p_genericParam,* //* c_Integrity_protected_yes
|
---|
54 | }
|
---|
55 |
|
---|
56 | template SemicolonParam_List m_cpc :=
|
---|
57 | {{"cpc",PX_SIP_ISUP_CPC_VALUE}};
|
---|
58 |
|
---|
59 | template SemicolonParam_List m_ReasonParams
|
---|
60 | (template charstring p_cause, template charstring p_text) :=
|
---|
61 | {m_Cause(p_cause),m_Text(p_text)};
|
---|
62 |
|
---|
63 | template ReasonValue m_ReasonValue
|
---|
64 | (template charstring p_cause, template charstring p_text) :=
|
---|
65 | {
|
---|
66 | token := "Q.850",
|
---|
67 | reasonParams := m_ReasonParams(p_cause,p_text)
|
---|
68 | };
|
---|
69 |
|
---|
70 | template RouteBody mw_routeBody (template SipUrl p_sipurl):=
|
---|
71 | {
|
---|
72 | nameAddr :=
|
---|
73 | {
|
---|
74 | displayName := *,
|
---|
75 | addrSpec := p_sipurl
|
---|
76 | },
|
---|
77 | rrParam := *
|
---|
78 | }
|
---|
79 |
|
---|
80 | template SentProtocol m_SentProtocol (charstring p_protocol) :=
|
---|
81 | {protocolName := c_sipName,
|
---|
82 | protocolVersion:= c_sipVersion,
|
---|
83 | transport:= p_protocol};
|
---|
84 |
|
---|
85 | template SipUrl m_SipUrl_currDomain(in SipUserProfile p_userprofile) := //* SIP-URL of the test system on SIP side
|
---|
86 | {
|
---|
87 | scheme := c_sipScheme, //* contains "sip"
|
---|
88 | userInfo := //* optional
|
---|
89 | {
|
---|
90 | userOrTelephoneSubscriber := p_userprofile.publUsername,//* charstring
|
---|
91 | password := omit //* optional charstring
|
---|
92 | },
|
---|
93 | hostPort :=
|
---|
94 | {
|
---|
95 | host := p_userprofile.homeDomain, //* hostname, IPv4 or IPv6 as a charstring
|
---|
96 | portField := omit //* p_userprofile.currPort //* optional integer
|
---|
97 | },
|
---|
98 | urlParameters := omit,
|
---|
99 | headers := omit
|
---|
100 | }
|
---|
101 |
|
---|
102 | template SipUrl m_SipUrl_contactIpaddr(in SipUserProfile p_userprofile) := //* SIP-URL of the test system on SIP side
|
---|
103 | {
|
---|
104 | scheme := c_sipScheme, //* contains "sip"
|
---|
105 | userInfo := //* optional
|
---|
106 | {
|
---|
107 | userOrTelephoneSubscriber := p_userprofile.publUsername,//* charstring
|
---|
108 | password := omit //* optional charstring
|
---|
109 | },
|
---|
110 | hostPort :=
|
---|
111 | {
|
---|
112 | host := p_userprofile.contactIpaddr, //* hostname, IPv4 or IPv6 as a charstring
|
---|
113 | portField := p_userprofile.contactPort //* optional integer
|
---|
114 | },
|
---|
115 | urlParameters := omit,
|
---|
116 | headers := omit
|
---|
117 | }
|
---|
118 |
|
---|
119 | template SipUrl m_SipUrl_contactIpaddrAndCpc(in SipUserProfile p_userprofile) := //* SIP-URL of the test system on SIP side
|
---|
120 | {
|
---|
121 | scheme := c_sipScheme, //* contains "sip"
|
---|
122 | userInfo := //* optional
|
---|
123 | {
|
---|
124 | userOrTelephoneSubscriber := p_userprofile.publUsername & "; cpc=" & PX_SIP_ISUP_CPC_VALUE,//* charstring
|
---|
125 | password := omit //* optional charstring
|
---|
126 | },
|
---|
127 | hostPort :=
|
---|
128 | {
|
---|
129 | host := p_userprofile.contactIpaddr, //* hostname, IPv4 or IPv6 as a charstring
|
---|
130 | portField := p_userprofile.contactPort //* optional integer
|
---|
131 | },
|
---|
132 | urlParameters := omit,
|
---|
133 | headers := omit
|
---|
134 | }
|
---|
135 |
|
---|
136 | template SipUrl m_SipUrl_currIpaddr(in SipUserProfile p_userprofile) := //* SIP-URL of the test system on SIP side
|
---|
137 | {
|
---|
138 | scheme := c_sipScheme, //* contains "sip"
|
---|
139 | userInfo := //* optional
|
---|
140 | {
|
---|
141 | userOrTelephoneSubscriber := p_userprofile.publUsername,//* charstring
|
---|
142 | password := omit //* optional charstring
|
---|
143 | },
|
---|
144 | hostPort :=
|
---|
145 | {
|
---|
146 | host := p_userprofile.currIpaddr, //* hostname, IPv4 or IPv6 as a charstring
|
---|
147 | portField := p_userprofile.currPort //* optional integer
|
---|
148 | },
|
---|
149 | urlParameters := omit,
|
---|
150 | headers := omit
|
---|
151 | }
|
---|
152 |
|
---|
153 | template SipUrl m_SipUrl_Anonymous := //* SIP-URL with a calles party number
|
---|
154 | {
|
---|
155 | scheme := c_sipScheme, //* contains "sip"
|
---|
156 | userInfo := //* optional
|
---|
157 | {
|
---|
158 | userOrTelephoneSubscriber := "Anonymous",//* charstring
|
---|
159 | password := omit //* optional charstring
|
---|
160 | },
|
---|
161 | hostPort :=
|
---|
162 | {
|
---|
163 | host := "Anonymous.invalid", //* hostname, IPv4 or IPv6 as a charstring
|
---|
164 | portField := omit //* optional integer
|
---|
165 | },
|
---|
166 | urlParameters := omit,
|
---|
167 | headers := omit
|
---|
168 | };
|
---|
169 |
|
---|
170 | template SipUrl m_TelUrl_publUser(in SipUserProfile p_userprofile) := //* SIP-URL of the test system on SIP side
|
---|
171 | {
|
---|
172 | scheme := c_telScheme, //* contains "tel"
|
---|
173 | userInfo := //* optional
|
---|
174 | {
|
---|
175 | userOrTelephoneSubscriber := p_userprofile.publUsername,//* charstring
|
---|
176 | password := omit //* optional charstring
|
---|
177 | },
|
---|
178 | hostPort :=
|
---|
179 | {
|
---|
180 | host := omit, //* hostname, IPv4 or IPv6 as a charstring
|
---|
181 | portField := omit //* p_userprofile.currPort //* optional integer
|
---|
182 | },
|
---|
183 | urlParameters := omit,
|
---|
184 | headers := omit
|
---|
185 | }
|
---|
186 |
|
---|
187 |
|
---|
188 | template SipUrl mw_TelSip_unavailableInvalidUri :=
|
---|
189 | {
|
---|
190 | scheme := (c_telScheme,c_sipScheme),
|
---|
191 | userInfo := {userOrTelephoneSubscriber:="unavailable", password:=omit},
|
---|
192 | hostPort := {host:="anonymous.invalid", portField:=c_defaultSipPort},
|
---|
193 | urlParameters := omit,
|
---|
194 | headers := omit
|
---|
195 | };
|
---|
196 |
|
---|
197 |
|
---|
198 | template SipUrl mw_TelSip_unavailableUri (charstring p_host):=
|
---|
199 | {
|
---|
200 | scheme := (c_telScheme,c_sipScheme),
|
---|
201 | userInfo := {userOrTelephoneSubscriber:="unavailable", password:=omit},
|
---|
202 | hostPort := {host:=p_host, portField:=c_defaultSipPort},
|
---|
203 | urlParameters := omit,
|
---|
204 | headers := omit
|
---|
205 | };
|
---|
206 |
|
---|
207 | template SipUrl mw_SipUrl_Number(charstring p_number) := //* SIP-URL with a calling party number
|
---|
208 | {
|
---|
209 | scheme := c_sipScheme, //* contains "sip"
|
---|
210 | userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*},
|
---|
211 | hostPort := ?,
|
---|
212 | urlParameters := *,
|
---|
213 | headers := *
|
---|
214 | };
|
---|
215 |
|
---|
216 | template SipUrl mw_TelSipUrl_Number(template charstring p_number) := //* SIP-URL with a calling party number
|
---|
217 | {
|
---|
218 | scheme := (c_telScheme,c_sipScheme), //* contains "sip" or "tel"
|
---|
219 | userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*}, //* nat or int format
|
---|
220 | hostPort := ?,
|
---|
221 | urlParameters := *,
|
---|
222 | headers := *
|
---|
223 | };
|
---|
224 |
|
---|
225 | template SipUrl mw_SipUrl_Host(charstring p_host) := //* SIP-URL with a calling party number
|
---|
226 | {
|
---|
227 | scheme := c_sipScheme, //* contains "sip"
|
---|
228 | userInfo:= {userOrTelephoneSubscriber:=?, password:=*},
|
---|
229 | hostPort := {host:=p_host, portField:=*},
|
---|
230 | urlParameters := *,
|
---|
231 | headers := *
|
---|
232 | };
|
---|
233 |
|
---|
234 |
|
---|
235 | template SipUrl mw_SipUrl_NumberHost(charstring p_number, charstring p_host) := //* SIP-URL with a calling party number
|
---|
236 | {
|
---|
237 | scheme := c_sipScheme, //* contains "sip"
|
---|
238 | userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*},
|
---|
239 | hostPort := {host:=p_host, portField:=*},
|
---|
240 | urlParameters := *,
|
---|
241 | headers := *
|
---|
242 | };
|
---|
243 |
|
---|
244 | template SipUrl mw_SipUrl_NumberHostParam(charstring p_number, charstring p_host, template SemicolonParam_List p_urlParameters) := //* SIP-URL with a calling party number
|
---|
245 | {
|
---|
246 | scheme := c_sipScheme, //* contains "sip"
|
---|
247 | userInfo:= {userOrTelephoneSubscriber:=p_number, password:=*},
|
---|
248 | hostPort := {host:=p_host, portField:=*},
|
---|
249 | urlParameters := p_urlParameters,
|
---|
250 | headers := *
|
---|
251 | };
|
---|
252 |
|
---|
253 | template SipUrl m_SipUrl_NumberHostParam(charstring p_number, charstring p_host, template SemicolonParam_List p_urlParameters) := //* SIP-URL with a calling party number
|
---|
254 | {
|
---|
255 | scheme := c_sipScheme, //* contains "sip"
|
---|
256 | userInfo:= {userOrTelephoneSubscriber:=p_number, password:=omit},
|
---|
257 | hostPort := {host:=p_host, portField:=c_defaultSipPort},
|
---|
258 | urlParameters := p_urlParameters,
|
---|
259 | headers := omit
|
---|
260 | };
|
---|
261 |
|
---|
262 | template SipUrl mw_SipUrl_Anonymous := //* SIP-URL with a calles party number
|
---|
263 | {
|
---|
264 | scheme := c_sipScheme, //* contains "sip"
|
---|
265 | userInfo := //* optional
|
---|
266 | {
|
---|
267 | userOrTelephoneSubscriber := "Anonymous",//* charstring
|
---|
268 | password := omit //* optional charstring
|
---|
269 | },
|
---|
270 | hostPort :=
|
---|
271 | {
|
---|
272 | host := "anonymous.invalid", //* hostname, IPv4 or IPv6 as a charstring
|
---|
273 | portField := * //* optional integer
|
---|
274 | },
|
---|
275 | urlParameters := *,
|
---|
276 | headers := *
|
---|
277 | };
|
---|
278 |
|
---|
279 | template SipUrl mw_SipUrl_urlParam(template SemicolonParam_List p_urlParameters) := //* SIP-URL with a calling party number
|
---|
280 | {
|
---|
281 | scheme := c_sipScheme, //* contains "sip"
|
---|
282 | userInfo:= *,
|
---|
283 | hostPort := *,
|
---|
284 | urlParameters := p_urlParameters,
|
---|
285 | headers := *
|
---|
286 | };
|
---|
287 |
|
---|
288 | template ContactAddress mw_ContactAddress :=
|
---|
289 | {
|
---|
290 | addressField := ?,
|
---|
291 | contactParams := *
|
---|
292 | };
|
---|
293 |
|
---|
294 | template HostPort mw_hostPort(template charstring p_host, template integer p_portField) :=
|
---|
295 | {
|
---|
296 | host := p_host,
|
---|
297 | portField := p_portField
|
---|
298 | };
|
---|
299 |
|
---|
300 | template StatusLine mw_statusLine1xx := {sipVersion := c_sipNameVersion, statusCode := (100..199), reasonPhrase := ?};
|
---|
301 | template StatusLine mw_statusLine4xx := {sipVersion := c_sipNameVersion, statusCode := (400..499), reasonPhrase := ?};
|
---|
302 | template StatusLine mw_statusLineFinal := {sipVersion := c_sipNameVersion, statusCode := (200..699), reasonPhrase := ?};
|
---|
303 |
|
---|
304 | template NameAddr mw_NameAddr_DispName_User_Host(template charstring p_dn, template charstring p_user, template charstring p_host) :=
|
---|
305 | {
|
---|
306 | displayName := p_dn,
|
---|
307 | addrSpec :=
|
---|
308 | {
|
---|
309 | scheme := c_sipScheme, //* contains "sip"
|
---|
310 | userInfo := {userOrTelephoneSubscriber :=p_user, password := *},
|
---|
311 | hostPort :=
|
---|
312 | {
|
---|
313 | host := p_host, //* hostname, IPv4 or IPv6 as a charstring
|
---|
314 | portField := * //* optional integer
|
---|
315 | },
|
---|
316 | urlParameters := {m_UserPhone},
|
---|
317 | headers := *
|
---|
318 | }
|
---|
319 | }
|
---|
320 |
|
---|
321 | template Addr_Union mw_AddrUnion_Nameaddr(template charstring p_dn, template charstring p_user, template charstring p_host):=
|
---|
322 | {
|
---|
323 | nameAddr:=mw_NameAddr_DispName_User_Host(p_dn,p_user,p_host)
|
---|
324 | }
|
---|
325 |
|
---|
326 | template SipUrl mw_SipUrl_User_Host(template charstring p_user, template charstring p_host) :=
|
---|
327 | {
|
---|
328 | scheme := c_sipScheme, //* contains "sip"
|
---|
329 | userInfo := {userOrTelephoneSubscriber :=p_user, password := *},
|
---|
330 | hostPort :=
|
---|
331 | {
|
---|
332 | host := p_host, //* hostname, IPv4 or IPv6 as a charstring
|
---|
333 | portField := * //* optional integer
|
---|
334 | },
|
---|
335 | urlParameters := {m_UserPhone},
|
---|
336 | headers := *
|
---|
337 | }
|
---|
338 | template Addr_Union mw_AddrUnion_SipUrl(template charstring p_user, template charstring p_host):=
|
---|
339 | {
|
---|
340 | addrSpecUnion:=mw_SipUrl_User_Host(p_user,p_host)
|
---|
341 | }
|
---|
342 |
|
---|
343 |
|
---|
344 | } //* end group Subfields
|
---|
345 |
|
---|
346 |
|
---|
347 |
|
---|
348 |
|
---|
349 |
|
---|
350 | group HeaderFieldTemplates {
|
---|
351 | template Allow m_Allow (template Method_List p_methods) := {
|
---|
352 | fieldName := ALLOW_E,
|
---|
353 | methods := p_methods
|
---|
354 | }
|
---|
355 |
|
---|
356 | template Allow mw_Allow (charstring p_method) := {
|
---|
357 | fieldName := ALLOW_E,
|
---|
358 | methods := superset(p_method)
|
---|
359 | }
|
---|
360 |
|
---|
361 | template GenericParam m_Cause (template charstring p_cause):=
|
---|
362 | {id:="cause", paramValue:=p_cause}
|
---|
363 |
|
---|
364 | template Authorization m_Authorization (template Credentials p_Credentials):=
|
---|
365 | {
|
---|
366 | fieldName := AUTHORIZATION_E,
|
---|
367 | body := {p_Credentials}
|
---|
368 | }
|
---|
369 |
|
---|
370 | template Authorization m_Authorization_digest (template CommaParam_List p_CommaParam_List):=
|
---|
371 | {
|
---|
372 | fieldName := AUTHORIZATION_E,
|
---|
373 | body := {{digestResponse := p_CommaParam_List}}
|
---|
374 | }
|
---|
375 |
|
---|
376 | template Authorization m_add_Authorization_digest (in Authorization p_auth, template CommaParam_List p_CommaParam_List):=
|
---|
377 | {
|
---|
378 | fieldName := AUTHORIZATION_E,
|
---|
379 | body := {{digestResponse := f_merge_CommaParam_List(p_auth.body[0].digestResponse,valueof(p_CommaParam_List))}}
|
---|
380 | }
|
---|
381 |
|
---|
382 | template Authorization m_Authorization_other :=
|
---|
383 | {
|
---|
384 | fieldName := AUTHORIZATION_E,
|
---|
385 | body := {{otherResponse := ?}}
|
---|
386 | }
|
---|
387 |
|
---|
388 | template Contact m_Contact(template SipUrl p_sipUrl) :=
|
---|
389 | {
|
---|
390 | fieldName := CONTACT_E,
|
---|
391 | contactBody :=
|
---|
392 | {
|
---|
393 | contactAddresses :=
|
---|
394 | {
|
---|
395 | {
|
---|
396 | addressField := { addrSpecUnion := p_sipUrl},
|
---|
397 | contactParams := omit
|
---|
398 | }
|
---|
399 | }
|
---|
400 | } //* end contactBody
|
---|
401 | }//* end m_Contact
|
---|
402 |
|
---|
403 | template Contact m_Contact_profile(in SipUserProfile p_userprofile) :=
|
---|
404 | {
|
---|
405 | fieldName := CONTACT_E,
|
---|
406 | contactBody :=
|
---|
407 | {
|
---|
408 | contactAddresses :=
|
---|
409 | {
|
---|
410 | {
|
---|
411 | addressField := { addrSpecUnion := m_SipUrl_contactIpaddr(p_userprofile)},
|
---|
412 | contactParams := omit
|
---|
413 | }
|
---|
414 | }
|
---|
415 | } //* end contactBody
|
---|
416 | }//* end m_Contact
|
---|
417 |
|
---|
418 |
|
---|
419 | template Contact m_Contact_profile_expires(in SipUserProfile p_userprofile, in charstring p_expires) :=
|
---|
420 | {
|
---|
421 | fieldName := CONTACT_E,
|
---|
422 | contactBody :=
|
---|
423 | {
|
---|
424 | contactAddresses :=
|
---|
425 | {
|
---|
426 | {
|
---|
427 | addressField := { addrSpecUnion := m_SipUrl_contactIpaddr(p_userprofile)},
|
---|
428 | contactParams := {{"expires",p_expires}}
|
---|
429 | }
|
---|
430 | }
|
---|
431 | } //* end contactBody
|
---|
432 | }//* end m_Contact
|
---|
433 |
|
---|
434 | template From m_From(template NameAddr p_nameAddr, charstring p_tag_str) :=
|
---|
435 | {
|
---|
436 | fieldName := FROM_E,
|
---|
437 | addressField :=
|
---|
438 | {nameAddr := p_nameAddr},//* end addressField
|
---|
439 | fromParams := {{id := c_tagId, paramValue := p_tag_str}}
|
---|
440 | };
|
---|
441 |
|
---|
442 | template From m_From_Anonymous(charstring p_tag_str) :=
|
---|
443 | {
|
---|
444 | fieldName := FROM_E,
|
---|
445 | addressField :=
|
---|
446 | {nameAddr := {
|
---|
447 | displayName := "Anonymous", //* optional charstring
|
---|
448 | addrSpec := m_SipUrl_Anonymous //* SipUrl
|
---|
449 | }},//* end addressField
|
---|
450 | fromParams := {{id := c_tagId, paramValue := p_tag_str}}
|
---|
451 | };
|
---|
452 |
|
---|
453 | template From m_From_SipUrl(template SipUrl p_sipUrl) :=
|
---|
454 | {
|
---|
455 | fieldName := FROM_E,
|
---|
456 | addressField :=
|
---|
457 | {nameAddr := {
|
---|
458 | displayName := omit, //* optional charstring
|
---|
459 | addrSpec := p_sipUrl //* SipUrl
|
---|
460 | }},//* end addressField
|
---|
461 | fromParams := omit
|
---|
462 | };
|
---|
463 |
|
---|
464 | template Event m_Event_refer :=
|
---|
465 | {
|
---|
466 | fieldName := EVENT_E,
|
---|
467 | eventType := "refer",
|
---|
468 | eventParams := omit
|
---|
469 | };
|
---|
470 |
|
---|
471 | template Event m_Event_conference :=
|
---|
472 | {
|
---|
473 | fieldName := EVENT_E,
|
---|
474 | eventType := "conference",
|
---|
475 | eventParams := omit
|
---|
476 | };
|
---|
477 |
|
---|
478 | template Event m_Event_presence :=
|
---|
479 | {
|
---|
480 | fieldName := EVENT_E,
|
---|
481 | eventType := "presence",
|
---|
482 | eventParams := omit
|
---|
483 | };
|
---|
484 |
|
---|
485 | template Event m_Event_reg :=
|
---|
486 | {
|
---|
487 | fieldName := EVENT_E,
|
---|
488 | eventType := "reg",
|
---|
489 | eventParams := omit
|
---|
490 | };
|
---|
491 |
|
---|
492 | template Expires m_Expires_600000 :=
|
---|
493 | {
|
---|
494 | fieldName := EXPIRES_E,
|
---|
495 | deltaSec := "600000"
|
---|
496 | };
|
---|
497 |
|
---|
498 | template Expires m_Expires (charstring p_deltaSec):=
|
---|
499 | {
|
---|
500 | fieldName := EXPIRES_E,
|
---|
501 | deltaSec := p_deltaSec
|
---|
502 | };
|
---|
503 |
|
---|
504 |
|
---|
505 | template PAssertedID m_PAssertedID(template Addr_Union p_pAssertedIDValue) :=
|
---|
506 | {
|
---|
507 | fieldName := P_ASSERTED_ID_E,
|
---|
508 | pAssertedIDValueList := {p_pAssertedIDValue}
|
---|
509 | };
|
---|
510 |
|
---|
511 | template HistoryInfo mw_HistoryInfo(template HistoryInfo_List p_HistoryInfo_List) :=
|
---|
512 | {
|
---|
513 | fieldName := HISTORY_INFO_E,
|
---|
514 | historyInfoList := p_HistoryInfo_List
|
---|
515 | };
|
---|
516 |
|
---|
517 | template HistoryInfoEntry mw_HistoryInfoEntry(template SipUrl p_Url, template IntegerList p_index, template SemicolonParam_List p_paramlist) :=
|
---|
518 | {
|
---|
519 | nameAddr := {displayName:=*, addrSpec:= p_Url},
|
---|
520 | hiIndex := p_index,
|
---|
521 | hiExtention := p_paramlist
|
---|
522 | }
|
---|
523 |
|
---|
524 | template HistoryInfo m_HistoryInfo(template HistoryInfo_List p_HistoryInfo_List) :=
|
---|
525 | {
|
---|
526 | fieldName := HISTORY_INFO_E,
|
---|
527 | historyInfoList := p_HistoryInfo_List
|
---|
528 | };
|
---|
529 |
|
---|
530 | template HistoryInfoEntry m_HistoryInfoEntry(template SipUrl p_Url, template IntegerList p_index, template SemicolonParam_List p_paramlist) :=
|
---|
531 | {
|
---|
532 | nameAddr := {displayName:=omit, addrSpec:= p_Url},
|
---|
533 | hiIndex := p_index,
|
---|
534 | hiExtention := p_paramlist
|
---|
535 | }
|
---|
536 |
|
---|
537 | template PAssertedID m_PAssertedID_2x(template Addr_Union p_pAssertedIDValue1, template Addr_Union p_pAssertedIDValue2) :=
|
---|
538 | {
|
---|
539 | fieldName := P_ASSERTED_ID_E,
|
---|
540 | pAssertedIDValueList := {p_pAssertedIDValue1, p_pAssertedIDValue2}
|
---|
541 | };
|
---|
542 |
|
---|
543 | template PAssertedID mw_PAssertedID(template PAssertedIDValue p_pAssertedIDValue) :=
|
---|
544 | {
|
---|
545 | fieldName := P_ASSERTED_ID_E,
|
---|
546 | pAssertedIDValueList := {p_pAssertedIDValue}
|
---|
547 | };
|
---|
548 |
|
---|
549 | template PAssertedIDValue mw_PAssertedIDValue(template SipUrl p_SipUrl) :=
|
---|
550 | {
|
---|
551 | addrSpecUnion := p_SipUrl
|
---|
552 | };
|
---|
553 |
|
---|
554 | template PPreferredID m_PPreferredID(template Addr_Union p_pPreferredIDValue) :=
|
---|
555 | {
|
---|
556 | fieldName := P_PREFERRED_ID_E,
|
---|
557 | pPreferredIDValueList := {p_pPreferredIDValue}
|
---|
558 | };
|
---|
559 |
|
---|
560 | template Privacy m_Privacy(PrivacyValue p_privacy) :=
|
---|
561 | {
|
---|
562 | fieldName := PRIVACY_E,
|
---|
563 | privValueList := {p_privacy}
|
---|
564 | };
|
---|
565 |
|
---|
566 | template RAck m_RAck(integer p_responseNum, integer p_seqNumber, charstring p_method) :=
|
---|
567 | {
|
---|
568 | fieldName := RACK_E,
|
---|
569 | responseNum := p_responseNum,
|
---|
570 | seqNumber := p_seqNumber,
|
---|
571 | method := p_method
|
---|
572 | };
|
---|
573 |
|
---|
574 | template Reason m_Reason(integer p_cause) :=
|
---|
575 | {
|
---|
576 | fieldName := REASON_E,
|
---|
577 | reasonValues := {m_ReasonValue(int2str(p_cause),"dummy")}
|
---|
578 | };
|
---|
579 |
|
---|
580 | template Reason m_Reason21 :=
|
---|
581 | {
|
---|
582 | fieldName := REASON_E,
|
---|
583 | reasonValues := {m_ReasonValue(int2str(21),"call reject")}
|
---|
584 | };
|
---|
585 |
|
---|
586 | template RecordRoute m_recordRoute_currIpAddr (in SipUserProfile p_userprofile):=
|
---|
587 | {
|
---|
588 | fieldName := RECORD_ROUTE_E,
|
---|
589 | routeBody := {{nameAddr := {displayName := omit,
|
---|
590 | addrSpec := {scheme := c_sipScheme, //* contains "sip"
|
---|
591 | userInfo := omit,
|
---|
592 | hostPort := {host:=p_userprofile.currIpaddr, portField:= p_userprofile.currPort},
|
---|
593 | urlParameters := omit,
|
---|
594 | headers := omit}
|
---|
595 | },
|
---|
596 | rrParam := omit}
|
---|
597 | }};
|
---|
598 |
|
---|
599 | template ReferredBy m_ReferredBy_SipUrl(template SipUrl p_sipUrl) :=
|
---|
600 | {
|
---|
601 | fieldName := REFERRED_BY_E,
|
---|
602 | nameAddr :={displayName := omit, addrSpec:=p_sipUrl},
|
---|
603 | referredbyIdParams := omit
|
---|
604 | }
|
---|
605 |
|
---|
606 | template ReferTo m_ReferTo_SipUrl(template SipUrl p_sipUrl, charstring p_method) :=
|
---|
607 | {
|
---|
608 | fieldName := REFER_TO_E,
|
---|
609 | nameAddr :={displayName := omit, addrSpec:=p_sipUrl},
|
---|
610 | referToParams := {{id:="method",paramValue :=p_method}}
|
---|
611 | }
|
---|
612 |
|
---|
613 | template Replaces m_Replaces(
|
---|
614 | charstring p_callId,
|
---|
615 | charstring p_toTag,
|
---|
616 | charstring p_fromTag
|
---|
617 | ) := {
|
---|
618 | fieldName := REPLACES_E,
|
---|
619 | replacesParams := {
|
---|
620 | {id := p_callId, paramValue := omit},
|
---|
621 | {id := "to-tag", paramValue := p_toTag},
|
---|
622 | {id := "from-tag", paramValue := p_fromTag}
|
---|
623 | }
|
---|
624 | }
|
---|
625 |
|
---|
626 | template Require m_Require_replaces :=
|
---|
627 | {
|
---|
628 | fieldName := REQUIRE_E,
|
---|
629 | optionsTags := {c_replaces}
|
---|
630 | };
|
---|
631 |
|
---|
632 | template Require m_Require_100rel :=
|
---|
633 | {
|
---|
634 | fieldName := REQUIRE_E,
|
---|
635 | optionsTags := {c_tag100rel}
|
---|
636 | };
|
---|
637 |
|
---|
638 | template Require m_Require_prec :=
|
---|
639 | {
|
---|
640 | fieldName := REQUIRE_E,
|
---|
641 | optionsTags := {c_tagPrecond}
|
---|
642 | };
|
---|
643 |
|
---|
644 | template Supported m_Supported_fromChange :=
|
---|
645 | {
|
---|
646 | fieldName:=SUPPORTED_E,
|
---|
647 | optionsTags:={c_tagFromChange}
|
---|
648 | }
|
---|
649 |
|
---|
650 | template Supported m_Supported_prec :=
|
---|
651 | {
|
---|
652 | fieldName:=SUPPORTED_E,
|
---|
653 | optionsTags:={c_tagPrecond}
|
---|
654 | }
|
---|
655 |
|
---|
656 | template Supported m_Supported_100rel :=
|
---|
657 | {
|
---|
658 | fieldName:=SUPPORTED_E,
|
---|
659 | optionsTags:={c_tag100rel}
|
---|
660 | }
|
---|
661 |
|
---|
662 | template Supported m_Supported_100rel_prec :=
|
---|
663 | {
|
---|
664 | fieldName:=SUPPORTED_E,
|
---|
665 | optionsTags:={c_tag100rel, c_tagPrecond}
|
---|
666 | }
|
---|
667 |
|
---|
668 | template GenericParam m_Text (template charstring p_text):=
|
---|
669 | {id:="text", paramValue:=p_text}
|
---|
670 |
|
---|
671 | template GenericParam m_UserPhone :=
|
---|
672 | {
|
---|
673 | id := "user",
|
---|
674 | paramValue := "phone"
|
---|
675 | }
|
---|
676 |
|
---|
677 | template GenericParam m_UserToUserEncodingHex :=
|
---|
678 | {
|
---|
679 | id := "encoding",
|
---|
680 | paramValue := "hex"
|
---|
681 | }
|
---|
682 |
|
---|
683 | template UserToUser m_UserToUserData(template charstring p_U2UData):=
|
---|
684 | {
|
---|
685 | fieldName := USER_TO_USER_E,
|
---|
686 | uuiData := p_U2UData,
|
---|
687 | uuiParam := m_UserToUserEncodingHex
|
---|
688 | }
|
---|
689 |
|
---|
690 | template To m_To(template SipUrl p_sipUrl) :=
|
---|
691 | {
|
---|
692 | fieldName := TO_E,
|
---|
693 | addressField :=
|
---|
694 | {nameAddr := {
|
---|
695 | displayName := "ETSI Tester", //* optional charstring
|
---|
696 | addrSpec := p_sipUrl //* SipUrl
|
---|
697 | }},//* end addressField
|
---|
698 | toParams := omit
|
---|
699 | };
|
---|
700 |
|
---|
701 | template To m_To_SipUrl(SipUrl p_sipUrl) :=
|
---|
702 | {
|
---|
703 | fieldName := TO_E,
|
---|
704 | addressField :=
|
---|
705 | {nameAddr := {
|
---|
706 | displayName := omit, //* optional charstring
|
---|
707 | addrSpec := p_sipUrl //* SipUrl
|
---|
708 | }},//* end addressField
|
---|
709 | toParams := omit
|
---|
710 | };
|
---|
711 |
|
---|
712 | template To mw_To_NameAddr_SipUrl(template charstring p_dn, template charstring p_user, template charstring p_host) :=
|
---|
713 | {
|
---|
714 | fieldName := TO_E,
|
---|
715 | addressField := (mw_AddrUnion_Nameaddr(p_dn,p_user,p_host),mw_AddrUnion_SipUrl(p_user,p_host)),
|
---|
716 | toParams := *
|
---|
717 | }
|
---|
718 |
|
---|
719 | template From mw_From(template SipUrl p_sipUrl) := {
|
---|
720 | fieldName := FROM_E,
|
---|
721 | addressField := { addrSpecUnion := p_sipUrl},
|
---|
722 | fromParams:= *
|
---|
723 | }
|
---|
724 |
|
---|
725 | template From mw_From_NameAddr_SipUrl(template charstring p_dn, template charstring p_user, template charstring p_host) :=
|
---|
726 | {
|
---|
727 | fieldName := FROM_E,
|
---|
728 | addressField := (mw_AddrUnion_Nameaddr(p_dn,p_user,p_host),mw_AddrUnion_SipUrl(p_user,p_host)),
|
---|
729 | fromParams := *
|
---|
730 | }
|
---|
731 | template ViaBody m_ViaBody_currIpaddr(charstring branch_val,in SipUserProfile p_userprofile) :=
|
---|
732 | {
|
---|
733 | sentProtocol := m_SentProtocol(PX_SIP_TRANSPORT),
|
---|
734 | sentBy:={host:=p_userprofile.currIpaddr, portField:= p_userprofile.currPort},
|
---|
735 | viaParams:={{id :=c_branchId,paramValue :=branch_val}}
|
---|
736 | }
|
---|
737 |
|
---|
738 | template ViaBody mw_ViaBody_interface(template HostPort p_hostport) :=
|
---|
739 | {
|
---|
740 | sentProtocol := m_SentProtocol(PX_SIP_TRANSPORT),
|
---|
741 | sentBy:={host:=p_hostport.host, portField:= p_hostport.portField},
|
---|
742 | viaParams:=*
|
---|
743 | }
|
---|
744 |
|
---|
745 | template Via mw_Via(template ViaBody p_viabody) :=
|
---|
746 | {
|
---|
747 | fieldName := VIA_E,
|
---|
748 | viaBody:= ? //* superset(p_viabody)
|
---|
749 | }
|
---|
750 |
|
---|
751 | template CallId mw_CallId_any :=
|
---|
752 | {
|
---|
753 | fieldName := CALL_ID_E,
|
---|
754 | callid := ?
|
---|
755 | }
|
---|
756 |
|
---|
757 | template Privacy mw_Privacy_id :=
|
---|
758 | {
|
---|
759 | fieldName := PRIVACY_E,
|
---|
760 | privValueList := {*,"id",*}
|
---|
761 | };
|
---|
762 |
|
---|
763 |
|
---|
764 | template Privacy mw_Privacy_user :=
|
---|
765 | {
|
---|
766 | fieldName := PRIVACY_E,
|
---|
767 | privValueList := {*,"user",*}
|
---|
768 | };
|
---|
769 |
|
---|
770 | template Reason mw_Reason(integer p_cause) :=
|
---|
771 | {
|
---|
772 | fieldName := REASON_E,
|
---|
773 | reasonValues := {m_ReasonValue(int2str(p_cause),?)}
|
---|
774 | };
|
---|
775 |
|
---|
776 | template Require mw_Require_not_100rel :=
|
---|
777 | {
|
---|
778 | fieldName := REQUIRE_E,
|
---|
779 | optionsTags := superset(complement(c_tag100rel))
|
---|
780 | };
|
---|
781 |
|
---|
782 | template Require mw_require_100rel :=
|
---|
783 | {
|
---|
784 | fieldName := REQUIRE_E,
|
---|
785 | optionsTags := superset(c_tag100rel)
|
---|
786 | };
|
---|
787 |
|
---|
788 | template RecordRoute mw_recordroute (template RouteBody p_routeBody):=
|
---|
789 | {
|
---|
790 | fieldName := RECORD_ROUTE_E,
|
---|
791 | routeBody := ? //* superset(p_routeBody)
|
---|
792 | };
|
---|
793 |
|
---|
794 | template Route mw_route (template RouteBody_List p_routeBody):=
|
---|
795 | {
|
---|
796 | fieldName := ROUTE_E,
|
---|
797 | routeBody := p_routeBody
|
---|
798 | };
|
---|
799 |
|
---|
800 | template Supported mw_Supported_100rel_prec :=
|
---|
801 | {
|
---|
802 | fieldName:=SUPPORTED_E,
|
---|
803 | optionsTags:= superset(c_tag100rel, c_tagPrecond)
|
---|
804 | }
|
---|
805 |
|
---|
806 | template Supported mw_Supported_100rel :=
|
---|
807 | {
|
---|
808 | fieldName:=SUPPORTED_E,
|
---|
809 | optionsTags:= superset(c_tag100rel)
|
---|
810 | }
|
---|
811 |
|
---|
812 | template Supported mw_Supported_fromChange :=
|
---|
813 | {
|
---|
814 | fieldName:=SUPPORTED_E,
|
---|
815 | optionsTags:= superset(c_tagFromChange)
|
---|
816 | }
|
---|
817 |
|
---|
818 | template UserToUser mw_UserToUserData(template charstring p_U2UData):=
|
---|
819 | {
|
---|
820 | fieldName := USER_TO_USER_E,
|
---|
821 | uuiData := p_U2UData,
|
---|
822 | uuiParam := ?
|
---|
823 | }
|
---|
824 |
|
---|
825 | template Contact mw_Contact_conference :=
|
---|
826 | {
|
---|
827 | fieldName := CONTACT_E,
|
---|
828 | contactBody :=
|
---|
829 | {
|
---|
830 | contactAddresses :=
|
---|
831 | {
|
---|
832 | {
|
---|
833 | addressField := ?,//MRO
|
---|
834 | contactParams := {{"isfocus",*}}
|
---|
835 | }
|
---|
836 | }
|
---|
837 | }
|
---|
838 | }
|
---|
839 |
|
---|
840 | template AlertInfo m_AlertInfo(charstring p_urn) := {
|
---|
841 | fieldName := ALERT_INFO_E,
|
---|
842 | alertInfoBody := {{p_urn, omit}}
|
---|
843 | }
|
---|
844 |
|
---|
845 | template AlertInfo mw_AlertInfo(template charstring p_urn) := {
|
---|
846 | fieldName := ALERT_INFO_E,
|
---|
847 | alertInfoBody := superset({p_urn, omit})
|
---|
848 | }
|
---|
849 | } //* end of group HeaderFieldTemplates
|
---|
850 |
|
---|
851 |
|
---|
852 | group MessageTemplates {
|
---|
853 | group dummy_templates {
|
---|
854 | group dummy_parameter_send {
|
---|
855 |
|
---|
856 | template RequestLine m_requestLine_dummy(Method p_method) :=
|
---|
857 | {
|
---|
858 | method := p_method,
|
---|
859 | requestUri := c_empty_RequestUri,
|
---|
860 | sipVersion := c_sipNameVersion
|
---|
861 | }
|
---|
862 |
|
---|
863 | template MessageHeader m_msgHeader_dummy :=
|
---|
864 | {
|
---|
865 | accept := omit,
|
---|
866 | acceptContact := omit,
|
---|
867 | acceptEncoding := omit,
|
---|
868 | acceptLanguage := omit,
|
---|
869 | alertInfo := omit,
|
---|
870 | allow := omit,
|
---|
871 | allowEvents := omit, //* RFC3265
|
---|
872 | authenticationInfo := omit,
|
---|
873 | authorization := omit,
|
---|
874 | callId := c_empty_CallId,
|
---|
875 | callInfo := omit,
|
---|
876 | contact := omit,
|
---|
877 | contentDisposition := omit,
|
---|
878 | contentEncoding := omit,
|
---|
879 | contentLanguage := omit,
|
---|
880 | contentLength := {fieldName := CONTENT_LENGTH_E, len:= 0},
|
---|
881 | contentType := omit, //* if message body present m, else not present
|
---|
882 | cSeq := c_empty_cSeq,
|
---|
883 | date := omit,
|
---|
884 | errorInfo := omit,
|
---|
885 | event := omit, //* RFC3265
|
---|
886 | expires := omit,
|
---|
887 | fromField := c_empty_From,
|
---|
888 | historyInfo := omit, //* RFC4244
|
---|
889 | inReplyTo := omit,
|
---|
890 | maxForwards := c_maxForwards70,
|
---|
891 | mimeVersion := omit,
|
---|
892 | minExpires := omit,
|
---|
893 | minSE := omit, //* RFC4028
|
---|
894 | organization := omit,
|
---|
895 | pAccessNetworkInfo := omit, //* RFC3455
|
---|
896 | pAssertedID := omit,
|
---|
897 | pAssertedService := omit,
|
---|
898 | pAssociatedURI := omit,
|
---|
899 | path := omit, //* RFC3327
|
---|
900 | pCalledPartyID := omit, //* RFC3455
|
---|
901 | pChargingFunctionAddresses := omit, //* RFC3455
|
---|
902 | pChargingVector := omit, //* RFC3455
|
---|
903 | pEarlyMedia := omit, //* RFC5009
|
---|
904 | pMediaAuthorization := omit, //* RFC3313
|
---|
905 | pPreferredID := omit,
|
---|
906 | priority := omit,
|
---|
907 | privacy := omit,
|
---|
908 | proxyAuthenticate := omit,
|
---|
909 | proxyAuthorization := omit,
|
---|
910 | proxyRequire := omit,
|
---|
911 | pVisitedNetworkID := omit, //* RFC3455
|
---|
912 | rAck := omit,
|
---|
913 | rSeq := omit,
|
---|
914 | reason := omit,
|
---|
915 | recordRoute := omit,
|
---|
916 | referredBy := omit, //* RFC3892 - REFER method
|
---|
917 | referTo := omit, //* RFC3515 - REFER method
|
---|
918 | replaces := omit, //* RFC3891
|
---|
919 | replyTo := omit,
|
---|
920 | require := omit,
|
---|
921 | retryAfter := omit,
|
---|
922 | route := omit,
|
---|
923 | securityClient := omit, //* RFC3329
|
---|
924 | securityServer := omit, //* RFC3329
|
---|
925 | securityVerify := omit, //* RFC3329
|
---|
926 | server := omit,
|
---|
927 | serviceRoute := omit, //* RFC3608
|
---|
928 | sessionExpires := omit, //* RFC4028
|
---|
929 | subject := omit,
|
---|
930 | subscriptionState := omit, //* RFC3265
|
---|
931 | supported := omit,
|
---|
932 | timestamp := omit,
|
---|
933 | toField := c_empty_To,
|
---|
934 | unsupported := omit,
|
---|
935 | userToUser := omit,
|
---|
936 | userAgent := omit,
|
---|
937 | via := c_empty_Via,
|
---|
938 | warning := omit,
|
---|
939 | wwwAuthenticate := omit,
|
---|
940 | undefinedHeader_List := omit
|
---|
941 | }
|
---|
942 | } //* group dummy_parameter_send
|
---|
943 |
|
---|
944 | group dummy_parameter_receive {
|
---|
945 |
|
---|
946 | template RequestLine mw_requestLine_dummy(Method p_method) :=
|
---|
947 | {
|
---|
948 | method := p_method,
|
---|
949 | requestUri := ?,
|
---|
950 | sipVersion := c_sipNameVersion
|
---|
951 | }
|
---|
952 |
|
---|
953 | template MessageHeader mw_msgHeader_dummy :=
|
---|
954 | {
|
---|
955 | accept := *,
|
---|
956 | acceptContact := *,
|
---|
957 | acceptEncoding := *,
|
---|
958 | acceptLanguage := *,
|
---|
959 | alertInfo := *,
|
---|
960 | allow := *,
|
---|
961 | allowEvents := *, //* RFC3265
|
---|
962 | authenticationInfo := *,
|
---|
963 | authorization := *,
|
---|
964 | callId := ?,
|
---|
965 | callInfo := *,
|
---|
966 | contact := *,
|
---|
967 | contentDisposition := *,
|
---|
968 | contentEncoding := *,
|
---|
969 | contentLanguage := *,
|
---|
970 | contentLength := ?,
|
---|
971 | contentType := *,
|
---|
972 | cSeq := ?,
|
---|
973 | date := *,
|
---|
974 | errorInfo := *,
|
---|
975 | event := *, //* RFC3265
|
---|
976 | expires := *,
|
---|
977 | fromField := ?,
|
---|
978 | historyInfo := *, //* RFC4244
|
---|
979 | inReplyTo := *,
|
---|
980 | maxForwards := ?,
|
---|
981 | mimeVersion := *,
|
---|
982 | minExpires := *,
|
---|
983 | minSE := *, //* RFC4028
|
---|
984 | organization := *,
|
---|
985 | pAccessNetworkInfo := *, //* RFC3455
|
---|
986 | pAssertedID := *,
|
---|
987 | pAssertedService := *,
|
---|
988 | pAssociatedURI := *,
|
---|
989 | path := *, //* RFC3327
|
---|
990 | pCalledPartyID := *, //* RFC3455
|
---|
991 | pChargingFunctionAddresses := *, //* RFC3455
|
---|
992 | pChargingVector := *, //* RFC3455
|
---|
993 | pEarlyMedia := *, //* RFC5009
|
---|
994 | pMediaAuthorization := *, //* RFC3313
|
---|
995 | pPreferredID := *,
|
---|
996 | priority := *,
|
---|
997 | privacy := *,
|
---|
998 | proxyAuthenticate := *,
|
---|
999 | proxyAuthorization := *,
|
---|
1000 | proxyRequire := *,
|
---|
1001 | pVisitedNetworkID := *, //* RFC3455
|
---|
1002 | rAck := *,
|
---|
1003 | rSeq := *,
|
---|
1004 | reason := *,
|
---|
1005 | recordRoute := *,
|
---|
1006 | referredBy := *, //* RFC3892 - REFER method
|
---|
1007 | referTo := *, //* RFC3515 - REFER method
|
---|
1008 | replaces := *, //* RFC 3891
|
---|
1009 | replyTo := *,
|
---|
1010 | require := *,
|
---|
1011 | retryAfter := *,
|
---|
1012 | route := *,
|
---|
1013 | securityClient := *, //* RFC3329
|
---|
1014 | securityServer := *, //* RFC3329
|
---|
1015 | securityVerify := *, //* RFC3329
|
---|
1016 | server := *,
|
---|
1017 | serviceRoute := *, //* RFC3608
|
---|
1018 | sessionExpires := *, //* RFC4028
|
---|
1019 | subject := *,
|
---|
1020 | subscriptionState := *, //* RFC3265
|
---|
1021 | supported := *,
|
---|
1022 | timestamp := *,
|
---|
1023 | toField := ?,
|
---|
1024 | unsupported := *,
|
---|
1025 | userToUser := *,
|
---|
1026 | userAgent := *,
|
---|
1027 | via := ?,
|
---|
1028 | warning := *,
|
---|
1029 | wwwAuthenticate := *,
|
---|
1030 | undefinedHeader_List := *
|
---|
1031 | }
|
---|
1032 | }//* end group dummy_parameter_receive
|
---|
1033 |
|
---|
1034 | group dummy_request_templates_send {
|
---|
1035 |
|
---|
1036 | template ACK_Request m_ACK_Dummy :=
|
---|
1037 | {
|
---|
1038 | requestLine := m_requestLine_dummy(ACK_E),
|
---|
1039 | msgHeader := m_msgHeader_dummy,
|
---|
1040 | messageBody := omit,
|
---|
1041 | payload := omit
|
---|
1042 | }
|
---|
1043 |
|
---|
1044 | template BYE_Request m_BYE_Dummy :=
|
---|
1045 | {
|
---|
1046 | requestLine := m_requestLine_dummy(BYE_E),
|
---|
1047 | msgHeader := m_msgHeader_dummy,
|
---|
1048 | messageBody := omit,
|
---|
1049 | payload := omit
|
---|
1050 | }
|
---|
1051 |
|
---|
1052 | template CANCEL_Request m_CANCEL_Dummy :=
|
---|
1053 | {
|
---|
1054 | requestLine := m_requestLine_dummy(CANCEL_E),
|
---|
1055 | msgHeader := m_msgHeader_dummy,
|
---|
1056 | messageBody := omit,
|
---|
1057 | payload := omit
|
---|
1058 | }
|
---|
1059 |
|
---|
1060 | template INFO_Request m_INFO_Dummy :=
|
---|
1061 | {
|
---|
1062 | requestLine := m_requestLine_dummy(INFO_E),
|
---|
1063 | msgHeader := m_msgHeader_dummy,
|
---|
1064 | messageBody := omit,
|
---|
1065 | payload := omit
|
---|
1066 | }
|
---|
1067 |
|
---|
1068 | template INVITE_Request m_INVITE_Dummy :=
|
---|
1069 | {
|
---|
1070 | requestLine := m_requestLine_dummy(INVITE_E),
|
---|
1071 | msgHeader := m_msgHeader_dummy,
|
---|
1072 | messageBody := omit,
|
---|
1073 | payload := omit
|
---|
1074 | }
|
---|
1075 |
|
---|
1076 | template MESSAGE_Request m_MESSAGE_Dummy :=
|
---|
1077 | {
|
---|
1078 | requestLine := m_requestLine_dummy(MESSAGE_E),
|
---|
1079 | msgHeader := m_msgHeader_dummy,
|
---|
1080 | messageBody := omit,
|
---|
1081 | payload := omit
|
---|
1082 | }
|
---|
1083 |
|
---|
1084 | template NOTIFY_Request m_NOTIFY_Dummy :=
|
---|
1085 | {
|
---|
1086 | requestLine := m_requestLine_dummy(NOTIFY_E),
|
---|
1087 | msgHeader := m_msgHeader_dummy,
|
---|
1088 | messageBody := omit,
|
---|
1089 | payload := omit
|
---|
1090 | }
|
---|
1091 |
|
---|
1092 | template PRACK_Request m_PRACK_Dummy :=
|
---|
1093 | {
|
---|
1094 | requestLine := m_requestLine_dummy(PRACK_E),
|
---|
1095 | msgHeader := m_msgHeader_dummy,
|
---|
1096 | messageBody := omit,
|
---|
1097 | payload := omit
|
---|
1098 | }
|
---|
1099 |
|
---|
1100 | template PUBLISH_Request m_PUBLISH_Dummy :=
|
---|
1101 | {
|
---|
1102 | requestLine := m_requestLine_dummy(PUBLISH_E),
|
---|
1103 | msgHeader := m_msgHeader_dummy,
|
---|
1104 | messageBody := omit,
|
---|
1105 | payload := omit
|
---|
1106 | }
|
---|
1107 |
|
---|
1108 | template REGISTER_Request m_REGISTER_Dummy :=
|
---|
1109 | {
|
---|
1110 | requestLine := m_requestLine_dummy(REGISTER_E),
|
---|
1111 | msgHeader := m_msgHeader_dummy,
|
---|
1112 | messageBody := omit,
|
---|
1113 | payload := omit
|
---|
1114 | }
|
---|
1115 |
|
---|
1116 | template REFER_Request m_REFER_Dummy :=
|
---|
1117 | {
|
---|
1118 | requestLine := m_requestLine_dummy(REFER_E),
|
---|
1119 | msgHeader := m_msgHeader_dummy,
|
---|
1120 | messageBody := omit,
|
---|
1121 | payload := omit
|
---|
1122 | }
|
---|
1123 |
|
---|
1124 | template SUBSCRIBE_Request m_SUBSCRIBE_Dummy :=
|
---|
1125 | {
|
---|
1126 | requestLine := m_requestLine_dummy(SUBSCRIBE_E),
|
---|
1127 | msgHeader := m_msgHeader_dummy,
|
---|
1128 | messageBody := omit,
|
---|
1129 | payload := omit
|
---|
1130 | }
|
---|
1131 |
|
---|
1132 | template UPDATE_Request m_UPDATE_Dummy :=
|
---|
1133 | {
|
---|
1134 | requestLine := m_requestLine_dummy(UPDATE_E),
|
---|
1135 | msgHeader := m_msgHeader_dummy,
|
---|
1136 | messageBody := omit,
|
---|
1137 | payload := omit
|
---|
1138 | }
|
---|
1139 | }//* end group dummy_request_templates_send
|
---|
1140 | group dummy_request_templates_receive{
|
---|
1141 |
|
---|
1142 | template ACK_Request mw_ACK_Dummy :=
|
---|
1143 | {
|
---|
1144 | requestLine := mw_requestLine_dummy(ACK_E),
|
---|
1145 | msgHeader := mw_msgHeader_dummy,
|
---|
1146 | messageBody := *,
|
---|
1147 | payload := *
|
---|
1148 | }
|
---|
1149 |
|
---|
1150 | template BYE_Request mw_BYE_Dummy :=
|
---|
1151 | {
|
---|
1152 | requestLine := mw_requestLine_dummy(BYE_E),
|
---|
1153 | msgHeader := mw_msgHeader_dummy,
|
---|
1154 | messageBody := *,
|
---|
1155 | payload := *
|
---|
1156 | }
|
---|
1157 |
|
---|
1158 | template CANCEL_Request mw_CANCEL_Dummy :=
|
---|
1159 | {
|
---|
1160 | requestLine := mw_requestLine_dummy(CANCEL_E),
|
---|
1161 | msgHeader := mw_msgHeader_dummy,
|
---|
1162 | messageBody := *,
|
---|
1163 | payload := *
|
---|
1164 | }
|
---|
1165 |
|
---|
1166 | template INFO_Request mw_INFO_Dummy :=
|
---|
1167 | {
|
---|
1168 | requestLine := mw_requestLine_dummy(INFO_E),
|
---|
1169 | msgHeader := mw_msgHeader_dummy,
|
---|
1170 | messageBody := *,
|
---|
1171 | payload := *
|
---|
1172 | }
|
---|
1173 |
|
---|
1174 | template INVITE_Request mw_INVITE_Dummy :=
|
---|
1175 | {
|
---|
1176 | requestLine := mw_requestLine_dummy(INVITE_E),
|
---|
1177 | msgHeader := mw_msgHeader_dummy,
|
---|
1178 | messageBody := *,
|
---|
1179 | payload := *
|
---|
1180 | }
|
---|
1181 |
|
---|
1182 | template MESSAGE_Request mw_MESSAGE_Dummy :=
|
---|
1183 | {
|
---|
1184 | requestLine := mw_requestLine_dummy(MESSAGE_E),
|
---|
1185 | msgHeader := mw_msgHeader_dummy,
|
---|
1186 | messageBody := *,
|
---|
1187 | payload := *
|
---|
1188 | }
|
---|
1189 |
|
---|
1190 | template NOTIFY_Request mw_NOTIFY_Dummy :=
|
---|
1191 | {
|
---|
1192 | requestLine := mw_requestLine_dummy(NOTIFY_E),
|
---|
1193 | msgHeader := mw_msgHeader_dummy,
|
---|
1194 | messageBody := *,
|
---|
1195 | payload := *
|
---|
1196 | }
|
---|
1197 |
|
---|
1198 | template PRACK_Request mw_PRACK_Dummy :=
|
---|
1199 | {
|
---|
1200 | requestLine := mw_requestLine_dummy(PRACK_E),
|
---|
1201 | msgHeader := mw_msgHeader_dummy,
|
---|
1202 | messageBody := *,
|
---|
1203 | payload := *
|
---|
1204 | }
|
---|
1205 |
|
---|
1206 | template PUBLISH_Request mw_PUBLISH_Dummy :=
|
---|
1207 | {
|
---|
1208 | requestLine := mw_requestLine_dummy(PUBLISH_E),
|
---|
1209 | msgHeader := mw_msgHeader_dummy,
|
---|
1210 | messageBody := *,
|
---|
1211 | payload := *
|
---|
1212 | }
|
---|
1213 |
|
---|
1214 | template REFER_Request mw_REFER_Dummy :=
|
---|
1215 | {
|
---|
1216 | requestLine := mw_requestLine_dummy(REFER_E),
|
---|
1217 | msgHeader := mw_msgHeader_dummy,
|
---|
1218 | messageBody := *,
|
---|
1219 | payload := *
|
---|
1220 | }
|
---|
1221 |
|
---|
1222 | template REGISTER_Request mw_REGISTER_Dummy :=
|
---|
1223 | {
|
---|
1224 | requestLine := mw_requestLine_dummy(REGISTER_E),
|
---|
1225 | msgHeader := mw_msgHeader_dummy,
|
---|
1226 | messageBody := *,
|
---|
1227 | payload := *
|
---|
1228 | }
|
---|
1229 |
|
---|
1230 | template SUBSCRIBE_Request mw_SUBSCRIBE_Dummy :=
|
---|
1231 | {
|
---|
1232 | requestLine := mw_requestLine_dummy(SUBSCRIBE_E),
|
---|
1233 | msgHeader := mw_msgHeader_dummy,
|
---|
1234 | messageBody := *,
|
---|
1235 | payload := *
|
---|
1236 | }
|
---|
1237 |
|
---|
1238 | template UPDATE_Request mw_UPDATE_Dummy :=
|
---|
1239 | {
|
---|
1240 | requestLine := mw_requestLine_dummy(UPDATE_E),
|
---|
1241 | msgHeader := mw_msgHeader_dummy,
|
---|
1242 | messageBody := *,
|
---|
1243 | payload := *
|
---|
1244 | }
|
---|
1245 | }//* end group dummy_request_templates_receive
|
---|
1246 |
|
---|
1247 | group dummy_response_templates_send{
|
---|
1248 |
|
---|
1249 | template Response m_Response_Dummy :=
|
---|
1250 | {
|
---|
1251 | statusLine := c_statusLine100,
|
---|
1252 | msgHeader := m_msgHeader_dummy,
|
---|
1253 | messageBody := omit,
|
---|
1254 | payload := omit
|
---|
1255 | }
|
---|
1256 | } //* group dummy_response_templates_send
|
---|
1257 |
|
---|
1258 | group dummy_response_templates_receive{
|
---|
1259 | template Response mw_Response_Dummy :=
|
---|
1260 | {
|
---|
1261 | statusLine := ?,
|
---|
1262 | msgHeader := mw_msgHeader_dummy,
|
---|
1263 | messageBody := *,
|
---|
1264 | payload := *
|
---|
1265 | }
|
---|
1266 | } //* group dummy_response_templates_receive
|
---|
1267 | }
|
---|
1268 |
|
---|
1269 | group base_templates{
|
---|
1270 |
|
---|
1271 | group request_send {
|
---|
1272 |
|
---|
1273 |
|
---|
1274 | template ACK_Request m_ACK_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
|
---|
1275 | From p_from, To p_to, Via p_via) modifies m_ACK_Dummy :=
|
---|
1276 | {
|
---|
1277 | requestLine :=
|
---|
1278 | {
|
---|
1279 | requestUri := p_requestUri
|
---|
1280 | },
|
---|
1281 | msgHeader :=
|
---|
1282 | {
|
---|
1283 | callId := p_callId,
|
---|
1284 | cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "ACK"},
|
---|
1285 | fromField := p_from,
|
---|
1286 | toField := p_to,
|
---|
1287 | via := p_via
|
---|
1288 | }
|
---|
1289 | }
|
---|
1290 |
|
---|
1291 | template BYE_Request m_BYE_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to,
|
---|
1292 | Via p_via) modifies m_BYE_Dummy :=
|
---|
1293 | {
|
---|
1294 | requestLine :=
|
---|
1295 | {
|
---|
1296 | requestUri :=
|
---|
1297 | {
|
---|
1298 | hostPort:= p_requestUri.hostPort
|
---|
1299 | }
|
---|
1300 | },
|
---|
1301 | msgHeader :=
|
---|
1302 | {
|
---|
1303 | callId := p_callId,
|
---|
1304 | cSeq := p_cSeq,
|
---|
1305 | fromField := p_from,
|
---|
1306 | toField := p_to,
|
---|
1307 | via := p_via
|
---|
1308 | }
|
---|
1309 | }
|
---|
1310 |
|
---|
1311 | template CANCEL_Request m_CANCEL_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to,
|
---|
1312 | Via p_via) modifies m_CANCEL_Dummy :=
|
---|
1313 | {
|
---|
1314 | requestLine :=
|
---|
1315 | {
|
---|
1316 | requestUri :=
|
---|
1317 | {
|
---|
1318 | hostPort:= p_requestUri.hostPort
|
---|
1319 | }
|
---|
1320 | },
|
---|
1321 | msgHeader :=
|
---|
1322 | {
|
---|
1323 | callId := p_callId,
|
---|
1324 | cSeq := p_cSeq,
|
---|
1325 | fromField := p_from,
|
---|
1326 | toField := p_to,
|
---|
1327 | via := p_via
|
---|
1328 | }
|
---|
1329 | }
|
---|
1330 |
|
---|
1331 | template INFO_Request m_INFO_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to,
|
---|
1332 | Via p_via) modifies m_INFO_Dummy :=
|
---|
1333 | {
|
---|
1334 | requestLine :=
|
---|
1335 | {
|
---|
1336 | requestUri :=
|
---|
1337 | {
|
---|
1338 | hostPort:= p_requestUri.hostPort
|
---|
1339 | }
|
---|
1340 | },
|
---|
1341 | msgHeader :=
|
---|
1342 | {
|
---|
1343 | callId := p_callId,
|
---|
1344 | cSeq := p_cSeq,
|
---|
1345 | fromField := p_from,
|
---|
1346 | toField := p_to,
|
---|
1347 | via := p_via
|
---|
1348 | }
|
---|
1349 | }
|
---|
1350 |
|
---|
1351 | template INVITE_Request m_INVITE_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
|
---|
1352 | From p_from, To p_to, Via p_via, Contact p_contact) modifies m_INVITE_Dummy :=
|
---|
1353 | {
|
---|
1354 | requestLine :=
|
---|
1355 | {
|
---|
1356 | requestUri := p_requestUri
|
---|
1357 | },
|
---|
1358 | msgHeader :=
|
---|
1359 | {
|
---|
1360 | callId := p_callId,
|
---|
1361 | contact := p_contact,
|
---|
1362 | cSeq := p_cSeq,
|
---|
1363 | fromField := p_from,
|
---|
1364 | toField := p_to,
|
---|
1365 | via := p_via
|
---|
1366 | }
|
---|
1367 | }
|
---|
1368 |
|
---|
1369 | template MESSAGE_Request m_MESSAGE_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via) modifies m_MESSAGE_Dummy :=
|
---|
1370 | {
|
---|
1371 | requestLine :=
|
---|
1372 | {
|
---|
1373 | requestUri := p_requestUri
|
---|
1374 | },
|
---|
1375 | msgHeader :=
|
---|
1376 | {
|
---|
1377 | callId := p_callId,
|
---|
1378 | cSeq := p_cSeq,
|
---|
1379 | fromField := p_from,
|
---|
1380 | toField := p_to,
|
---|
1381 | via := p_via
|
---|
1382 | }
|
---|
1383 | }
|
---|
1384 |
|
---|
1385 | template NOTIFY_Request m_NOTIFY_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
|
---|
1386 | From p_from, To p_to, Via p_via) modifies m_NOTIFY_Dummy :=
|
---|
1387 | {
|
---|
1388 | requestLine :=
|
---|
1389 | {
|
---|
1390 | requestUri :=
|
---|
1391 | {
|
---|
1392 | hostPort:= p_requestUri.hostPort
|
---|
1393 | }
|
---|
1394 | },
|
---|
1395 | msgHeader :=
|
---|
1396 | {
|
---|
1397 | callId := p_callId,
|
---|
1398 | //* contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
|
---|
1399 | //* contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication},
|
---|
1400 | cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "NOTIFY"},
|
---|
1401 | fromField := p_from,
|
---|
1402 | toField := p_to,
|
---|
1403 | via := p_via
|
---|
1404 | }//* ,
|
---|
1405 | //* messageBody := p_mb
|
---|
1406 | }
|
---|
1407 |
|
---|
1408 | template PRACK_Request m_PRACK_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
|
---|
1409 | From p_from, To p_to, Via p_via, RAck p_RAck)
|
---|
1410 | modifies m_PRACK_Dummy :=
|
---|
1411 | {
|
---|
1412 | requestLine :=
|
---|
1413 | {
|
---|
1414 | requestUri :=
|
---|
1415 | {
|
---|
1416 | hostPort:= p_requestUri.hostPort
|
---|
1417 | }
|
---|
1418 | },
|
---|
1419 | msgHeader :=
|
---|
1420 | {
|
---|
1421 | callId := p_callId,
|
---|
1422 | cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "PRACK"},
|
---|
1423 | fromField := p_from,
|
---|
1424 | rAck := p_RAck,
|
---|
1425 | toField := p_to,
|
---|
1426 | via := p_via
|
---|
1427 | },
|
---|
1428 | messageBody := omit
|
---|
1429 | }
|
---|
1430 |
|
---|
1431 | //* in reality PUBLISH request contain xml in content
|
---|
1432 | template PUBLISH_Request m_PUBLISH_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
|
---|
1433 | From p_from, To p_to, Via p_via, template Event p_event, template RAck p_RAck, template MessageBody p_mb)
|
---|
1434 | modifies m_PUBLISH_Dummy :=
|
---|
1435 | {
|
---|
1436 | requestLine :=
|
---|
1437 | {
|
---|
1438 | requestUri :=
|
---|
1439 | {
|
---|
1440 | hostPort:= p_requestUri.hostPort
|
---|
1441 | }
|
---|
1442 | },
|
---|
1443 | msgHeader :=
|
---|
1444 | {
|
---|
1445 | callId := p_callId,
|
---|
1446 | contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
|
---|
1447 | contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication},
|
---|
1448 | cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "PUBLISH"},
|
---|
1449 | event := p_event,
|
---|
1450 | fromField := p_from,
|
---|
1451 | toField := p_to,
|
---|
1452 | via := p_via
|
---|
1453 | },
|
---|
1454 | messageBody := p_mb
|
---|
1455 | }
|
---|
1456 |
|
---|
1457 | template REFER_Request m_REFER_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, Contact p_contact,
|
---|
1458 | From p_from, template To p_to, Via p_via, template ReferTo p_referTo, template ReferredBy p_referredBy)
|
---|
1459 | modifies m_REFER_Dummy :=
|
---|
1460 | {
|
---|
1461 | requestLine :=
|
---|
1462 | {
|
---|
1463 | requestUri := p_requestUri
|
---|
1464 | },
|
---|
1465 | msgHeader :=
|
---|
1466 | {
|
---|
1467 | callId := p_callId,
|
---|
1468 | contact := p_contact,
|
---|
1469 | cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "REFER"},
|
---|
1470 | fromField := p_from,
|
---|
1471 | referTo := p_referTo,
|
---|
1472 | referredBy := p_referredBy,
|
---|
1473 | toField := p_to,
|
---|
1474 | via := p_via
|
---|
1475 | }
|
---|
1476 | }
|
---|
1477 |
|
---|
1478 | template REFER_Request m_REFER_Request_replaces (
|
---|
1479 | SipUrl p_requestUri,
|
---|
1480 | CallId p_callId,
|
---|
1481 | CSeq p_cSeq,
|
---|
1482 | Contact p_contact,
|
---|
1483 | From p_from,
|
---|
1484 | template To p_to,
|
---|
1485 | Via p_via,
|
---|
1486 | template ReferTo p_referTo,
|
---|
1487 | template ReferredBy p_referredBy,
|
---|
1488 | template Replaces p_replaces,
|
---|
1489 | template Require p_require
|
---|
1490 | ) modifies m_REFER_Request_Base := {
|
---|
1491 | msgHeader :=
|
---|
1492 | {
|
---|
1493 | replaces := p_replaces,
|
---|
1494 | require := p_require
|
---|
1495 | }
|
---|
1496 | }
|
---|
1497 |
|
---|
1498 | template REGISTER_Request m_REGISTER_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
|
---|
1499 | From p_from, To p_to, Via p_via, Contact p_contact, template Authorization p_authorization) modifies m_REGISTER_Dummy :=
|
---|
1500 | {
|
---|
1501 | requestLine :=
|
---|
1502 | {
|
---|
1503 | requestUri := p_requestUri
|
---|
1504 | },
|
---|
1505 | msgHeader :=
|
---|
1506 | {
|
---|
1507 | authorization := p_authorization,
|
---|
1508 | callId := p_callId,
|
---|
1509 | contact := p_contact,
|
---|
1510 | cSeq := p_cSeq,
|
---|
1511 | fromField := p_from,
|
---|
1512 | toField := p_to,
|
---|
1513 | via := p_via
|
---|
1514 |
|
---|
1515 | }
|
---|
1516 | }
|
---|
1517 |
|
---|
1518 | template SUBSCRIBE_Request m_SUBSCRIBE_Request_Base (SipUrl p_requestUri, CallId p_callId,
|
---|
1519 | CSeq p_cSeq, From p_from, To p_to, Via p_via) modifies m_SUBSCRIBE_Dummy :=
|
---|
1520 | {
|
---|
1521 | requestLine :=
|
---|
1522 | {
|
---|
1523 | requestUri :=
|
---|
1524 | {
|
---|
1525 | hostPort:= p_requestUri.hostPort
|
---|
1526 | }
|
---|
1527 | },
|
---|
1528 | msgHeader :=
|
---|
1529 | {
|
---|
1530 | callId := p_callId,
|
---|
1531 | cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "SUBSCRIBE"},
|
---|
1532 | fromField := p_from,
|
---|
1533 | toField := p_to,
|
---|
1534 | via := p_via
|
---|
1535 | }
|
---|
1536 | }
|
---|
1537 |
|
---|
1538 | template UPDATE_Request m_UPDATE_Request_Base (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
|
---|
1539 | From p_from, To p_to, Via p_via, Contact p_contact, template MessageBody p_mb) modifies m_UPDATE_Dummy :=
|
---|
1540 | {
|
---|
1541 | requestLine :=
|
---|
1542 | {
|
---|
1543 | requestUri :=
|
---|
1544 | {
|
---|
1545 | hostPort:= p_requestUri.hostPort
|
---|
1546 | }
|
---|
1547 | },
|
---|
1548 | msgHeader :=
|
---|
1549 | {
|
---|
1550 | callId := p_callId,
|
---|
1551 | contact := p_contact,
|
---|
1552 | contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
|
---|
1553 | contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication},
|
---|
1554 | cSeq := {fieldName:=CSEQ_E, seqNumber:= p_cSeq.seqNumber, method:= "UPDATE"},
|
---|
1555 | fromField := p_from,
|
---|
1556 | toField := p_to,
|
---|
1557 | via := p_via
|
---|
1558 | },
|
---|
1559 | messageBody := p_mb
|
---|
1560 | }
|
---|
1561 |
|
---|
1562 | } //* end of group message_send
|
---|
1563 |
|
---|
1564 | group request_receive {
|
---|
1565 |
|
---|
1566 | template ACK_Request mw_ACK_Request_Base (template CallId p_callId) modifies mw_ACK_Dummy :=
|
---|
1567 | {
|
---|
1568 | msgHeader :=
|
---|
1569 | {
|
---|
1570 | callId := p_callId
|
---|
1571 | }
|
---|
1572 | }
|
---|
1573 |
|
---|
1574 | template BYE_Request mw_BYE_Request_Base(template CallId p_callId) modifies mw_BYE_Dummy :=
|
---|
1575 | {
|
---|
1576 | msgHeader :=
|
---|
1577 | {
|
---|
1578 | callId := p_callId
|
---|
1579 | }
|
---|
1580 | }
|
---|
1581 |
|
---|
1582 | template CANCEL_Request mw_CANCEL_Request_Base (template CallId p_callId) modifies mw_CANCEL_Dummy :=
|
---|
1583 | {
|
---|
1584 | msgHeader :=
|
---|
1585 | {
|
---|
1586 | callId := p_callId
|
---|
1587 | }
|
---|
1588 | }
|
---|
1589 |
|
---|
1590 | template INFO_Request mw_INFO_Request_Base(template CallId p_callId) modifies mw_INFO_Dummy :=
|
---|
1591 | {
|
---|
1592 | msgHeader :=
|
---|
1593 | {
|
---|
1594 | callId := p_callId
|
---|
1595 | }
|
---|
1596 | }
|
---|
1597 |
|
---|
1598 | template INVITE_Request mw_INVITE_Request_Base modifies mw_INVITE_Dummy :=
|
---|
1599 | {
|
---|
1600 | requestLine :=
|
---|
1601 | {
|
---|
1602 | method := INVITE_E
|
---|
1603 | }
|
---|
1604 | }
|
---|
1605 |
|
---|
1606 | template MESSAGE_Request mw_MESSAGE_Request_Base(template CallId p_callId) modifies mw_MESSAGE_Dummy :=
|
---|
1607 | {
|
---|
1608 | msgHeader :=
|
---|
1609 | {
|
---|
1610 | callId := p_callId,
|
---|
1611 | contact := omit
|
---|
1612 | }
|
---|
1613 | }
|
---|
1614 |
|
---|
1615 | template NOTIFY_Request mw_NOTIFY_Request_Base (template CallId p_callId) modifies mw_NOTIFY_Dummy :=
|
---|
1616 | {
|
---|
1617 | msgHeader :=
|
---|
1618 | {
|
---|
1619 | callId := p_callId
|
---|
1620 | }
|
---|
1621 | }
|
---|
1622 |
|
---|
1623 | template PRACK_Request mw_PRACK_Request_Base(template CallId p_callId) modifies mw_PRACK_Dummy :=
|
---|
1624 | {
|
---|
1625 | msgHeader :=
|
---|
1626 | {
|
---|
1627 | callId := p_callId
|
---|
1628 | }
|
---|
1629 | }
|
---|
1630 |
|
---|
1631 | template PUBLISH_Request mw_PUBLISH_Request_Base(template CallId p_callId) modifies mw_PUBLISH_Dummy :=
|
---|
1632 | {
|
---|
1633 | msgHeader :=
|
---|
1634 | {
|
---|
1635 | callId := p_callId
|
---|
1636 | }
|
---|
1637 | }
|
---|
1638 |
|
---|
1639 | template REFER_Request mw_REFER_Request_Base (CallId p_callId) modifies mw_REFER_Dummy :=
|
---|
1640 | {
|
---|
1641 | msgHeader :=
|
---|
1642 | {
|
---|
1643 | callId := p_callId
|
---|
1644 | }
|
---|
1645 | }
|
---|
1646 |
|
---|
1647 | template REFER_Request
|
---|
1648 | mw_REFER_Request(CallId p_callId, SipUrl p_requestUri,
|
---|
1649 | SipUrl p_referredBy)
|
---|
1650 | modifies mw_REFER_Request_Base := {
|
---|
1651 | requestLine := {requestUri := p_requestUri},
|
---|
1652 | msgHeader := {
|
---|
1653 | callId := p_callId,
|
---|
1654 | referredBy := {
|
---|
1655 | fieldName := REFERRED_BY_E,
|
---|
1656 | nameAddr := {displayName := *, addrSpec := p_referredBy},
|
---|
1657 | referredbyIdParams := *
|
---|
1658 | }
|
---|
1659 | }
|
---|
1660 | }
|
---|
1661 |
|
---|
1662 | template INVITE_Request mw_INVITE_Request(template Require p_require,
|
---|
1663 | SipUrl p_referredBy) modifies mw_INVITE_Request_Base := {
|
---|
1664 | msgHeader := {
|
---|
1665 | require := p_require,
|
---|
1666 | referredBy := {
|
---|
1667 | fieldName := REFERRED_BY_E,
|
---|
1668 | nameAddr := {displayName := *, addrSpec := p_referredBy},
|
---|
1669 | referredbyIdParams := *
|
---|
1670 | }
|
---|
1671 | }
|
---|
1672 | }
|
---|
1673 |
|
---|
1674 | template REGISTER_Request mw_REGISTER_Request_Base modifies mw_REGISTER_Dummy :=
|
---|
1675 | {
|
---|
1676 | requestLine :=
|
---|
1677 | {
|
---|
1678 | method := REGISTER_E
|
---|
1679 | }
|
---|
1680 | }
|
---|
1681 |
|
---|
1682 | template SUBSCRIBE_Request mw_SUBSCRIBE_Request_Base modifies mw_SUBSCRIBE_Dummy :=
|
---|
1683 | {
|
---|
1684 | requestLine :=
|
---|
1685 | {
|
---|
1686 | method := SUBSCRIBE_E
|
---|
1687 | }
|
---|
1688 | }
|
---|
1689 |
|
---|
1690 | template UPDATE_Request mw_UPDATE_Request_Base(template CallId p_callId) modifies mw_UPDATE_Dummy :=
|
---|
1691 | {
|
---|
1692 | msgHeader :=
|
---|
1693 | {
|
---|
1694 | callId := p_callId
|
---|
1695 | }
|
---|
1696 | }
|
---|
1697 |
|
---|
1698 | } //* end group request_receive
|
---|
1699 |
|
---|
1700 | group response_send {
|
---|
1701 |
|
---|
1702 | template Response m_Response_Base (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
|
---|
1703 | From p_from, To p_to, Via p_via) modifies m_Response_Dummy:=
|
---|
1704 | {
|
---|
1705 | statusLine := p_statusLine,
|
---|
1706 | msgHeader :=
|
---|
1707 | {
|
---|
1708 | callId := p_callId,
|
---|
1709 | cSeq := p_cSeq,
|
---|
1710 | fromField := p_from,
|
---|
1711 | maxForwards := omit,
|
---|
1712 | toField := p_to,
|
---|
1713 | via := p_via
|
---|
1714 | },
|
---|
1715 | messageBody := omit,
|
---|
1716 | payload := omit
|
---|
1717 | }
|
---|
1718 |
|
---|
1719 |
|
---|
1720 |
|
---|
1721 | } //* end group response_send
|
---|
1722 |
|
---|
1723 | group response_receive {
|
---|
1724 |
|
---|
1725 | template Response mw_Response_Base (template StatusLine p_statusLine, template CallId p_callId,
|
---|
1726 | template CSeq p_cSeq) modifies mw_Response_Dummy:=
|
---|
1727 | {
|
---|
1728 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
1729 | msgHeader :=
|
---|
1730 | {
|
---|
1731 | callId := p_callId,
|
---|
1732 | contentLength := *,
|
---|
1733 | cSeq := p_cSeq,
|
---|
1734 | fromField := ?,
|
---|
1735 | maxForwards := *,
|
---|
1736 | toField := ?,
|
---|
1737 | via := ?
|
---|
1738 | }
|
---|
1739 | }
|
---|
1740 | } //* end group message_receive
|
---|
1741 |
|
---|
1742 | } //* end group full_templates
|
---|
1743 |
|
---|
1744 | group modified_templates {
|
---|
1745 |
|
---|
1746 | group request_send {
|
---|
1747 |
|
---|
1748 | template ACK_Request m_ACK_Request_route (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
|
---|
1749 | From p_from, To p_to, Via p_via, Route p_route)
|
---|
1750 | modifies m_ACK_Request_Base
|
---|
1751 | :=
|
---|
1752 | {
|
---|
1753 | msgHeader :=
|
---|
1754 | {
|
---|
1755 | route := p_route
|
---|
1756 | }
|
---|
1757 | }
|
---|
1758 |
|
---|
1759 | template ACK_Request m_ACK_Request_sdp (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
|
---|
1760 | From p_from, To p_to, Via p_via,template MessageBody p_mb )
|
---|
1761 | modifies m_ACK_Request_Base
|
---|
1762 | :=
|
---|
1763 | {
|
---|
1764 | msgHeader :=
|
---|
1765 | {
|
---|
1766 | contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
|
---|
1767 | contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}
|
---|
1768 | },
|
---|
1769 | messageBody := p_mb
|
---|
1770 | }
|
---|
1771 |
|
---|
1772 | template BYE_Request m_BYE_Request_cause
|
---|
1773 | (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, integer p_cause)
|
---|
1774 | modifies m_BYE_Request_Base
|
---|
1775 | :=
|
---|
1776 | {
|
---|
1777 | msgHeader :=
|
---|
1778 | {
|
---|
1779 | reason := m_Reason(p_cause) //* PIXIT value
|
---|
1780 | }
|
---|
1781 | }
|
---|
1782 |
|
---|
1783 | template INVITE_Request m_INVITE_Request_sdp
|
---|
1784 | (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to,
|
---|
1785 | Via p_via, Contact p_contact, template MessageBody p_mb)
|
---|
1786 | modifies m_INVITE_Request_Base
|
---|
1787 | :=
|
---|
1788 | {
|
---|
1789 | msgHeader :=
|
---|
1790 | {
|
---|
1791 | contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
|
---|
1792 | contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}
|
---|
1793 | },
|
---|
1794 | messageBody := p_mb
|
---|
1795 | }
|
---|
1796 |
|
---|
1797 | template INVITE_Request m_INVITE_Request_ResourceList
|
---|
1798 | (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to,
|
---|
1799 | Via p_via, Contact p_contact, template MessageBody p_mb)
|
---|
1800 | modifies m_INVITE_Request_Base
|
---|
1801 | :=
|
---|
1802 | {
|
---|
1803 | msgHeader :=
|
---|
1804 | {
|
---|
1805 | contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
|
---|
1806 | contentType := {fieldName := CONTENT_TYPE_E, mediaType := "application/resource-lists+xml"},
|
---|
1807 | contentDisposition := {
|
---|
1808 | fieldName := CONTENT_DISPOSITION_E,
|
---|
1809 | dispositionType := "recipient-list",
|
---|
1810 | dispositionParams := omit
|
---|
1811 | },
|
---|
1812 | require := {
|
---|
1813 | fieldName := REQUIRE_E,
|
---|
1814 | optionsTags := {"recipient-list-invite"}
|
---|
1815 | }
|
---|
1816 | },
|
---|
1817 | messageBody := p_mb
|
---|
1818 | }
|
---|
1819 |
|
---|
1820 | template REGISTER_Request m_REGISTER_Request_expires
|
---|
1821 | (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq,
|
---|
1822 | From p_from, To p_to, Via p_via, Contact p_contact,
|
---|
1823 | template Authorization p_authorization, charstring p_expires)
|
---|
1824 | modifies m_REGISTER_Request_Base
|
---|
1825 | :=
|
---|
1826 | {
|
---|
1827 | msgHeader :=
|
---|
1828 | {
|
---|
1829 | authorization := p_authorization,
|
---|
1830 | expires := {
|
---|
1831 | fieldName := EXPIRES_E,
|
---|
1832 | deltaSec := p_expires }
|
---|
1833 | }
|
---|
1834 | }
|
---|
1835 |
|
---|
1836 | template NOTIFY_Request m_NOTIFY_Request_sipfrag (
|
---|
1837 | SipUrl p_requestUri,
|
---|
1838 | CallId p_callId,
|
---|
1839 | CSeq p_cSeq,
|
---|
1840 | From p_from,
|
---|
1841 | To p_to,
|
---|
1842 | Via p_via,
|
---|
1843 | charstring p_state,
|
---|
1844 | charstring p_sipfrag
|
---|
1845 | ) modifies m_NOTIFY_Request_Base := {
|
---|
1846 | requestLine :=
|
---|
1847 | {
|
---|
1848 | method := NOTIFY_E,
|
---|
1849 | requestUri :=
|
---|
1850 | {
|
---|
1851 | hostPort:= p_requestUri.hostPort
|
---|
1852 | }
|
---|
1853 | },
|
---|
1854 | msgHeader :=
|
---|
1855 | {
|
---|
1856 | contentLength := {fieldName := CONTENT_LENGTH_E, len:= lengthof(p_sipfrag)},
|
---|
1857 | contentType := {fieldName := CONTENT_TYPE_E, mediaType := "message/sipfrag"},
|
---|
1858 | subscriptionState := {
|
---|
1859 | fieldName := SUBSCRIPTION_STATE_E,
|
---|
1860 | subState := p_state,
|
---|
1861 | substateParams := omit
|
---|
1862 | },
|
---|
1863 | event := m_Event_refer
|
---|
1864 | },
|
---|
1865 | messageBody := {
|
---|
1866 | sipfrag := p_sipfrag
|
---|
1867 | }
|
---|
1868 | }
|
---|
1869 |
|
---|
1870 | } //* end group request_send
|
---|
1871 |
|
---|
1872 |
|
---|
1873 | group request_receive {
|
---|
1874 |
|
---|
1875 | template BYE_Request mw_BYE_Request_Reason(template CallId p_callId, integer p_cause) modifies mw_BYE_Request_Base :=
|
---|
1876 | {
|
---|
1877 | msgHeader :=
|
---|
1878 | {
|
---|
1879 | reason := mw_Reason(p_cause)
|
---|
1880 | }
|
---|
1881 | }
|
---|
1882 |
|
---|
1883 | template BYE_Request mw_BYE_Request_UserToUser(template CallId p_callId) modifies mw_BYE_Request_Base :=
|
---|
1884 | {
|
---|
1885 | msgHeader :=
|
---|
1886 | {
|
---|
1887 | userToUser := ?
|
---|
1888 | }
|
---|
1889 | }
|
---|
1890 |
|
---|
1891 |
|
---|
1892 | template INVITE_Request mw_INVITE_Request_RequestURI (template SipUrl p_sipUrl) modifies mw_INVITE_Dummy :=
|
---|
1893 | {
|
---|
1894 | requestLine :=
|
---|
1895 | {
|
---|
1896 | requestUri := p_sipUrl,
|
---|
1897 | sipVersion := c_sipNameVersion
|
---|
1898 | }
|
---|
1899 | }
|
---|
1900 |
|
---|
1901 | template INFO_Request mw_INFO_Request_MB (template CallId p_callId, template MessageBody p_mb) modifies mw_INFO_Request_Base :=
|
---|
1902 | {
|
---|
1903 | messageBody := p_mb
|
---|
1904 | }
|
---|
1905 |
|
---|
1906 | template INVITE_Request mw_INVITE_Request_expires modifies mw_INVITE_Request_Base
|
---|
1907 | :=
|
---|
1908 | {
|
---|
1909 | msgHeader := {expires := ?}
|
---|
1910 | }
|
---|
1911 |
|
---|
1912 | template INVITE_Request mw_INVITE_Request_callid(CallId p_callid) modifies mw_INVITE_Request_Base
|
---|
1913 | :=
|
---|
1914 | {
|
---|
1915 | msgHeader := {callId := p_callid}
|
---|
1916 | }
|
---|
1917 |
|
---|
1918 | template INVITE_Request mw_INVITE_Request_MB (template CallId p_callId, template MessageBody p_mb) modifies mw_INVITE_Request_Base :=
|
---|
1919 | {
|
---|
1920 | msgHeader := {callId := p_callId},
|
---|
1921 | messageBody := p_mb
|
---|
1922 | }
|
---|
1923 |
|
---|
1924 | template INVITE_Request mw_INVITE_Request_noPaccessNetworkInfo (template CallId p_callId)
|
---|
1925 | modifies mw_INVITE_Request_Base
|
---|
1926 | :=
|
---|
1927 | {
|
---|
1928 | msgHeader := { pAccessNetworkInfo := omit}
|
---|
1929 | }
|
---|
1930 | template INVITE_Request mw_INVITE_Request_PaccessNetworkInfo (template CallId p_callId)
|
---|
1931 | modifies mw_INVITE_Request_Base
|
---|
1932 | :=
|
---|
1933 | {
|
---|
1934 | msgHeader := { pAccessNetworkInfo := ?}
|
---|
1935 | }
|
---|
1936 |
|
---|
1937 | template REGISTER_Request mw_REGISTER_Request_ISC (template PAccessNetworkInfo p_access , template PVisitedNetworkID p_visited )modifies mw_REGISTER_Request_Base :=
|
---|
1938 | {
|
---|
1939 | msgHeader := {
|
---|
1940 | pAccessNetworkInfo := p_access,
|
---|
1941 | pVisitedNetworkID := p_visited
|
---|
1942 | }
|
---|
1943 |
|
---|
1944 | }
|
---|
1945 |
|
---|
1946 | template UPDATE_Request mw_UPDATE_Request_SDP(template CallId p_callId, template MessageBody p_mb) modifies mw_UPDATE_Dummy :=
|
---|
1947 | {
|
---|
1948 | messageBody := p_mb
|
---|
1949 | }
|
---|
1950 |
|
---|
1951 | template NOTIFY_Request mw_NOTIFY_Request_MB (template CallId p_callId, template MessageBody p_mb) modifies mw_NOTIFY_Request_Base :=
|
---|
1952 | {
|
---|
1953 | messageBody := p_mb
|
---|
1954 | }
|
---|
1955 |
|
---|
1956 | } //* end group request_receive
|
---|
1957 |
|
---|
1958 | group response_send {
|
---|
1959 |
|
---|
1960 | template Response m_Response_AlertInfo (
|
---|
1961 | StatusLine p_statusLine,
|
---|
1962 | CallId p_callId,
|
---|
1963 | CSeq p_cSeq,
|
---|
1964 | From p_from,
|
---|
1965 | To p_to,
|
---|
1966 | Via p_via,
|
---|
1967 | AlertInfo p_alertInfo
|
---|
1968 | ) modifies m_Response_Base:= {
|
---|
1969 | msgHeader := {
|
---|
1970 | alertInfo := p_alertInfo
|
---|
1971 | }
|
---|
1972 | }
|
---|
1973 |
|
---|
1974 | template Response m_Response_ext (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
|
---|
1975 | From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordroute) modifies m_Response_Base:=
|
---|
1976 | {
|
---|
1977 | msgHeader :={
|
---|
1978 | route := p_route, //f_route(),
|
---|
1979 | recordRoute := p_recordroute //f_recordroute()
|
---|
1980 | }
|
---|
1981 | }
|
---|
1982 |
|
---|
1983 | template Response m_Response_mbody (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
|
---|
1984 | From p_from, To p_to, Via p_via, template Route p_route, template RecordRoute p_recordroute, MessageBody p_mb) modifies m_Response_ext:=
|
---|
1985 | {
|
---|
1986 | msgHeader :=
|
---|
1987 | {
|
---|
1988 | contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
|
---|
1989 | contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication}
|
---|
1990 | },
|
---|
1991 | messageBody := p_mb
|
---|
1992 | }
|
---|
1993 |
|
---|
1994 | template Response m_Response_PAsserted_Privacy (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
|
---|
1995 | 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:=
|
---|
1996 | {
|
---|
1997 | msgHeader :=
|
---|
1998 | {
|
---|
1999 | pAssertedID := p_pAssertedID,
|
---|
2000 | privacy := p_privacy
|
---|
2001 | }
|
---|
2002 | }
|
---|
2003 |
|
---|
2004 | template Response mw_Response_PAsserted_Privacy_Supported (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2005 | template CSeq p_cSeq, template PAssertedID p_pAssertedID, template Privacy p_privacy, template Supported p_supported) modifies mw_Response_Base:=
|
---|
2006 | {
|
---|
2007 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2008 | msgHeader :=
|
---|
2009 | {
|
---|
2010 | pAssertedID := p_pAssertedID,
|
---|
2011 | privacy := p_privacy,
|
---|
2012 | supported := p_supported
|
---|
2013 | }
|
---|
2014 | }
|
---|
2015 |
|
---|
2016 | template Response m_Response_PAsserted_Privacy_mbody (StatusLine p_statusLine, CallId p_callId, CSeq p_cSeq,
|
---|
2017 | 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:=
|
---|
2018 | {
|
---|
2019 | msgHeader :=
|
---|
2020 | {
|
---|
2021 | contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))},
|
---|
2022 | contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_sdpAplication},
|
---|
2023 | pAssertedID := p_pAssertedID,
|
---|
2024 | privacy := p_privacy
|
---|
2025 | },
|
---|
2026 | messageBody := p_mb
|
---|
2027 | }
|
---|
2028 |
|
---|
2029 | } //* end group response_send
|
---|
2030 |
|
---|
2031 |
|
---|
2032 | group response_receive {
|
---|
2033 |
|
---|
2034 | template Response mw_Response_Expires (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2035 | template CSeq p_cSeq, template DeltaSec p_deltaSec) modifies mw_Response_Base:=
|
---|
2036 | {
|
---|
2037 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2038 | msgHeader :=
|
---|
2039 | {
|
---|
2040 | expires := {fieldName := EXPIRES_E, deltaSec := p_deltaSec}
|
---|
2041 | }
|
---|
2042 | }
|
---|
2043 |
|
---|
2044 | template Response mw_Response_PAsserted_Privacy (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2045 | template CSeq p_cSeq, template PAssertedID p_pAssertedID, template Privacy p_privacy) modifies mw_Response_Base:=
|
---|
2046 | {
|
---|
2047 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2048 | msgHeader :=
|
---|
2049 | {
|
---|
2050 | pAssertedID := p_pAssertedID,
|
---|
2051 | privacy := p_privacy
|
---|
2052 | }
|
---|
2053 | }
|
---|
2054 |
|
---|
2055 | template Response mw_Response_Reason (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2056 | template CSeq p_cSeq, integer p_cause) modifies mw_Response_Base:=
|
---|
2057 | {
|
---|
2058 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2059 | msgHeader :=
|
---|
2060 | {
|
---|
2061 | reason := mw_Reason(p_cause)
|
---|
2062 | }
|
---|
2063 | }
|
---|
2064 |
|
---|
2065 | template Response mw_Response_RecordRoute (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2066 | template CSeq p_cSeq, template RecordRoute p_recordRoute) modifies mw_Response_Base:=
|
---|
2067 | {
|
---|
2068 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2069 | msgHeader :=
|
---|
2070 | {
|
---|
2071 | recordRoute := p_recordRoute
|
---|
2072 | }
|
---|
2073 | }
|
---|
2074 |
|
---|
2075 | template Response mw_Response_Via (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2076 | template CSeq p_cSeq, template Via p_via) modifies mw_Response_Base:=
|
---|
2077 | {
|
---|
2078 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2079 | msgHeader :=
|
---|
2080 | {
|
---|
2081 | via := p_via
|
---|
2082 | }
|
---|
2083 | }
|
---|
2084 |
|
---|
2085 | template Response mw_Response_Contact (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2086 | template CSeq p_cSeq, template Contact p_contact) modifies mw_Response_Base:=
|
---|
2087 | {
|
---|
2088 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2089 | msgHeader :=
|
---|
2090 | {
|
---|
2091 | contact := p_contact
|
---|
2092 | }
|
---|
2093 | }
|
---|
2094 |
|
---|
2095 | template Response mw_Response_AlertInfo (
|
---|
2096 | template StatusLine p_statusLine,
|
---|
2097 | template CallId p_callId,
|
---|
2098 | template CSeq p_cSeq,
|
---|
2099 | template AlertInfo p_alertInfo
|
---|
2100 | ) modifies mw_Response_Base:= {
|
---|
2101 | statusLine := {
|
---|
2102 | sipVersion := c_sipNameVersion,
|
---|
2103 | statusCode := p_statusLine.statusCode,
|
---|
2104 | reasonPhrase := ?
|
---|
2105 | },
|
---|
2106 | msgHeader :=
|
---|
2107 | {
|
---|
2108 | alertInfo := p_alertInfo
|
---|
2109 | }
|
---|
2110 | }
|
---|
2111 |
|
---|
2112 | template Response mw_Response_HistoryInfo (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2113 | template CSeq p_cSeq, template HistoryInfo p_historyInfo) modifies mw_Response_Base:=
|
---|
2114 | {
|
---|
2115 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2116 | msgHeader :=
|
---|
2117 | {
|
---|
2118 | historyInfo:=p_historyInfo
|
---|
2119 | }
|
---|
2120 | }
|
---|
2121 |
|
---|
2122 | template Response mw_Response_messageBody (
|
---|
2123 | template StatusLine p_statusLine,
|
---|
2124 | template CallId p_callId,
|
---|
2125 | template CSeq p_cSeq,
|
---|
2126 | template Require p_require,
|
---|
2127 | template MessageBody p_mb
|
---|
2128 | ) modifies mw_Response_Base:= {
|
---|
2129 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2130 | msgHeader :=
|
---|
2131 | {
|
---|
2132 | require := p_require
|
---|
2133 | },
|
---|
2134 | messageBody := p_mb
|
---|
2135 | }
|
---|
2136 |
|
---|
2137 | template Response mw_Response_Require (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2138 | template CSeq p_cSeq, template Require p_require) modifies mw_Response_Base:=
|
---|
2139 | {
|
---|
2140 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2141 | msgHeader :=
|
---|
2142 | {
|
---|
2143 | require := p_require
|
---|
2144 | }
|
---|
2145 | }
|
---|
2146 |
|
---|
2147 | template Response mw_Response_Require_ifpresent (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2148 | template CSeq p_cSeq, template Require p_require) modifies mw_Response_Base:=
|
---|
2149 | {
|
---|
2150 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2151 | msgHeader :=
|
---|
2152 | {
|
---|
2153 | require := p_require ifpresent
|
---|
2154 | }
|
---|
2155 | }
|
---|
2156 |
|
---|
2157 | template Response mw_Response_Supported (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2158 | template CSeq p_cSeq, template Supported p_supported) modifies mw_Response_Base:=
|
---|
2159 | {
|
---|
2160 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2161 | msgHeader :=
|
---|
2162 | {
|
---|
2163 | supported := p_supported
|
---|
2164 | }
|
---|
2165 | }
|
---|
2166 |
|
---|
2167 | template Response mw_Response_UserToUser (template StatusLine p_statusLine, template CallId p_callId,
|
---|
2168 | template CSeq p_cSeq) modifies mw_Response_Base:=
|
---|
2169 | {
|
---|
2170 | statusLine := {sipVersion := c_sipNameVersion, statusCode := p_statusLine.statusCode, reasonPhrase := ?},
|
---|
2171 | msgHeader :=
|
---|
2172 | {
|
---|
2173 | userToUser := ?
|
---|
2174 | }
|
---|
2175 | }
|
---|
2176 | } //* end group response_receive
|
---|
2177 |
|
---|
2178 |
|
---|
2179 | } //* end group modified_templates
|
---|
2180 |
|
---|
2181 | } //* end group MessageTemplates
|
---|
2182 |
|
---|
2183 | group SDP_Templates {
|
---|
2184 |
|
---|
2185 | group SDP_Messages {
|
---|
2186 |
|
---|
2187 | group base_templates {
|
---|
2188 |
|
---|
2189 | template SDP_Message m_SDP(SDP_media_desc p_media, in SipUserProfile p_userprofile) := {
|
---|
2190 | protocol_version := 0, //* v=0
|
---|
2191 | origin := {
|
---|
2192 | user_name := "voicesession",
|
---|
2193 | session_id := "30000",
|
---|
2194 | session_version := "0",
|
---|
2195 | net_type := c_in,
|
---|
2196 | addr_type := c_ip4,
|
---|
2197 | addr := p_userprofile.contactIpaddr },
|
---|
2198 | //* o=voicesession 12345 12345 IN IP4 172.27.1.219
|
---|
2199 | session_name := "Voice Session", //* s=Voice Session
|
---|
2200 | information := omit,
|
---|
2201 | uri := omit,
|
---|
2202 | emails := omit,
|
---|
2203 | phone_numbers := omit,
|
---|
2204 | connection := {
|
---|
2205 | net_type := c_in,
|
---|
2206 | addr_type := c_ip4,
|
---|
2207 | conn_addr := { addr:= p_userprofile.bearerIpaddr, ttl:=omit, num_of_addr:=omit }
|
---|
2208 | }, //* c=IN IP4 172.27.1.219
|
---|
2209 | bandwidth := omit,
|
---|
2210 | times := { { time_field := { "0", "0" }, time_repeat:=omit
|
---|
2211 | }
|
---|
2212 | }, //* t=0 0
|
---|
2213 | timezone_adjustments := omit,
|
---|
2214 | key := omit,
|
---|
2215 | attributes := omit,
|
---|
2216 | media_list := {p_media}
|
---|
2217 | };
|
---|
2218 |
|
---|
2219 | template SDP_Message m_SDP_mediaList(SDP_media_desc_list p_media_list, in SipUserProfile p_userprofile)
|
---|
2220 | := {
|
---|
2221 | protocol_version := 0, //* v=0
|
---|
2222 | origin := {
|
---|
2223 | user_name := "voicesession",
|
---|
2224 | session_id := "30000",
|
---|
2225 | session_version := "0",
|
---|
2226 | net_type := c_in,
|
---|
2227 | addr_type := c_ip4,
|
---|
2228 | addr := p_userprofile.contactIpaddr },
|
---|
2229 | //* o=voicesession 12345 12345 IN IP4 172.27.1.219
|
---|
2230 | session_name := "Voice Session", //* s=Voice Session
|
---|
2231 | information := omit,
|
---|
2232 | uri := omit,
|
---|
2233 | emails := omit,
|
---|
2234 | phone_numbers := omit,
|
---|
2235 | connection := {
|
---|
2236 | net_type := c_in,
|
---|
2237 | addr_type := c_ip4,
|
---|
2238 | conn_addr := { addr:= p_userprofile.bearerIpaddr, ttl:=omit, num_of_addr:=omit }
|
---|
2239 | }, //* c=IN IP4 172.27.1.219
|
---|
2240 | bandwidth := omit,
|
---|
2241 | times := { { time_field := { "0", "0" }, time_repeat:=omit
|
---|
2242 | }
|
---|
2243 | }, //* t=0 0
|
---|
2244 | timezone_adjustments := omit,
|
---|
2245 | key := omit,
|
---|
2246 | attributes := omit,
|
---|
2247 | media_list := p_media_list
|
---|
2248 | };
|
---|
2249 |
|
---|
2250 | template SDP_Message m_SDP_media_attr_preconditions(SDP_media_desc p_media, in SipUserProfile p_userprofile, SDP_attribute_list p_attribute_list)
|
---|
2251 | modifies m_SDP
|
---|
2252 | := {
|
---|
2253 | media_list := {
|
---|
2254 | {
|
---|
2255 | media_field := {
|
---|
2256 | media := c_audio,
|
---|
2257 | ports := { port_number := 8500, num_of_ports:=omit },
|
---|
2258 | transport := c_rtpAvp,
|
---|
2259 | fmts := { "0" }
|
---|
2260 | }, //* m=audio 8500 RTP/AVP 0
|
---|
2261 | information := omit,
|
---|
2262 | connections := omit,
|
---|
2263 | bandwidth := omit,
|
---|
2264 | key := omit,
|
---|
2265 | attributes := p_attribute_list
|
---|
2266 | }}
|
---|
2267 | }
|
---|
2268 |
|
---|
2269 | template SDP_Message m_SDP_attribute(SDP_media_desc p_media, in SipUserProfile p_userprofile, SDP_attribute loc_attribute)
|
---|
2270 | modifies m_SDP
|
---|
2271 | := {
|
---|
2272 | attributes := {loc_attribute}
|
---|
2273 | };
|
---|
2274 |
|
---|
2275 | template SDP_Message mw_SDP := {
|
---|
2276 | protocol_version := 0, //* v=0
|
---|
2277 | origin := ?,
|
---|
2278 | session_name := ?,
|
---|
2279 | information := omit,
|
---|
2280 | uri := omit,
|
---|
2281 | emails := omit,
|
---|
2282 | phone_numbers := omit,
|
---|
2283 | connection := ?,
|
---|
2284 | bandwidth := omit,
|
---|
2285 | times := { { time_field := { "0", "0" }, time_repeat:=omit
|
---|
2286 | }
|
---|
2287 | }, //* t=0 0
|
---|
2288 | timezone_adjustments := omit,
|
---|
2289 | key := omit,
|
---|
2290 | attributes := omit,
|
---|
2291 | media_list := ?
|
---|
2292 | };
|
---|
2293 |
|
---|
2294 |
|
---|
2295 | }//* end group base_templates
|
---|
2296 |
|
---|
2297 | group modified_templates{
|
---|
2298 | template SDP_Message m_SDP_bandwidth(SDP_media_desc p_media, in SipUserProfile p_userprofile)
|
---|
2299 | modifies m_SDP
|
---|
2300 | := {
|
---|
2301 | bandwidth := {{PX_SIP_SDP_b_modifier, PX_SIP_SDP_b_bandwidth}}
|
---|
2302 | };
|
---|
2303 |
|
---|
2304 | template SDP_Message m_SDP_unacceptable(SDP_media_desc p_media, in SipUserProfile p_userprofile)
|
---|
2305 | modifies m_SDP
|
---|
2306 | := {
|
---|
2307 | protocol_version := 1, //* v=1 unacceptable version of SDP
|
---|
2308 | bandwidth := {{PX_SIP_SDP_b_modifier, PX_SIP_SDP_b_bandwidth}}
|
---|
2309 | };
|
---|
2310 |
|
---|
2311 | template SDP_Message m_SDP_encrypted(SDP_media_desc p_media, in SipUserProfile p_userprofile)
|
---|
2312 | modifies m_SDP
|
---|
2313 | := {
|
---|
2314 | protocol_version := 1, //* v=1 unacceptable version of SDP
|
---|
2315 | bandwidth := {{PX_SIP_SDP_b_modifier, PX_SIP_SDP_b_bandwidth}}
|
---|
2316 | };
|
---|
2317 | }//* end group modified_templates
|
---|
2318 |
|
---|
2319 | } //* end group SDP_Messages
|
---|
2320 |
|
---|
2321 | group SDP_Fields {
|
---|
2322 |
|
---|
2323 | template SDP_media_desc m_media(template SDP_media_field p_mf) := {
|
---|
2324 | media_field := p_mf,
|
---|
2325 | information := omit,
|
---|
2326 | connections := omit,
|
---|
2327 | bandwidth := omit,
|
---|
2328 | key := omit,
|
---|
2329 | attributes := omit
|
---|
2330 | };
|
---|
2331 |
|
---|
2332 | template SDP_media_desc m_mediaFieldBandwdthAttributes(template SDP_media_field p_mf, template SDP_bandwidth p_bw, template SDP_attribute_list p_attributes) := {
|
---|
2333 | media_field := p_mf,
|
---|
2334 | information := omit,
|
---|
2335 | connections := omit,
|
---|
2336 | bandwidth := p_bw,
|
---|
2337 | key := omit,
|
---|
2338 | attributes := p_attributes
|
---|
2339 | };
|
---|
2340 |
|
---|
2341 | template SDP_media_desc m_media_dynPT(charstring p_PT, charstring p_encod) := {
|
---|
2342 | media_field := {
|
---|
2343 | media := c_audio,//* "audio",
|
---|
2344 | ports := { port_number := 8500, num_of_ports:=omit },
|
---|
2345 | transport := c_rtpAvp,//* "RTP/AVP",
|
---|
2346 | fmts := { p_PT }
|
---|
2347 | }, //* m=audio 8500 RTP/AVP 8
|
---|
2348 | information := omit,
|
---|
2349 | connections := omit,
|
---|
2350 | bandwidth := omit,
|
---|
2351 | key := omit,
|
---|
2352 | attributes := { { rtpmap := { attr_value := p_PT & " " & p_encod }
|
---|
2353 | }
|
---|
2354 | } //* a=rtpmap:8 PCMA/8000
|
---|
2355 | };
|
---|
2356 |
|
---|
2357 | template SDP_media_desc m_media_unsupported := {
|
---|
2358 | media_field := {
|
---|
2359 | media := "video",
|
---|
2360 | ports := { port_number := 11500, num_of_ports:=omit },
|
---|
2361 | transport := "RTP/AVP",
|
---|
2362 | fmts := { "99" }
|
---|
2363 | }, //* m=audio 8500 RTP/AVP 0
|
---|
2364 | information := omit,
|
---|
2365 | connections := omit,
|
---|
2366 | bandwidth := omit,
|
---|
2367 | key := omit,
|
---|
2368 | attributes := { {
|
---|
2369 | rtpmap := { attr_value := "99 X-Experimental/180000"}
|
---|
2370 | }}
|
---|
2371 | };
|
---|
2372 |
|
---|
2373 | template SDP_bandwidth m_bandwidth(template charstring loc_m, template integer loc_b) := {
|
---|
2374 | modifier:=loc_m,
|
---|
2375 | bandwidth:=loc_b
|
---|
2376 | };
|
---|
2377 |
|
---|
2378 | template SDP_bandwidth m_bandwidth_as_64:=
|
---|
2379 | {
|
---|
2380 | modifier:="AS",
|
---|
2381 | bandwidth:=64
|
---|
2382 | }
|
---|
2383 |
|
---|
2384 | template SDP_bandwidth mw_bandwidth_rs:=
|
---|
2385 | {
|
---|
2386 | modifier:="RS",
|
---|
2387 | bandwidth:=?
|
---|
2388 | }
|
---|
2389 |
|
---|
2390 | template SDP_bandwidth mw_bandwidth_rr:=
|
---|
2391 | {
|
---|
2392 | modifier:="RR",
|
---|
2393 | bandwidth:=?
|
---|
2394 | }
|
---|
2395 |
|
---|
2396 | template SDP_media_field m_media_field(charstring p_media, integer p_portNum, charstring p_transport, charstring p_fmts) :=
|
---|
2397 | {
|
---|
2398 | media := p_media,
|
---|
2399 | ports := { port_number := p_portNum, num_of_ports:=omit },
|
---|
2400 | transport := p_transport,
|
---|
2401 | fmts := { p_fmts }
|
---|
2402 | }
|
---|
2403 |
|
---|
2404 | template SDP_media_field mw_media_PCMU :=
|
---|
2405 | {
|
---|
2406 | media := c_audio,
|
---|
2407 | ports := { port_number := ?, num_of_ports:=* },
|
---|
2408 | transport := c_rtpAvp,
|
---|
2409 | fmts := { "0" }
|
---|
2410 | }
|
---|
2411 |
|
---|
2412 | template SDP_media_field mw_media_PCMA :=
|
---|
2413 | {
|
---|
2414 | media := c_audio,
|
---|
2415 | ports := { port_number := 8500, num_of_ports:=omit },
|
---|
2416 | transport := c_rtpAvp,
|
---|
2417 | fmts := { "8" }
|
---|
2418 | }
|
---|
2419 |
|
---|
2420 | template SDP_media_field mw_media_PCMA_U_DPT :=
|
---|
2421 | {
|
---|
2422 | media := c_audio,
|
---|
2423 | ports := { port_number := ?, num_of_ports:=* },
|
---|
2424 | transport := c_rtpAvp,
|
---|
2425 | fmts := { * }
|
---|
2426 | }
|
---|
2427 |
|
---|
2428 | template SDP_media_field mw_media_T38 :=
|
---|
2429 | {
|
---|
2430 | media := c_image,
|
---|
2431 | ports := { port_number := ?, num_of_ports:=* },
|
---|
2432 | transport := pattern "*ptl", //* udptl,tcptl
|
---|
2433 | fmts := { "t38" }
|
---|
2434 | }
|
---|
2435 |
|
---|
2436 | template SDP_media_field mw_media_G722 :=
|
---|
2437 | {
|
---|
2438 | media := c_audio,
|
---|
2439 | ports := { port_number := ?, num_of_ports:=* },
|
---|
2440 | transport := "RTP/AVP",
|
---|
2441 | fmts := { "9" }
|
---|
2442 | }
|
---|
2443 |
|
---|
2444 | template SDP_media_field mw_media_AMR_DPT :=
|
---|
2445 | {
|
---|
2446 | media := c_audio,
|
---|
2447 | ports := { port_number := ?, num_of_ports:=* },
|
---|
2448 | transport := c_rtpAvp,
|
---|
2449 | fmts := { * }
|
---|
2450 | }
|
---|
2451 |
|
---|
2452 |
|
---|
2453 | template SDP_attribute m_attribute_sendonly := {sendonly:={}};
|
---|
2454 | template SDP_attribute mw_attribute_sendonly := {sendonly:={}};//MRO
|
---|
2455 | template SDP_attribute m_attribute_recvonly := {recvonly:={}};
|
---|
2456 | template SDP_attribute mw_attribute_recvonly := {recvonly:={}};//MRO
|
---|
2457 | template SDP_attribute m_attribute_sendrecv := {sendrecv:={}};
|
---|
2458 | template SDP_attribute mw_attribute_sendrecv := {sendrecv:={}};//MRO
|
---|
2459 | template SDP_attribute m_attribute_inactive := {inactive:={}};
|
---|
2460 | template SDP_attribute mw_attribute_inactive := {inactive:={}};//MRO
|
---|
2461 | template SDP_attribute mw_attribute_sendonly_inactive := (mw_attribute_sendonly,mw_attribute_inactive);
|
---|
2462 | template SDP_attribute mw_attribute_sendrecv_recvonly_omit := (mw_attribute_sendrecv,mw_attribute_recvonly,omit);
|
---|
2463 | template SDP_attribute m_attribute_AMR_DPT := { rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " AMR" }};
|
---|
2464 | template SDP_attribute m_attribute_CLEARMODE_DPT := {rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " CLEARMODE/8000" }};
|
---|
2465 | template SDP_attribute m_attribute_G722 := { rtpmap := { attr_value := "9 G722/8000" }};
|
---|
2466 | template SDP_attribute m_attribute_PCMU := { rtpmap := { attr_value := "0 PCMU/8000" }};
|
---|
2467 | template SDP_attribute m_attribute_PCMU_DPT := { rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " PCMU/8000" }};
|
---|
2468 | template SDP_attribute m_attribute_PCMA := { rtpmap := { attr_value := "8 PCMA/8000" }};
|
---|
2469 | template SDP_attribute m_attribute_PCMA_DPT := { rtpmap := { attr_value := /*pattern "**/PX_SIP_SDP_dyn & " PCMA/8000" }};
|
---|
2470 | template SDP_attribute m_attribute_T38 := { unknown := { name:=?, attr_value := pattern "*t38*" }};
|
---|
2471 |
|
---|
2472 | template SDP_attribute m_attribute_curr (charstring p_preconditionType, charstring p_statusType, charstring p_direction):=
|
---|
2473 | {
|
---|
2474 | curr:={preconditionType := p_preconditionType,
|
---|
2475 | statusType := p_statusType,
|
---|
2476 | direction := p_direction}
|
---|
2477 | };
|
---|
2478 |
|
---|
2479 | template SDP_attribute mw_attribute_curr :=
|
---|
2480 | {
|
---|
2481 | curr := ?
|
---|
2482 | };
|
---|
2483 |
|
---|
2484 | template SDP_attribute m_attribute_des (charstring p_preconditionType, charstring p_strength, charstring p_statusType, charstring p_direction):=
|
---|
2485 | {
|
---|
2486 | des:={preconditionType := p_preconditionType,
|
---|
2487 | strength := p_strength,
|
---|
2488 | statusType := p_statusType,
|
---|
2489 | direction := p_direction}
|
---|
2490 | };
|
---|
2491 |
|
---|
2492 | template SDP_attribute mw_attribute_des :=
|
---|
2493 | {
|
---|
2494 | des := ?
|
---|
2495 | };
|
---|
2496 |
|
---|
2497 | template SDP_attribute m_attribute_conf (charstring p_preconditionType, charstring p_statusType, charstring p_direction):=
|
---|
2498 | {
|
---|
2499 | conf:={preconditionType := p_preconditionType,
|
---|
2500 | statusType := p_statusType,
|
---|
2501 | direction := p_direction}
|
---|
2502 | };
|
---|
2503 | } //* end group SDP_Fields
|
---|
2504 |
|
---|
2505 | } //* end group SDP_Templates
|
---|
2506 |
|
---|
2507 | group MessageBodies {
|
---|
2508 |
|
---|
2509 | template MessageBody m_MBody_SDP(template SDP_Message p_SDP):=
|
---|
2510 | {
|
---|
2511 | sdpMessageBody := p_SDP
|
---|
2512 | };
|
---|
2513 |
|
---|
2514 | template MessageBody m_MBody_XML(template XmlBody p_xmlBody):=
|
---|
2515 | {
|
---|
2516 | xmlBody := p_xmlBody
|
---|
2517 | };
|
---|
2518 |
|
---|
2519 | template MessageBody m_MBody_longPlainText:=
|
---|
2520 | {
|
---|
2521 | textplain := c_longMessageContent_1300Bytes
|
---|
2522 | };
|
---|
2523 |
|
---|
2524 | template MessageBody m_mBody_plainText(charstring p_plaitext):=
|
---|
2525 | {
|
---|
2526 | textplain := p_plaitext
|
---|
2527 | };
|
---|
2528 |
|
---|
2529 | template MessageBody m_MBody_sipfrag(charstring p_sipfrag) := {
|
---|
2530 | sipfrag := p_sipfrag
|
---|
2531 | }
|
---|
2532 |
|
---|
2533 | template MessageBody m_MBody_MIMESdpXml(template SDP_Message p_sdp, template XmlBody p_xmlBody):=
|
---|
2534 | {
|
---|
2535 | mimeMessageBody := {boundary:="PX_SIP_MIME_Boundary",
|
---|
2536 | mimeEncapsulatedList:= {
|
---|
2537 | {content_type:="PX_SIP_SDP_ContentType",
|
---|
2538 | content_disposition:=omit,
|
---|
2539 | mime_encapsulated_part:={sdpMessageBody := p_sdp}},
|
---|
2540 | {content_type:="PX_SIP_ISUP_ContentType",
|
---|
2541 | content_disposition:=omit,
|
---|
2542 | mime_encapsulated_part:={xmlBody := p_xmlBody}}
|
---|
2543 | }
|
---|
2544 | }
|
---|
2545 | }
|
---|
2546 |
|
---|
2547 | template MessageBody mw_MBody_SDP(template SDP_Message p_SDP):=
|
---|
2548 | {
|
---|
2549 | sdpMessageBody := p_SDP
|
---|
2550 | };
|
---|
2551 |
|
---|
2552 | template MessageBody mw_MBody_XML(template XmlBody p_xmlBody):=
|
---|
2553 | {
|
---|
2554 | xmlBody := p_xmlBody
|
---|
2555 | };
|
---|
2556 |
|
---|
2557 | template MessageBody mw_MBody_MIMESdpXml(template SDP_Message p_sdp, template XmlBody p_xmlBody):=
|
---|
2558 | {
|
---|
2559 | mimeMessageBody := {boundary:=?,
|
---|
2560 | mimeEncapsulatedList:= {
|
---|
2561 | {content_type:=?,
|
---|
2562 | content_disposition:=*,
|
---|
2563 | mime_encapsulated_part:={sdpMessageBody := p_sdp}},
|
---|
2564 | {content_type:=?,
|
---|
2565 | content_disposition:=*,
|
---|
2566 | mime_encapsulated_part:={xmlBody := p_xmlBody}}
|
---|
2567 | }
|
---|
2568 | }
|
---|
2569 | }
|
---|
2570 |
|
---|
2571 | template MessageBody mw_MBody_MIME_Ims3gpp(
|
---|
2572 | template charstring p_disposition,
|
---|
2573 | template Ims_3gpp p_ims3gpp
|
---|
2574 | ):= {
|
---|
2575 | mimeMessageBody := {boundary:=?,
|
---|
2576 | mimeEncapsulatedList:= {
|
---|
2577 | *,
|
---|
2578 | {
|
---|
2579 | content_type:= c_ims3gppAplication,
|
---|
2580 | content_disposition:= p_disposition,
|
---|
2581 | mime_encapsulated_part :={
|
---|
2582 | xmlBody := {
|
---|
2583 | ims3gpp := p_ims3gpp
|
---|
2584 | }
|
---|
2585 | }
|
---|
2586 | },
|
---|
2587 | *
|
---|
2588 | }
|
---|
2589 | }
|
---|
2590 | }
|
---|
2591 |
|
---|
2592 | template MessageBody mw_MBody_MIME_Ims3gppCW(
|
---|
2593 | template charstring p_disposition,
|
---|
2594 | template Ims_3gpp p_ims3gpp
|
---|
2595 | ):= {
|
---|
2596 | mimeMessageBody := {boundary:=?,
|
---|
2597 | mimeEncapsulatedList:= {
|
---|
2598 | *,
|
---|
2599 | {
|
---|
2600 | content_type:= c_ims3gppCwApplication,
|
---|
2601 | content_disposition:= p_disposition,
|
---|
2602 | mime_encapsulated_part :={
|
---|
2603 | xmlBody := {
|
---|
2604 | ims3gpp := p_ims3gpp
|
---|
2605 | }
|
---|
2606 | }
|
---|
2607 | },
|
---|
2608 | *
|
---|
2609 | }
|
---|
2610 | }
|
---|
2611 | }
|
---|
2612 |
|
---|
2613 | }
|
---|
2614 | /*
|
---|
2615 | *
|
---|
2616 | * @desc group TemplatePreparationFunctions contain functions which are used for templates
|
---|
2617 | */
|
---|
2618 | group TemplatePreparationFunctions {
|
---|
2619 |
|
---|
2620 | group MessageBody_Calculation{
|
---|
2621 |
|
---|
2622 | /**
|
---|
2623 | *
|
---|
2624 | * @desc Calculation of Message Body length
|
---|
2625 | * @param p_mb_par contain message body part
|
---|
2626 | * @return message body length
|
---|
2627 | */
|
---|
2628 | function f_MessageBodyLength(MessageBody p_mb_par) return integer {
|
---|
2629 |
|
---|
2630 | var integer v_result:=0;
|
---|
2631 | if (MB_LENGTH_FROM_ENCVAL){ //by default it is set to true
|
---|
2632 |
|
---|
2633 | v_result:= lengthof(encvalue(p_mb_par))/8; // length in bypes, let get length of encoded value
|
---|
2634 | }
|
---|
2635 | else{
|
---|
2636 |
|
---|
2637 | // assume SDP_Message ONLY in the message body
|
---|
2638 | if (ischosen(p_mb_par.sdpMessageBody))
|
---|
2639 | {
|
---|
2640 | v_result := f_SDPlength(p_mb_par.sdpMessageBody);
|
---|
2641 | };
|
---|
2642 |
|
---|
2643 | // assume XML_Body ONLY in the message body
|
---|
2644 | if (ischosen(p_mb_par.xmlBody))
|
---|
2645 | {
|
---|
2646 | v_result := f_XMLBody_Length(p_mb_par.xmlBody, USE_FX_FOR_XML_LENGTH );
|
---|
2647 | };
|
---|
2648 |
|
---|
2649 | //assume XML_Message ONLY in the message body
|
---|
2650 | if (ischosen(p_mb_par.xmlMessage))
|
---|
2651 | {
|
---|
2652 | v_result := f_XMLlength(p_mb_par.xmlMessage, USE_FX_FOR_XML_LENGTH );
|
---|
2653 | };
|
---|
2654 |
|
---|
2655 | // assume MIME_Message in the message body
|
---|
2656 | if (ischosen(p_mb_par.mimeMessageBody))
|
---|
2657 | {
|
---|
2658 | v_result := f_MIMElength(p_mb_par.mimeMessageBody);
|
---|
2659 | };
|
---|
2660 |
|
---|
2661 | //assume sipfrag in the message body
|
---|
2662 | if (ischosen(p_mb_par.sipfrag))
|
---|
2663 | {
|
---|
2664 | v_result := f_TextPlainLength(p_mb_par); //same function due to same type with textplain
|
---|
2665 | };
|
---|
2666 |
|
---|
2667 | //assume textplain in the message body
|
---|
2668 | if (ischosen(p_mb_par.textplain))
|
---|
2669 | {
|
---|
2670 | v_result := f_TextPlainLength(p_mb_par);
|
---|
2671 | };
|
---|
2672 | }
|
---|
2673 |
|
---|
2674 | return v_result
|
---|
2675 | }
|
---|
2676 |
|
---|
2677 |
|
---|
2678 | group SDP_Len_calculation {
|
---|
2679 | /**
|
---|
2680 | *
|
---|
2681 | * @desc Calculation of SDP length
|
---|
2682 | * @param p_mb contain sdp message
|
---|
2683 | * @return sdp_lenght
|
---|
2684 | */
|
---|
2685 | function f_SDPlength(SDP_Message p_mb) return integer
|
---|
2686 | {
|
---|
2687 | var integer v_result:=2; //* due to empty line beginning of message body
|
---|
2688 | var charstring v_auxstring;
|
---|
2689 |
|
---|
2690 | v_result := 2+c_CRlen + lengthof(int2str(p_mb.protocol_version)); //* "v="
|
---|
2691 | v_result := v_result + 2+c_CRlen + lengthof(p_mb.origin.user_name & " " &
|
---|
2692 | p_mb.origin.session_id & " " &
|
---|
2693 | p_mb.origin.session_version & " " &
|
---|
2694 | p_mb.origin.net_type & " " &
|
---|
2695 | p_mb.origin.addr_type & " " &
|
---|
2696 | p_mb.origin.addr
|
---|
2697 | ); //* "o="
|
---|
2698 | v_result := v_result + 2+c_CRlen + lengthof(p_mb.session_name); //* "s="
|
---|
2699 | if (ispresent(p_mb.information))
|
---|
2700 | {v_auxstring:=p_mb.information; v_result := v_result + 2+c_CRlen + lengthof(v_auxstring);}; //* "i= "
|
---|
2701 | if (ispresent(p_mb.uri))
|
---|
2702 | {v_auxstring:=p_mb.uri; v_result := v_result + 2+c_CRlen + lengthof(v_auxstring);}; //* "u="
|
---|
2703 |
|
---|
2704 | if (ispresent(p_mb.emails)) {
|
---|
2705 | for (var integer i:=0; i<sizeof(p_mb.emails); i:=i+1)
|
---|
2706 | {v_result := v_result + 2+c_CRlen + lengthof(p_mb.emails[i].addr_or_phone); //* "e="
|
---|
2707 | if (ispresent(p_mb.emails[i].disp_name))
|
---|
2708 | {v_auxstring:=p_mb.emails[i].disp_name; v_result := v_result + 1 + lengthof(v_auxstring);};
|
---|
2709 | };
|
---|
2710 | };
|
---|
2711 |
|
---|
2712 | if (ispresent(p_mb.phone_numbers)) {
|
---|
2713 | for (var integer i:=0; i<sizeof(p_mb.phone_numbers); i:=i+1)
|
---|
2714 | {v_result := v_result + 2+c_CRlen + lengthof(p_mb.phone_numbers[i].addr_or_phone); //* "p= "
|
---|
2715 | if (ispresent(p_mb.phone_numbers[i].disp_name))
|
---|
2716 | {v_auxstring:=p_mb.phone_numbers[i].disp_name; v_result := v_result + 1 + lengthof(v_auxstring);};
|
---|
2717 | };
|
---|
2718 | };
|
---|
2719 |
|
---|
2720 | if (ispresent(p_mb.connection))
|
---|
2721 | {
|
---|
2722 | var integer v_len_con0 := f_SDPlength_connection(p_mb.connection);
|
---|
2723 | v_result := v_result + v_len_con0;
|
---|
2724 | }; //* "c="
|
---|
2725 |
|
---|
2726 | if (ispresent(p_mb.bandwidth))
|
---|
2727 | {
|
---|
2728 | for (var integer i:=0; i<sizeof(p_mb.bandwidth); i:=i+1) { //* "b= "
|
---|
2729 | v_result := v_result + 2+c_CRlen + lengthof(p_mb.bandwidth[i].modifier & " ") +
|
---|
2730 | lengthof(int2str(p_mb.bandwidth[i].bandwidth));
|
---|
2731 | }
|
---|
2732 | };
|
---|
2733 |
|
---|
2734 | for (var integer i:=0; i<sizeof(p_mb.times); i:=i+1) {
|
---|
2735 | v_result := v_result + 2+c_CRlen + lengthof(p_mb.times[i].time_field.start_time & " "
|
---|
2736 | & p_mb.times[i].time_field.stop_time);//* "t="
|
---|
2737 |
|
---|
2738 | if (ispresent(p_mb.times[i].time_repeat))
|
---|
2739 | {
|
---|
2740 | for (var integer j:=0; j<sizeof(p_mb.times[i].time_repeat); j:=j+1)
|
---|
2741 | {
|
---|
2742 | v_result := v_result + 2+c_CRlen + lengthof(int2str(p_mb.times[i].time_repeat[j].repeat_interval.time)); //* "r="
|
---|
2743 | if (ispresent(p_mb.times[i].time_repeat[j].repeat_interval.unit))
|
---|
2744 | {
|
---|
2745 | v_auxstring:=p_mb.times[i].time_repeat[j].repeat_interval.unit;
|
---|
2746 | v_result := v_result + 1 + lengthof(v_auxstring);
|
---|
2747 | };
|
---|
2748 |
|
---|
2749 | v_result := v_result + 1 + lengthof(int2str(p_mb.times[i].time_repeat[j].active.time));
|
---|
2750 | if (ispresent(p_mb.times[i].time_repeat[j].active.unit))
|
---|
2751 | {
|
---|
2752 | v_auxstring:=p_mb.times[i].time_repeat[j].active.unit;
|
---|
2753 | v_result := v_result + 1 + lengthof(v_auxstring);
|
---|
2754 | };
|
---|
2755 |
|
---|
2756 | for (var integer k:=0; k<sizeof(p_mb.times[i].time_repeat[j].offsets); k:=k+1)
|
---|
2757 | {
|
---|
2758 | v_result := v_result + 1 + lengthof(int2str(p_mb.times[i].time_repeat[j].offsets[k].time));
|
---|
2759 | if (ispresent(p_mb.times[i].time_repeat[j].offsets[k].unit))
|
---|
2760 | {
|
---|
2761 | v_auxstring:=p_mb.times[i].time_repeat[j].offsets[k].unit;
|
---|
2762 | v_result := v_result + 1 + lengthof(v_auxstring);
|
---|
2763 | };
|
---|
2764 | }
|
---|
2765 | }
|
---|
2766 | };
|
---|
2767 | };
|
---|
2768 |
|
---|
2769 | if (ispresent(p_mb.timezone_adjustments))
|
---|
2770 | {log("timezone adjustments have not been considered in SDP length calculation yet");
|
---|
2771 | }; //* "z="
|
---|
2772 |
|
---|
2773 | if (ispresent(p_mb.key)) {
|
---|
2774 | v_result := v_result + 2+c_CRlen + lengthof(p_mb.key.method); //* "k= "
|
---|
2775 | if (ispresent(p_mb.key.key))
|
---|
2776 | {v_auxstring:=p_mb.key.key; v_result := v_result + 1 + lengthof(v_auxstring);};
|
---|
2777 | };
|
---|
2778 | if (ispresent(p_mb.attributes)) {
|
---|
2779 | for (var integer i:=0; i<sizeof(p_mb.attributes); i:=i+1){ //* "a= "
|
---|
2780 | var integer v_len_con1 := f_SDPlength_attribute(p_mb.attributes[i]);
|
---|
2781 | v_result := v_result + v_len_con1;
|
---|
2782 | };
|
---|
2783 | }; //* "a="
|
---|
2784 |
|
---|
2785 | if (ispresent(p_mb.media_list))
|
---|
2786 | {
|
---|
2787 | for (var integer i:=0; i<sizeof(p_mb.media_list); i:=i+1){ //* "m= "
|
---|
2788 |
|
---|
2789 | //* for each media_field
|
---|
2790 | //* log("p_mb.media_list[i] ",p_mb.media_list[i]);
|
---|
2791 | v_result := v_result + 2+c_CRlen + lengthof(p_mb.media_list[i].media_field.media)
|
---|
2792 | + 1 + lengthof(int2str(p_mb.media_list[i].media_field.ports.port_number));
|
---|
2793 |
|
---|
2794 |
|
---|
2795 | if (ispresent(p_mb.media_list[i].media_field.ports.num_of_ports))
|
---|
2796 | {v_result := v_result + 1 + lengthof(int2str(p_mb.media_list[i].media_field.ports.num_of_ports));};
|
---|
2797 | v_result := v_result + 1 + lengthof(p_mb.media_list[i].media_field.transport);
|
---|
2798 | for (var integer j:=0; j<sizeof(p_mb.media_list[i].media_field.fmts); j:=j+1){
|
---|
2799 | v_result := v_result + 1 + lengthof(valueof(p_mb.media_list[i].media_field.fmts[j]));
|
---|
2800 | }
|
---|
2801 |
|
---|
2802 | if (ispresent(p_mb.media_list[i].information)) {
|
---|
2803 | v_auxstring:=p_mb.media_list[i].information;
|
---|
2804 | v_result := v_result + 2+c_CRlen + lengthof(v_auxstring); //* "i= "
|
---|
2805 | };
|
---|
2806 | if (ispresent(p_mb.media_list[i].connections)) {
|
---|
2807 | for (var integer j:=0; j<sizeof(p_mb.media_list[i].media_field.fmts); j:=j+1){
|
---|
2808 | var integer v_len_con2 := f_SDPlength_connection(p_mb.media_list[i].connections[j]);
|
---|
2809 | v_result := v_result + v_len_con2;
|
---|
2810 | }; //* end for
|
---|
2811 | };
|
---|
2812 | if (ispresent(p_mb.media_list[i].bandwidth)) { //* "b= "
|
---|
2813 | v_result := v_result + 2+c_CRlen + lengthof(p_mb.media_list[i].bandwidth.modifier)
|
---|
2814 | + 1 + lengthof(int2str(p_mb.media_list[i].bandwidth.bandwidth));
|
---|
2815 | };
|
---|
2816 | if (ispresent(p_mb.media_list[i].key)) { //* "k= "
|
---|
2817 | v_result := v_result + 1 + lengthof(p_mb.media_list[i].key.method);
|
---|
2818 | if (ispresent(p_mb.media_list[i].key.key)) {
|
---|
2819 | v_auxstring := p_mb.media_list[i].key.key;
|
---|
2820 | v_result := v_result + 1 + lengthof(v_auxstring);
|
---|
2821 | };
|
---|
2822 | };
|
---|
2823 | if (ispresent(p_mb.media_list[i].attributes)) {
|
---|
2824 | for (var integer j:=0; j<sizeof(p_mb.media_list[i].attributes); j:=j+1){ //* "a= "
|
---|
2825 | var integer v_len_attr := f_SDPlength_attribute(p_mb.media_list[i].attributes[j]);
|
---|
2826 | v_result := v_result + v_len_attr;
|
---|
2827 | } //* end for j
|
---|
2828 | };
|
---|
2829 | }; //* end for i
|
---|
2830 | }; //* end if media_list
|
---|
2831 |
|
---|
2832 | return v_result;
|
---|
2833 | };//* end function f_SDPlength
|
---|
2834 |
|
---|
2835 | function f_SDPlength_connection(SDP_connection p_element) return integer //* "c="
|
---|
2836 | {
|
---|
2837 | var integer v_result:=0;
|
---|
2838 | var charstring v_auxstring;
|
---|
2839 | v_result := v_result + 2+c_CRlen + lengthof(p_element.net_type & " " &
|
---|
2840 | p_element.addr_type & " " &
|
---|
2841 | p_element.conn_addr.addr);
|
---|
2842 | if (ispresent(p_element.conn_addr.ttl))
|
---|
2843 | {v_result := v_result + 1 + lengthof(int2str(p_element.conn_addr.ttl));};
|
---|
2844 | if (ispresent(p_element.conn_addr.num_of_addr))
|
---|
2845 | {v_result := v_result + 1 + lengthof(int2str(p_element.conn_addr.num_of_addr));};
|
---|
2846 | return v_result
|
---|
2847 | } //* f_SDPlength_connection
|
---|
2848 |
|
---|
2849 | function f_SDPlength_attribute(SDP_attribute p_element) return integer //* "a="
|
---|
2850 | {
|
---|
2851 | var integer v_result:=0;
|
---|
2852 | var charstring v_auxstring;
|
---|
2853 | if (ischosen(p_element.cat)) {v_result := v_result + 2+c_CRlen + lengthof("cat:" & p_element.cat.attr_value)};
|
---|
2854 | if (ischosen(p_element.keywds)) {v_result := v_result + 2+c_CRlen + lengthof("keywds:" & p_element.keywds.attr_value)};
|
---|
2855 | if (ischosen(p_element.tool)) {v_result := v_result + 2+c_CRlen + lengthof("tool:" & p_element.tool.attr_value)};
|
---|
2856 | if (ischosen(p_element.ptime)) {v_result := v_result + 2+c_CRlen + lengthof("ptime:" & p_element.ptime.attr_value)};
|
---|
2857 | if (ischosen(p_element.recvonly)) {v_result := v_result + 2+c_CRlen + lengthof("recvonly")};
|
---|
2858 | if (ischosen(p_element.sendrecv)) {v_result := v_result + 2+c_CRlen + lengthof("sendrecv")};
|
---|
2859 | if (ischosen(p_element.sendonly)) {v_result := v_result + 2+c_CRlen + lengthof("sendonly")};
|
---|
2860 | if (ischosen(p_element.inactive)) {v_result := v_result + 2+c_CRlen + lengthof("inactive")};
|
---|
2861 | if (ischosen(p_element.orient)) {v_result := v_result + 2+c_CRlen + lengthof("orient:" & p_element.orient.attr_value)};
|
---|
2862 | if (ischosen(p_element.sdp_type)) {v_result := v_result + 2+c_CRlen + lengthof("type:" & p_element.sdp_type.attr_value)};
|
---|
2863 | if (ischosen(p_element.charset)) {v_result := v_result + 2+c_CRlen + lengthof("charset" & p_element.charset.attr_value)};
|
---|
2864 | if (ischosen(p_element.sdplang)) {v_result := v_result + 2+c_CRlen + lengthof("sdplang:" & p_element.sdplang.attr_value)};
|
---|
2865 | if (ischosen(p_element.lang)) {v_result := v_result + 2+c_CRlen + lengthof("lang:" & p_element.lang.attr_value)};
|
---|
2866 | if (ischosen(p_element.framerate)) {v_result := v_result + 2+c_CRlen + lengthof("framerate:" & p_element.framerate.attr_value)};
|
---|
2867 | if (ischosen(p_element.quality)) {v_result := v_result + 2+c_CRlen + lengthof("quality:" & p_element.quality.attr_value)};
|
---|
2868 | if (ischosen(p_element.fmtp)) {v_result := v_result + 2+c_CRlen + lengthof("fmtp:" & p_element.fmtp.attr_value)};
|
---|
2869 | if (ischosen(p_element.curr)) {v_result := v_result + 2+c_CRlen + lengthof("curr:" & p_element.curr.preconditionType & " "
|
---|
2870 | & p_element.curr.statusType & " " & p_element.curr.direction)};
|
---|
2871 | if (ischosen(p_element.des)) {v_result := v_result + 2+c_CRlen + lengthof("des:" & p_element.des.preconditionType & " "
|
---|
2872 | & p_element.des.strength & " " & p_element.des.statusType & " " & p_element.des.direction)};
|
---|
2873 | if (ischosen(p_element.conf)) {v_result := v_result + 2+c_CRlen + lengthof("conf:" & p_element.conf.preconditionType & " "
|
---|
2874 | & p_element.des.statusType & " " & p_element.des.direction)};
|
---|
2875 | if (ischosen(p_element.rtpmap)) {v_result := v_result + 2+c_CRlen + lengthof("rtpmap:" & p_element.rtpmap.attr_value)};
|
---|
2876 | if (ischosen(p_element.rtcp)) {v_result := v_result + 2+c_CRlen + lengthof("rtcp:" & p_element.rtcp.attr_value)};
|
---|
2877 | if (ischosen(p_element.unknown))
|
---|
2878 | {v_result := v_result + 2+c_CRlen + lengthof(p_element.unknown.name);
|
---|
2879 | if (ispresent(p_element.unknown.attr_value))
|
---|
2880 | {var charstring aux := p_element.unknown.attr_value;
|
---|
2881 | v_result := v_result + lengthof(":" & p_element.unknown.attr_value);
|
---|
2882 | };
|
---|
2883 | };
|
---|
2884 | //* log("axr: length attribute=", v_result);
|
---|
2885 | return v_result
|
---|
2886 | } //* f_SDPlength_attribute
|
---|
2887 |
|
---|
2888 | } //* group SDPlen_calculation
|
---|
2889 |
|
---|
2890 | group XML_Len_calculation{
|
---|
2891 |
|
---|
2892 | /**
|
---|
2893 | * @desc Declaration of external functions to calculate length of message bodies
|
---|
2894 | * switching of internal or external functions are made by boolean module parameter/PIXIT
|
---|
2895 | * USE_FX_FOR_XML_LENGTH declared at top of this module
|
---|
2896 | */
|
---|
2897 | external function fx_calculateXMLMessageLen(XMLMessage p_mb) return integer;
|
---|
2898 | external function fx_calculateXMLBodyLen(XmlBody p_mb) return integer;
|
---|
2899 |
|
---|
2900 | /**
|
---|
2901 | *
|
---|
2902 | * @desc Calculation of XML length
|
---|
2903 | * @param p_mb contain XML message
|
---|
2904 | * @return xml_length
|
---|
2905 | */
|
---|
2906 | function f_XMLlength(XMLMessage p_mb, boolean p_ext_func) return integer
|
---|
2907 | {
|
---|
2908 | var integer v_result:=0;
|
---|
2909 |
|
---|
2910 | if ( p_ext_func){
|
---|
2911 | v_result := fx_calculateXMLMessageLen(p_mb);
|
---|
2912 | }else{
|
---|
2913 | if (ispresent(p_mb.header)){
|
---|
2914 | v_result := f_XMLHeader_Length(p_mb.header);
|
---|
2915 | }
|
---|
2916 |
|
---|
2917 | //false given, because decision of external function usage is done in first if statement
|
---|
2918 | v_result := v_result + f_XMLBody_Length(p_mb.body, false);
|
---|
2919 | }
|
---|
2920 | return v_result
|
---|
2921 | } //* f_XMLlength
|
---|
2922 |
|
---|
2923 | /**
|
---|
2924 | *
|
---|
2925 | * @desc Calculation of XML header length
|
---|
2926 | * @param p_mh contain XML header
|
---|
2927 | * @return xml_header_length
|
---|
2928 | */
|
---|
2929 | function f_XMLHeader_Length(XmlHeader p_mh) return integer
|
---|
2930 | {
|
---|
2931 | var integer v_result:=0;
|
---|
2932 |
|
---|
2933 | //*<?xml version="1.0" encoding="UTF-8"?>\n len=39*/
|
---|
2934 | //* 2 3 1 1 1 1 2 1*/
|
---|
2935 |
|
---|
2936 | v_result:=2+3+lengthof(" version=")+1+lengthof(p_mh.version)+1; //<?xml version="1.0"
|
---|
2937 |
|
---|
2938 | if (ispresent(p_mh.encoding)){
|
---|
2939 |
|
---|
2940 | v_result:=v_result+lengthof(" encoding=")+1+lengthof(p_mh.encoding)+1; // encoding="UTF-8"
|
---|
2941 | }
|
---|
2942 |
|
---|
2943 | if (ispresent(p_mh.anyAttributes)){
|
---|
2944 | for (var integer i:=0; i<sizeof(p_mh.anyAttributes); i:=i+1){
|
---|
2945 | v_result := v_result + 1 + lengthof(p_mh.anyAttributes[i].name)+ 2 + lengthof(p_mh.anyAttributes[i].val) + 1;
|
---|
2946 | //vresult + " "(1)+ length(name) + "=\""(2) + length(val) + "\""(1)
|
---|
2947 | }
|
---|
2948 | }
|
---|
2949 |
|
---|
2950 | v_result:=v_result+2+1; //?>\n
|
---|
2951 |
|
---|
2952 | return v_result
|
---|
2953 | } //* f_XMLHeaderLength
|
---|
2954 |
|
---|
2955 | /**
|
---|
2956 | *
|
---|
2957 | * @desc Calculation of XML body length
|
---|
2958 | * @param p_mb contain XML body
|
---|
2959 | * @return xml_length
|
---|
2960 | */
|
---|
2961 | function f_XMLBody_Length(XmlBody p_mb, boolean p_ext_func) return integer
|
---|
2962 | {
|
---|
2963 | var integer v_result:=0;
|
---|
2964 |
|
---|
2965 | if ( p_ext_func){
|
---|
2966 | v_result := fx_calculateXMLBodyLen(p_mb);
|
---|
2967 | }else{
|
---|
2968 | // assume ConferenceInfo ONLY in the XML message body
|
---|
2969 | if (ischosen(p_mb.conferenceInfo))
|
---|
2970 | {
|
---|
2971 | v_result := f_XMLBody_ConferenceInfo_Length(p_mb.conferenceInfo);
|
---|
2972 | };
|
---|
2973 |
|
---|
2974 | // assume CUG ONLY in the XML message body
|
---|
2975 | if (ischosen(p_mb.cug))
|
---|
2976 | {
|
---|
2977 | v_result := f_XMLBody_Cug_Length(p_mb.cug);
|
---|
2978 | };
|
---|
2979 |
|
---|
2980 | // assume MCID ONLY in the XML message body
|
---|
2981 | if (ischosen(p_mb.mcid))
|
---|
2982 | {
|
---|
2983 | v_result := f_XMLBody_Mcid_Length(p_mb.mcid);
|
---|
2984 | };
|
---|
2985 |
|
---|
2986 | // assume PSTNTransit ONLY in the XML message body
|
---|
2987 | if (ischosen(p_mb.pstnTransit))
|
---|
2988 | {
|
---|
2989 | v_result := f_XMLBody_PSTNTransit_Length(p_mb.pstnTransit);
|
---|
2990 | };
|
---|
2991 |
|
---|
2992 | // assume Simservs ONLY in the XML message body
|
---|
2993 | if (ischosen(p_mb.simservs))
|
---|
2994 | {
|
---|
2995 | v_result := f_XMLBody_Simservs_Length(p_mb.simservs);
|
---|
2996 | };
|
---|
2997 |
|
---|
2998 | // assume CDIV ONLY in the XML message body
|
---|
2999 | if (ischosen(p_mb.cdivn))
|
---|
3000 | {
|
---|
3001 | v_result := f_XMLBody_CDIV_Length(p_mb.cdivn);
|
---|
3002 | };
|
---|
3003 |
|
---|
3004 | // assume ICB ONLY in the XML message body
|
---|
3005 | if (ischosen(p_mb.icb))
|
---|
3006 | {
|
---|
3007 | v_result := f_XMLBody_ICB_Length(p_mb.icb);
|
---|
3008 | };
|
---|
3009 |
|
---|
3010 | // assume OCB ONLY in the XML message body
|
---|
3011 | if (ischosen(p_mb.ocb))
|
---|
3012 | {
|
---|
3013 | v_result := f_XMLBody_OCB_Length(p_mb.ocb);
|
---|
3014 | };
|
---|
3015 |
|
---|
3016 | // assume ResourceLists ONLY in the XML message body
|
---|
3017 | if (ischosen(p_mb.resourceLists))
|
---|
3018 | {
|
---|
3019 | v_result := f_XMLBody_ResourceList_Length(p_mb.resourceLists);
|
---|
3020 | };
|
---|
3021 |
|
---|
3022 | // assume Ims3GPP ONLY in the XML message body
|
---|
3023 | if (ischosen(p_mb.ims3gpp))
|
---|
3024 | {
|
---|
3025 | v_result := f_XMLBody_Ims3GPP_Length(p_mb.ims3gpp);
|
---|
3026 | };
|
---|
3027 |
|
---|
3028 | /** Add aditional checks regarding to new variants,
|
---|
3029 | * also implement appropriate function for calculation
|
---|
3030 | */
|
---|
3031 | }
|
---|
3032 | return v_result
|
---|
3033 | } //* f_XMLBodyLength
|
---|
3034 |
|
---|
3035 | group XMLBodies_calculation{
|
---|
3036 |
|
---|
3037 | /**
|
---|
3038 | *
|
---|
3039 | * @desc Calculation of XML ConferenceInfo element length
|
---|
3040 | * @param p_mb contain XML ConfInfo body
|
---|
3041 | * @return xml_length
|
---|
3042 | */
|
---|
3043 | function f_XMLBody_ConferenceInfo_Length(Conference_info p_mb) return integer
|
---|
3044 | {
|
---|
3045 | var integer v_result:=0;
|
---|
3046 | //TODO: write function body
|
---|
3047 | return v_result
|
---|
3048 | } //* f_XMLBody_ConferenceInfo_Length
|
---|
3049 |
|
---|
3050 | /**
|
---|
3051 | *
|
---|
3052 | * @desc Calculation of XML CUG element length
|
---|
3053 | * @param p_mb contain XML CUG body
|
---|
3054 | * @return xml_length
|
---|
3055 | */
|
---|
3056 | function f_XMLBody_Cug_Length(Cug p_mb) return integer
|
---|
3057 | {
|
---|
3058 | var integer v_result:=0;
|
---|
3059 | //TODO: write function body
|
---|
3060 | return v_result
|
---|
3061 | } //* f_XMLBody_Cug_Length
|
---|
3062 |
|
---|
3063 | /**
|
---|
3064 | *
|
---|
3065 | * @desc Calculation of XML MCID element length
|
---|
3066 | * @param p_mb contain XML MCID body
|
---|
3067 | * @return xml_length
|
---|
3068 | */
|
---|
3069 | function f_XMLBody_Mcid_Length(Mcid p_mb) return integer
|
---|
3070 | {
|
---|
3071 | var integer v_result:=0;
|
---|
3072 |
|
---|
3073 | if (ischosen(p_mb.choice.request)){
|
---|
3074 |
|
---|
3075 | }
|
---|
3076 |
|
---|
3077 | if (ischosen(p_mb.choice.response)){
|
---|
3078 |
|
---|
3079 | }
|
---|
3080 |
|
---|
3081 | return v_result
|
---|
3082 | } //* f_XMLBody_Mcid_Length
|
---|
3083 |
|
---|
3084 | /**
|
---|
3085 | *
|
---|
3086 | * @desc Calculation of XML PSTNTransit element length
|
---|
3087 | * @param p_mb contain XML PSTNTransit body
|
---|
3088 | * @return xml_length
|
---|
3089 | */
|
---|
3090 | function f_XMLBody_PSTNTransit_Length(PSTN_transit p_mb) return integer
|
---|
3091 | {
|
---|
3092 | var integer v_result:=0;
|
---|
3093 | //TODO: write function body
|
---|
3094 | return v_result
|
---|
3095 | } //* f_XMLBody_PSTNTransit_Length
|
---|
3096 |
|
---|
3097 | /** @desc Calculation of XML Simservs element length
|
---|
3098 | * @param p_mb contain XML Simservs body
|
---|
3099 | * @return xml_length
|
---|
3100 | */
|
---|
3101 | function f_XMLBody_Simservs_Length(Simservs p_mb) return integer
|
---|
3102 | {
|
---|
3103 | var integer v_result:=0;
|
---|
3104 | //TODO: write function body
|
---|
3105 | return v_result
|
---|
3106 | } //* f_XMLBody_Simservs_Length
|
---|
3107 |
|
---|
3108 | /** @desc Calculation of XML CDIV element length
|
---|
3109 | * @param p_mb contain XML CDIV body
|
---|
3110 | * @return xml_length
|
---|
3111 | */
|
---|
3112 | function f_XMLBody_CDIV_Length(Comm_div_info p_mb) return integer
|
---|
3113 | {
|
---|
3114 | var integer v_result:=0;
|
---|
3115 | //TODO: write function body
|
---|
3116 | return v_result
|
---|
3117 | } //* f_XMLBody_CDIV_Length
|
---|
3118 |
|
---|
3119 | /** @desc Calculation of XML ICB length
|
---|
3120 | * @param p_mb contain XML ICB body
|
---|
3121 | * @return xml_length
|
---|
3122 | */
|
---|
3123 | function f_XMLBody_ICB_Length(Incoming_communication_barring p_mb) return integer
|
---|
3124 | {
|
---|
3125 | var integer v_result:=0;
|
---|
3126 | //TODO: write function body
|
---|
3127 | return v_result
|
---|
3128 | } //* f_XMLBody_ICB_Length
|
---|
3129 |
|
---|
3130 | /** @desc Calculation of XML OCB length
|
---|
3131 | * @param p_mb contain XML OCB body
|
---|
3132 | * @return xml_length
|
---|
3133 | */
|
---|
3134 | function f_XMLBody_OCB_Length(Outgoing_communication_barring p_mb) return integer
|
---|
3135 | {
|
---|
3136 | var integer v_result:=0;
|
---|
3137 | //TODO: write function body
|
---|
3138 | return v_result
|
---|
3139 | } //* f_XMLBody_OCB_Length
|
---|
3140 |
|
---|
3141 | /** @desc Calculation of XML ResourceList length
|
---|
3142 | * @param p_mb contain XML ResourceList body
|
---|
3143 | * @return xml_length
|
---|
3144 | */
|
---|
3145 | function f_XMLBody_ResourceList_Length(Resource_lists p_mb) return integer
|
---|
3146 | {
|
---|
3147 | var integer v_result:=0;
|
---|
3148 | //TODO: write function body
|
---|
3149 | return v_result
|
---|
3150 | } //* f_XMLBody_ResourceList_Length
|
---|
3151 |
|
---|
3152 | /** @desc Calculation of XML Ims3GPP length
|
---|
3153 | * @param p_mb contain XML Ims3GPP body
|
---|
3154 | * @return xml_length
|
---|
3155 | */
|
---|
3156 | function f_XMLBody_Ims3GPP_Length(Ims_3gpp p_mb) return integer
|
---|
3157 | {
|
---|
3158 | var integer v_result:=0;
|
---|
3159 | //TODO: write function body
|
---|
3160 | return v_result
|
---|
3161 | } //* f_XMLBody_Ims3GPP_Length
|
---|
3162 |
|
---|
3163 | } //* XMLBodies_calculation
|
---|
3164 |
|
---|
3165 | }//* group XMLlen_calculation
|
---|
3166 |
|
---|
3167 | group MIME_Len_calculation{
|
---|
3168 | /**
|
---|
3169 | *
|
---|
3170 | * @desc Calculation of MIME length
|
---|
3171 | * @param p_mb contain MIME message
|
---|
3172 | * @return xml_length
|
---|
3173 | */
|
---|
3174 | function f_MIMElength(MIME_Message p_mb) return integer
|
---|
3175 | {
|
---|
3176 | var integer v_result:=2; //0d0a
|
---|
3177 |
|
---|
3178 | v_result := v_result + lengthof(p_mb.boundary) + 2/*0d0a*/;
|
---|
3179 |
|
---|
3180 | for (var integer i:=0; i<sizeof(p_mb.mimeEncapsulatedList); i:=i+1){
|
---|
3181 |
|
---|
3182 | v_result := v_result + lengthof("Content-Type: ")+ lengthof(p_mb.mimeEncapsulatedList[i].content_type) + 2/*0d0a*/ ;
|
---|
3183 |
|
---|
3184 | if (ispresent(p_mb.mimeEncapsulatedList[i].content_disposition)){
|
---|
3185 | v_result := v_result + lengthof("Content-Disposition: ")+ lengthof(p_mb.mimeEncapsulatedList[i].content_disposition) + 2/*0d0a*/ ;
|
---|
3186 | }
|
---|
3187 |
|
---|
3188 | //v_result := v_result +2/*0d0a*/; ??? to check
|
---|
3189 |
|
---|
3190 | // assume SDP_Message ONLY in the message body
|
---|
3191 | if (ischosen(p_mb.mimeEncapsulatedList[i].mime_encapsulated_part.sdpMessageBody))
|
---|
3192 | {
|
---|
3193 | v_result := v_result + f_SDPlength(p_mb.mimeEncapsulatedList[i].mime_encapsulated_part.sdpMessageBody);
|
---|
3194 | };
|
---|
3195 |
|
---|
3196 | // assume XML_Body ONLY in the message body
|
---|
3197 | if (ischosen(p_mb.mimeEncapsulatedList[i].mime_encapsulated_part.xmlBody))
|
---|
3198 | {
|
---|
3199 | v_result := v_result + f_XMLBody_Length(p_mb.mimeEncapsulatedList[i].mime_encapsulated_part.xmlBody, USE_FX_FOR_XML_LENGTH );
|
---|
3200 | };
|
---|
3201 |
|
---|
3202 | //assume XML_Message ONLY in the message body
|
---|
3203 | if (ischosen(p_mb.mimeEncapsulatedList[i].mime_encapsulated_part.xmlMessage))
|
---|
3204 | {
|
---|
3205 | v_result := v_result + f_XMLlength(p_mb.mimeEncapsulatedList[i].mime_encapsulated_part.xmlMessage, USE_FX_FOR_XML_LENGTH );
|
---|
3206 | };
|
---|
3207 |
|
---|
3208 | //v_result := v_result +2/*0d0a*/; ??? to check
|
---|
3209 | }
|
---|
3210 |
|
---|
3211 | //v_result := v_result +2/*0d0a*/; ??? to check
|
---|
3212 |
|
---|
3213 | return v_result
|
---|
3214 | } //* f_MIMElength
|
---|
3215 |
|
---|
3216 | }//* group MIMElen_calculation
|
---|
3217 |
|
---|
3218 | group TextPlain_Len_calculation{
|
---|
3219 | /**
|
---|
3220 | *
|
---|
3221 | * @desc Calculation of messagebody-textplain type length
|
---|
3222 | * @param p_mb contain textplain message
|
---|
3223 | * @return lenght
|
---|
3224 | */
|
---|
3225 | function f_TextPlainLength(MessageBody p_mb) return integer
|
---|
3226 | {
|
---|
3227 | var integer v_result:=2; //0d0a
|
---|
3228 |
|
---|
3229 | v_result:=v_result+lengthof(p_mb.textplain);
|
---|
3230 |
|
---|
3231 | return v_result;
|
---|
3232 | }//* end function f_TextPlainLength
|
---|
3233 |
|
---|
3234 | }//*end group TextPlainLen_calculation
|
---|
3235 |
|
---|
3236 | }//*group MessageBody_Calculation
|
---|
3237 |
|
---|
3238 |
|
---|
3239 | group GiveHeaders {
|
---|
3240 | /**
|
---|
3241 | *
|
---|
3242 | * @desc Return component variable of recordRoute header if vc_boo_recordRoute is true
|
---|
3243 | * @return component variable of recordRoute header
|
---|
3244 | */
|
---|
3245 |
|
---|
3246 | function f_recordroute() runs on SipComponent return template RecordRoute
|
---|
3247 | {
|
---|
3248 | if (vc_boo_recordRoute)
|
---|
3249 | {return vc_recordRoute}
|
---|
3250 | else {return(omit)}
|
---|
3251 | }
|
---|
3252 |
|
---|
3253 | /**
|
---|
3254 | *
|
---|
3255 | * @desc Return component variable of Route header if vc_boo_route is true
|
---|
3256 | * @return component variable of recordRoute header
|
---|
3257 | */
|
---|
3258 | function f_route() runs on SipComponent return template RecordRoute
|
---|
3259 | {
|
---|
3260 | if (vc_boo_route)
|
---|
3261 | {return vc_route} //* TODO: Route header need to be in reverse order than RecordRoute, question of return value - RecordRoute
|
---|
3262 | else {return(omit)}
|
---|
3263 | }
|
---|
3264 |
|
---|
3265 | } //* end group GiveHeaders
|
---|
3266 |
|
---|
3267 | group others {
|
---|
3268 |
|
---|
3269 | /*
|
---|
3270 | *
|
---|
3271 | * @desc function combines two comma parameter lists
|
---|
3272 | * @param p_list1 first list
|
---|
3273 | * @param p_list2 second list
|
---|
3274 | * @return comma parameter list that contains parameters from both input lists
|
---|
3275 | * @verdict
|
---|
3276 | */
|
---|
3277 |
|
---|
3278 | function f_merge_CommaParam_List(CommaParam_List p_list1, CommaParam_List p_list2) return template CommaParam_List
|
---|
3279 | { var CommaParam_List p_result;
|
---|
3280 | var integer limit1 := sizeof(p_list1);
|
---|
3281 | for (var integer i:=0; i<limit1; i:=i+1) {
|
---|
3282 | p_result[i] := p_list1[i]
|
---|
3283 | };
|
---|
3284 | for (var integer i:=limit1; i<limit1+sizeof(p_list2); i:=i+1) {
|
---|
3285 | p_result[i] := p_list2[i]
|
---|
3286 | };
|
---|
3287 | return p_result
|
---|
3288 | }
|
---|
3289 |
|
---|
3290 | } //* end group others
|
---|
3291 |
|
---|
3292 | } //* group TemplatePreparationFunctions
|
---|
3293 |
|
---|
3294 |
|
---|
3295 | } //* end module LibSip_Templates
|
---|