1sip_get_contact_diSsepslsaiyo_nnaImnei(t3iSaItPi)on ProtocolsLiipb_rgaerty_cFounntcatcito_ndsisplay_name(3SIP)
2
3
4

NAME

6       sip_get_contact_display_name,                sip_get_from_display_name,
7       sip_get_to_display_name, sip_get_from_tag, sip_get_to_tag, sip_get_cal‐
8       lid,            sip_get_callseq_num,            sip_get_callseq_method,
9       sip_get_via_sent_by_host,                     sip_get_via_sent_by_port,
10       sip_get_via_sent_protocol_version,      sip_get_via_sent_protocol_name,
11       sip_get_via_sent_transport, sip_get_maxforward, sip_get_content_length,
12       sip_get_content_type,     sip_get_content_sub_type,    sip_get_content,
13       sip_get_accept_type,    sip_get_accept_sub_type,    sip_get_accept_enc,
14       sip_get_accept_lang,    sip_get_alert_info_uri,   sip_get_allow_method,
15       sip_get_min_expires, sip_get_mime_version, sip_get_org,  sip_get_prior‐
16       ity,       sip_get_replyto_display_name,       sip_get_replyto_uri_str,
17       sip_get_date_time,        sip_get_date_day,         sip_get_date_month,
18       sip_get_date_wkday,      sip_get_date_year,      sip_get_date_timezone,
19       sip_get_content_disp,   sip_get_content_enc,    sip_get_error_info_uri,
20       sip_get_expires,  sip_get_require,  sip_get_subject, sip_get_supported,
21       sip_get_tstamp_delay,       sip_get_unsupported,        sip_get_server,
22       sip_get_user_agent,     sip_get_warning_code,    sip_get_warning_agent,
23       sip_get_warning_text,    sip_get_call_info_uri,    sip_get_in_reply_to,
24       sip_get_retry_after_time,                     sip_get_retry_after_cmts,
25       sip_get_rack_resp_num,   sip_get_rack_cseq_num,    sip_get_rack_method,
26       sip_get_rseq_resp_num,   sip_get_priv_value,   sip_get_passertedid_dis‐
27       play_name,    sip_get_passertedid_uri_str,    sip_get_ppreferredid_dis‐
28       play_name,     sip_get_ppreferredid_uri_str,     sip_get_author_scheme,
29       sip_get_author_param, sip_get_authen_info, sip_get_proxy_authen_scheme,
30       sip_get_proxy_authen_param,                sip_get_proxy_author_scheme,
31       sip_get_proxy_author_param,                      sip_get_proxy_require,
32       sip_get_www_authen_scheme,                    sip_get_www_authen_param,
33       sip_get_allow_events,  sip_get_event,  sip_get_substate,   sip_get_con‐
34       tent_lang,         sip_get_tstamp_value,         sip_get_route_uri_str,
35       sip_get_route_display_name,                    sip_get_contact_uri_str,
36       sip_get_from_uri_str,   sip_get_to_uri_str  -  obtain  header  specific
37       attributes
38

SYNOPSIS

40       cc [ flag ... ] file ... -lsip [ library ... ]
41       #include <sip.h>
42
43       const sip_str_t *sip_get_contact_display_name(sip_header_value_t value,
44            int *error);
45
46
47       const sip_str_t *sip_get_from_display_name(sip_msg_t sip_msg,
48            int *error);
49
50
51       const sip_str_t *sip_get_to_display_name(sip_msg_t sip_msg,
52            int *error);
53
54
55       const sip_str_t *sip_get_contact_uri_str(sip_header_value_t value,
56            int *error);
57
58
59       const sip_str_t *sip_get_from_uri_str(sip_msg_t sip_msg,
60            int *error);
61
62
63       const sip_str_t *sip_get_to_uri_str(sip_msg_t sip_msg,
64            int *error);
65
66
67       const sip_str_t *sip_get_from_tag(sip_msg_t sip_msg,
68            int *error);
69
70
71       const sip_str_t *sip_get_to_tag(sip_msg_t sip_msg,
72            int *error);
73
74
75       const sip_str_t *sip_get_callid(sip_msg_t sip_msg,
76            int *error);
77
78
79       int sip_get_callseq_num(sip_msg_t sip_msg,
80            int *error);
81
82
83       sip_method_t sip_get_callseq_method(sip_msg_t sip_msg,
84            int *error);
85
86
87       const sip_str_t *sip_get_via_sent_by_host(sip_header_value_t value,
88            int *error);
89
90
91       int sip_get_via_sent_by_port (sip_header_value_t value,
92            int *error);
93
94
95       const sip_str_t *sip_get_via_sent_protocol_version
96            (sip_header_value_t value, int *error);
97
98
99       const sip_str_t *sip_get_via_sent_transport(sip_header_value_t value,
100            int *error);
101
102
103       int sip_get_maxforward(sip_msg_t sip_msg,
104            int *error);
105
106
107       int sip_get_content_length(sip_msg_t sip_msg,
108            int *error);
109
110
111       const sip_str_t *sip_get_content_type(sip_msg_t sip_msg,
112            int *error);
113
114
115       const sip_str_t *sip_get_content_sub_type(sip_msg_t sip_msg,
116            int *error);
117
118
119       char *sip_get_content(sip_msg_t sip_msg,
120            int *error);
121
122
123       const sip_str_t *sip_get_accept_type(sip_header_value_t value,
124            int *error);
125
126
127       const sip_str_t *sip_get_accept_sub_type(sip_header_value_t value,
128            int *error);
129
130
131       const sip_str_t *sip_get_accept_enc(sip_header_value_t value,
132            int *error);
133
134
135       const sip_str_t *sip_get_accept_lang(sip_header_value_t value,
136            int *error);
137
138
139       const sip_str_t *sip_get_alert_info_uri(sip_header_value_t value,
140            int *error);
141
142
143       sip_method_t sip_get_allow_method(sip_header_value_t value,
144            int *error);
145
146
147       int sip_get_min_expire(sip_msg_t sip_msg,
148            int *error);
149
150
151       const sip_str_t *sip_get_mime_version(sip_msg_t sip_msg,
152            int *error);
153
154
155       const sip_str_t *sip_get_org(sip_msg_t sip_msg,
156            int *error);
157
158
159       const sip_str_t *sip_get_priority(sip_msg_t sip_msg,
160            int *error);
161
162
163       const sip_str_t *sip_get_replyto_display_name(sip_msg_t sip_msg,
164            int *error);
165
166
167       const sip_str_t *sip_get_replyto_uri_str(sip_msg_t sip_msg,
168            int *error);
169
170
171       const sip_str_t *sip_get_date_time(sip_msg_t sip_msg,
172            int *error);
173
174
175       int sip_get_date_day(sip_msg_t sip_msg,
176            int *error);
177
178
179       const sip_str_t *sip_get_date_month(sip_msg_t sip_msg,
180            int *error);
181
182
183       int sip_get_date_year(sip_msg_t sip_msg,
184            int *error);
185
186
187       const sip_str_t *sip_get_date_wkday(sip_msg_t sip_msg,
188            int *error);
189
190
191       const sip_str_t *sip_get_date_timezone(sip_msg_t sip_msg,
192            int *error);
193
194
195       const sip_str_t *sip_get_content_disp(sip_msg_t sip_msg,
196            int *error);
197
198
199       const sip_str_t *sip_get_content_enc(sip_header_value_t value,
200            int *error);
201
202
203       const sip_str_t *sip_get_error_info_uri(sip_header_value_t value,
204            int *error);
205
206
207       int sip_get_expires(sip_msg_t sip_msg,
208            int *error);
209
210
211       const sip_str_t *sip_get_require(sip_header_value_t value,
212            int *error);
213
214
215       const sip_str_t *sip_get_subject(sip_msg_t sip_msg,
216            int *error);
217
218
219       const sip_str_t *sip_get_supported(sip_header_value_t value,
220            int *error);
221
222
223       const sip_str_t *sip_get_tstamp_delay(sip_msg_t sip_msg,
224            int *error);
225
226
227       const sip_str_t *sip_get_unsupported(sip_header_value_t value,
228            int *error);
229
230
231       const sip_str_t *sip_get_server(sip_msg_t sip_msg,
232            int *error);
233
234
235       const sip_str_t *sip_get_user_agent(sip_msg_t sip_msg,
236            int *error);
237
238
239       int sip_get_warning_code(sip_header_value_t value,
240            int *error);
241
242
243       const sip_str_t *sip_get_warning_agent(sip_header_value_t value,
244            int *error);
245
246
247       const sip_str_t *sip_get_warning_text(sip_header_value_t value,
248            int *error);
249
250
251       const sip_str_t *sip_get_call_info_uri(sip_header_value_t value,
252            int *error);
253
254
255       const sip_str_t *sip_get_in_reply_to(sip_header_value_t value,
256            int *error);
257
258
259       int sip_get_retry_after_time(sip_msg_t sip_msg,
260            int *error);
261
262
263       const sip_str_t *sip_get_retry_after_cmts(sip_msg_t sip_msg,
264            int *error);
265
266
267       const sip_str_t *sip_get_passertedid_display_name
268            (sip_header_value_t value, int *error);
269
270
271       const sip_str_t *sip_get_passertedid_uri_str
272            (sip_header_value_t value, int *error);
273
274
275       int sip_get_rack_resp_num(sip_msg_t sip_msg,
276            int *error);
277
278
279       int sip_get_rack_cseq_num(sip_msg_t sip_msg, int *error);
280
281
282       sip_method_t sip_get_rack_method(sip_msg_t sip_msg, int *error);
283
284
285       int sip_get_rseq_resp_num(sip_msg_t sip_msg,
286            int *error);
287
288
289       const sip_str_t *sip_get_priv_value(sip_header_value_t value,
290            int *error);
291
292
293       const sip_str_t *sip_get_author_scheme(sip_msg_t sip_msg,
294            int *error);
295
296
297       const sip_str_t *sip_get_author_param(sip_msg_t sip_msg,
298            char *name, int *error);
299
300
301       const sip_str_t *sip_get_authen_info(sip_header_value_t value,
302            int *error);
303
304
305       const sip_str_t *sip_get_proxy_authen_scheme(sip_msg_t msg,
306            int *error);
307
308
309       const sip_str_t *sip_get_proxy_authen_param(sip_msg_t sip_msg,
310            char *name, int *error);
311
312
313       const sip_str_t *sip_get_proxy_author_scheme(sip_msg_t msg,
314            int *error);
315
316
317       const sip_str_t *sip_get_proxy_author_param(sip_msg_t sip_msg,
318            char *name, int *error);
319
320
321       const sip_str_t *sip_get_proxy_require(sip_header_value_t value,
322            int *error);
323
324
325       const sip_str_t *sip_get_www_authen_scheme(sip_msg_t msg,
326            int *error);
327
328
329       const sip_str_t *sip_get_www_authen_param(sip_msg_t sip_msg,
330            char *name, int *error);
331
332
333       const sip_str_t *sip_get_allow_events(sip_header_value_t value,
334            int *error);
335
336
337       const sip_str_t *sip_get_event(sip_msg_t sip_msg,
338            int *error);
339
340
341       const sip_str_t *sip_get_substate(sip_msg_t sip_msg,
342            int *error);
343
344
345       const sip_str_t *sip_get_content_lang(sip_header_value_t value,
346            int *error);
347
348
349       const sip_str_t *sip_get_tstamp_value(sip_msg_t sip_msg,
350            int *error);
351
352
353       const sip_str_t *sip_get_route_uri_str(sip_header_value_t value,
354            int *error);
355
356
357       const sip_str_t *sip_get_route_display_name(sip_header_value_t value,
358            int *error);
359
360

DESCRIPTION

362       For functions that return a pointer of  type  sip_str_t,  sip_str_t  is
363       supplied by:
364
365         typedef struct sip_str {
366              char *sip_str_ptr;
367              int  sip_str_len;
368         }sip_str_t;
369
370
371
372       The sip_str_ptr parameter points to the start of the returned value and
373       sip_str_len supplies the length of the returned value.
374
375
376       For example, given the following request line in a SIP message  sip_msg
377       that is input to sip_get_request_uri_str():
378
379         FROM : <Alice sip:alice@atlanta.com>;tag=1928301774
380
381
382
383       the return is a pointer to sip_str_t with the sip_str_ptr member point‐
384       ing to "A" of Alice and sip_str_len being  set  to  5,  the  length  of
385       Alice.
386
387
388       Access  functions  for  headers  that can have multiple values take the
389       value as the input, while those that can have only one value  take  the
390       SIP message sip_msg as the input.
391
392
393       The  sip_get_contact_display_name(),  sip_get_from_display_name(),  and
394       sip_get_to_display_name() functions will return the  display  name,  if
395       present,  from  the  CONTACT  header  value, FROM and TO header respec‐
396       tively.
397
398
399       The     sip_get_contact_uri_str(),     sip_get_from_uri_str(),      and
400       sip_get_to_uri_str() functions will return the URI string from the CON‐
401       TACT value, FROM and TO header respectively.
402
403
404       The sip_get_from_tag() and sip_get_to_tag() functions will  return  the
405       TAG  parameter  value, if present, from the FROM and TO header, respec‐
406       tively, in the provided SIP message sip_msg.
407
408
409       The sip_get_callid() function will return the value  from  the  CALL-ID
410       header in the provided SIP message sip_msg.
411
412
413       The sip_get_callseq_num() function will return the call sequence number
414       from the CSEQ header in the provided SIP message sip_msg.
415
416
417       The sip_get_callseq_method() function will return the method  from  the
418       CSEQ  header in the provided SIP message sip_msg. The method can be one
419       of the following:
420         INVITE
421         ACK
422         OPTIONS
423         BYE
424         CANCEL
425         REGISTER
426         REFER
427         INFO
428         SUBSCRIBE
429         NOTIFY
430         PRACK
431         UNKNOWN
432
433
434       The       sip_get_via_sent_by_host(),       sip_get_via_sent_by_port(),
435       sip_get_via_sent_protocol_version(),  sip_get_via_sent_protocol_name(),
436       and sip_get_via_sent_transport()  functions  will  return  the  sent-by
437       host,  port (if present), protocol version, protocol name and transport
438       information from the provided VIA header value.  Example,  if  the  VIA
439       value  is given by SIP/2.0/UDP bobspc.biloxi.com:5060, then the sent-by
440       host is "bobspc.biloxi.com", protocol name is "SIP",  protocol  version
441       is "2.0", port is 5060 and transport is UDP.
442
443
444       The sip_get_maxforward() function will return the value of the MAX-FOR‐
445       WARDS header in the provided SIP message sip_msg.
446         INVITE
447         ACK
448         OPTIONS
449         BYE
450         CANCEL
451         REGISTER
452         REFER
453         INFO
454         SUBSCRIBE
455         NOTIFY
456         PRACK
457         UNKNOWN
458
459
460       The sip_get_content_length() function will return the value of the CON‐
461       TENT-LENGTH  header in the provided SIP message sip_msg. The method can
462       return one of the following:
463
464
465       The  sip_get_content_type()  and  sip_get_content_sub_type()  functions
466       will  return  the  value  of the Type and Sub-Type field, respectively,
467       from the CONTENT-TYPE header in the provided SIP message sip_msg.
468
469
470       The sip_get_content() function will return the message  body  from  the
471       provided SIP message sip_msg. The returned string is a copy of the mes‐
472       sage body and the caller is responsible for freeing  the  string  after
473       use.
474
475
476       The  sip_get_accept_type() and sip_get_accept_sub_type() functions will
477       return the value of the Type and Sub-Type field, respectively, from the
478       provided ACCEPT header value.
479
480
481       The  sip_get_accept_enc()  function will return the content-coding from
482       the provided ACCEPT-ENCODING header value.
483
484
485       The sip_get_accept_lang() function will return the language   from  the
486       provided ACCEPT-LANGUAGE header value.
487
488
489       The  sip_get_alert_info_uri()  function will return the URI string from
490       the provided ALERT-INFO header value.
491
492
493       The sip_get_allow_method() function will return the SIP method from the
494       provided  ALLOW  header value. The method can return one of the follow‐
495       ing:
496         INVITE
497         ACK
498         OPTIONS
499         BYE
500         CANCEL
501         REGISTER
502         REFER
503         INFO
504         SUBSCRIBE
505         NOTIFY
506         PRACK
507         UNKNOWN
508
509
510       The sip_get_min_expire() function will return the time in seconds  from
511       the MIN-EXPIRES header in the provided SIP message sip_msg.
512
513
514       The sip_get_mime_version() function will return the MIME version string
515       from the MIME-VERSION header in the provided SIP message sip_msg.
516
517
518       The sip_get_org() function will return the  organization  string  value
519       from the ORGANIZATION header in the provided SIP message sip_msg.
520
521
522       The  sip_get_priority()  function will return the priority string value
523       from the PRIORITY header in the provided SIP message sip_msg.
524
525
526       The sip_get_replyto_display_name() and sip_get_replyto_uri_str()  func‐
527       tions  will  return  the  display name (if present) and the URI string,
528       respectively, from the REPLY-TO header  in  the  provided  SIP  message
529       sip_msg.
530
531
532       The   sip_get_date_time(),   sip_get_date_day(),  sip_get_date_month(),
533       sip_get_date_wkday(), sip_get_date_year()  and  sip_get_date_timezone()
534       functions will return the time, day, month, week day, year and timezone
535       value from the DATE header in the provided SIP message  sip_msg.  Exam‐
536       ple, if the DATE header has the following value:
537
538         Sat, 13 Nov 2010 23:29:00 GMT
539
540
541
542       the  time  is  "23:29:00  ",  week  day is "Sat", day is "13", month is
543       "Nov", year is "2010", timezone is "GMT".
544
545
546       The sip_get_content_disp() function will return the content-disposition
547       type  from  the  CONTENT-DISPOSITION header in the provided SIP message
548       sip_msg.
549
550
551       The sip_get_content_enc() function will return the content-coding value
552       from the CONTENT-ENCODING header value.
553
554
555       The  sip_get_error_info_uri()  function will return the URI string from
556       the provided ERROR-INFO header value.
557
558
559       The sip_get_expires() function will return the time in seconds from the
560       EXPIRES header in the provided SIP message sip_msg.
561
562
563       The  sip_get_require()  function  will return the option-tag value from
564       the provided REQUIRE header value.
565
566
567       The sip_get_subject() function will return the  value  of  the  SUBJECT
568       header in the provided SIP message sip_msg.
569
570
571       The  sip_get_supported()  function will return the extension value from
572       the provided SUPPORTED header value.
573
574
575       The sip_get_tstamp_delay() function will  return  the  value  from  the
576       TIMESTAMP header in the provided SIP message sip_msg.
577
578
579       The sip_get_unsupported() function will return the extension value from
580       the provided UNSUPPORTED header value.
581
582
583       The sip_get_server() function will return the  value  from  the  SERVER
584       header in the provided SIP message sip_msg.
585
586
587       The  sip_get_user_agent() function will return the value from the USER-
588       AGENT header in the provided SIP message sip_msg.
589
590
591       The sip_get_warning_code(), sip_get_warning_agent(), and  sip_get_warn‐
592       ing_text() functions will return the value of the warn-code, warn-agent
593       and warn-text, respectively, in the provided WARNING header value.
594
595
596       The sip_get_call_info_uri() function will return the URI string in  the
597       provided CALL-INFO header value.
598
599
600       The sip_get_in_reply_to() function will return the Call-Id value in the
601       provided IN-REPLY-TO header value.
602
603
604       The sip_get_retry_after_time(),  and  sip_get_retry_after_cmts()  func‐
605       tions  return  the  time  and comments (if any), respectively, from the
606       RETRY-AFTER header in the provided SIP message sip_msg.
607
608
609       The    sip_get_passertedid_display_name()     and     sip_get_passerte‐
610       did_uri_str()  functions  will return the display name (if any) and the
611       URI string, respectively, in the  provided  P-ASSERTED-IDENTITY  header
612       value.
613
614
615       The    sip_get_ppreferredid_display_name()    and    sip_get_ppreferre‐
616       did_uri_str() functions will return the display name (if any)  and  the
617       URI  string,  respectively, in the provided P-PREFERRED-IDENTITY header
618       value.
619
620
621       The     sip_get_rack_resp_num(),      sip_get_rack_cseq_num(),      and
622       sip_get_rack_method()  functions  will  return the response-number, the
623       CSEQ number and the SIP method from the RACK header in the provided SIP
624       message sip_msg. The method can return one of the following:
625         INVITE
626         ACK
627         OPTIONS
628         BYE
629         CANCEL
630         REGISTER
631         REFER
632         INFO
633         SUBSCRIBE
634         NOTIFY
635         PRACK
636         UNKNOWN
637
638
639       The  sip_get_rseq_resp_num()  function will return the response-number,
640       the RSEQ header in the provided SIP message sip_msg.
641
642
643       The sip_get_priv_value() function will return  the  priv-value  in  the
644       provided PRIVACY header value.
645
646
647       The  sip_get_route_uri_str() and sip_get_route_display_name() functions
648       will return the URI string, and display name (if present) from the pro‐
649       vided ROUTE or RECORD-ROUTE header value.
650
651
652       The  sip_get_author_scheme()  function  will return the scheme from the
653       AUTHORIZATION header in the provided SIP message sip_msg.
654
655
656       The sip_get_author_param() function will return the value of the param‐
657       eter specified in name from the AUTHORIZATION header in the SIP message
658       sip_msg.
659
660
661       The  sip_get_authen_info()  function  will  return  the  authentication
662       information from the provided AUTHORIZATION-INFO header value.
663
664
665       The  sip_get_proxy_authen_scheme() function will return the scheme from
666       the PROXY-AUTHENTICATE header in the SIP message sip_msg.
667
668
669       The sip_get_proxy_authen_param() function will return the value of  the
670       parameter in name from the PROXY-AUTHENTICATE header in the SIP message
671       sip_msg.
672
673
674       The sip_get_proxy_author_scheme() function will return the value of the
675       scheme from the PROXY-AUTHORIZATION header in the SIP message sip_msg.
676
677
678       The  sip_get_proxy_author_param() function will return the value of the
679       parameter specified in name from the PROXY-AUTHORIZATION header in  the
680       SIP message sip_msg.
681
682
683       The  sip_get_proxy_require()  function  will return the option-tag from
684       the provided PROXY-REQUIRE header value.
685
686
687       The sip_get_www_authen_scheme() function will return the challenge from
688       the WWW-AUTHENTICATE header in the SIP message sip_msg.
689
690
691       The  sip_get_www_authen_param()  function  will return the value of the
692       parameter specified in name from the WWW-AUTHENTICATE header in the SIP
693       message sip_msg.
694
695
696       The  sip_get_allow_events()  function  returns the value of the allowed
697       event from the provided ALLOW-EVENTS header value.
698
699
700       The sip_get_event() function returns the event in the EVENT  header  in
701       the SIP message sip_msg.
702
703
704       The  sip_get_substate()  function  the subscription state from the SUB‐
705       SCRIPTION-STATE header in the provided SIP message sip_msg.
706
707
708       The sip_get_content_lang() function will return the language  from  the
709       provided CONTENT-LANGUAGE value.
710
711
712       The  sip_get_tstamp_value()  function  will  return the timestamp value
713       from the TIMESTAMP header in the SIP message sip_msg.
714

RETURN VALUES

716       For functions that return a pointer to sip_str_t, the return  value  is
717       the  specified value on success or NULL in case of error. For functions
718       that return an integer, the return value is the specified value on suc‐
719       cess and -1 on error.
720
721
722       The  value  of  errno  is not changed by these calls in the event of an
723       error.
724

ERRORS

726       These functions take a pointer to an integer error as an  argument.  If
727       the error is non-null, one of the following values is set:
728
729       EINVAL    The input SIP message sip_msg or the header value is null; or
730                 the specified header/header value is deleted.
731
732
733       EPROTO    The header value is not present or invalid. The parser  could
734                 not parse it correctly.
735
736
737       ENOMEM    There is an error allocating memory for the return value.
738
739
740
741       On success, the value of the location pointed to by error is set to 0.
742

ATTRIBUTES

744       See attributes(5) for descriptions of the following attributes:
745
746
747
748
749       ┌─────────────────────────────┬─────────────────────────────┐
750       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
751       ├─────────────────────────────┼─────────────────────────────┤
752       │Interface Stability          │Committed                    │
753       ├─────────────────────────────┼─────────────────────────────┤
754       │MT-Level                     │MT-Safe                      │
755       └─────────────────────────────┴─────────────────────────────┘
756

SEE ALSO

758       libsip(3LIB)
759
760
761
762SunOS 5.11                        10 Feb 2007sip_get_contact_display_name(3SIP)
Impressum