SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osip_parser.h
Go to the documentation of this file.
1 /*
2  The oSIP library implements the Session Initiation Protocol (SIP -rfc3261-)
3  Copyright (C) 2001-2015 Aymeric MOIZARD amoizard@antisip.com
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19 
20 
21 #ifndef _OSIP_PARSER_H_
22 #define _OSIP_PARSER_H_
23 
25 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
45  int parser_init (void);
46 
51  int osip_message_fix_last_via_header (osip_message_t * request, const char *ip_addr, int port);
52 
53 
65 
71 
76  const char *osip_message_get_reason (int status_code);
77 
83 #ifndef MINISIZE
84  int osip_message_set_accept (osip_message_t * sip, const char *hvalue);
85 #else
86 #define osip_message_set_accept(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Accept",value)
87 #endif
88 
94 #ifndef MINISIZE
95  int osip_message_get_accept (const osip_message_t * sip, int pos, osip_accept_t ** dest);
96 #else
97 #define osip_message_get_accept(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"accept",pos,(osip_header_t **)dest)
98 #endif
99 
104 #ifndef MINISIZE
105  int osip_message_set_accept_encoding (osip_message_t * sip, const char *hvalue);
106 #else
107 #define osip_message_set_accept_encoding(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Accept-Encoding",value)
108 #endif
109 
115 #ifndef MINISIZE
116  int osip_message_get_accept_encoding (const osip_message_t * sip, int pos, osip_accept_encoding_t ** dest);
117 #else
118 #define osip_message_get_accept_encoding(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"accept-encoding",pos,(osip_header_t **)dest)
119 #endif
120 
125 #ifndef MINISIZE
126  int osip_message_set_accept_language (osip_message_t * sip, const char *hvalue);
127 #else
128 #define osip_message_set_accept_language(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Accept-Language",value)
129 #endif
130 
136 #ifndef MINISIZE
137  int osip_message_get_accept_language (const osip_message_t * sip, int pos, osip_accept_language_t ** dest);
138 #else
139 #define osip_message_get_accept_language(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"accept-language",pos,(osip_header_t **)dest)
140 #endif
141 
146 #ifndef MINISIZE
147  int osip_message_set_alert_info (osip_message_t * sip, const char *hvalue);
148 #else
149 #define osip_message_set_alert_info(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Alert-Info",value)
150 #endif
151 
157 #ifndef MINISIZE
158  int osip_message_get_alert_info (const osip_message_t * sip, int pos, osip_alert_info_t ** dest);
159 #else
160 #define osip_message_get_alert_info(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"alert-info",pos,(osip_header_t **)dest)
161 #endif
162 
167 #ifndef MINISIZE
168  int osip_message_set_allow (osip_message_t * sip, const char *hvalue);
169 #else
170 #define osip_message_set_allow(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Allow",value)
171 #endif
172 
178 #ifndef MINISIZE
179  int osip_message_get_allow (const osip_message_t * sip, int pos, osip_allow_t ** dest);
180 #else
181 #define osip_message_get_allow(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"allow",pos,(osip_header_t **)dest)
182 #endif
183 
188 #ifndef MINISIZE
189  int osip_message_set_authentication_info (osip_message_t * sip, const char *hvalue);
190 #else
191 #define osip_message_set_authentication_info(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Authentication-Info",value)
192 #endif
193 
199 #ifndef MINISIZE
201 #else
202 #define osip_message_get_authentication_info(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"authentication-info",pos,(osip_header_t **)dest)
203 #endif
204 
209  int osip_message_set_authorization (osip_message_t * sip, const char *hvalue);
216 #ifndef MINISIZE
217  int osip_message_get_authorization (const osip_message_t * sip, int pos, osip_authorization_t ** dest);
218 #else
219 #define osip_message_get_authorization(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->authorizations), pos, (void **)(dest))
220 #endif
221 
226  int osip_message_set_call_id (osip_message_t * sip, const char *hvalue);
231 #ifndef MINISIZE
233 #else
234 #define osip_message_get_call_id(sip) ((sip)->call_id)
235 #endif
236 
241  int osip_message_set_call_info (osip_message_t * sip, const char *hvalue);
248  int osip_message_get_call_info (const osip_message_t * sip, int pos, osip_call_info_t ** dest);
254  int osip_message_set_contact (osip_message_t * sip, const char *hvalue);
261 #ifndef MINISIZE
262  int osip_message_get_contact (const osip_message_t * sip, int pos, osip_contact_t ** dest);
263 #else
264 #define osip_message_get_contact(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->contacts), pos, (void **)(dest))
265 #endif
266 
271 #ifndef MINISIZE
272  int osip_message_set_content_encoding (osip_message_t * sip, const char *hvalue);
273 #else
274 #define osip_message_set_content_encoding(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Content-Encoding",value)
275 #endif
276 
282 #ifndef MINISIZE
284 #else
285 #define osip_message_get_content_encoding(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"content-encoding",pos,(osip_header_t **)dest)
286 #endif
287 
292  int osip_message_set_content_length (osip_message_t * sip, const char *hvalue);
297 #ifndef MINISIZE
299 #else
300 #define osip_message_get_content_length(sip) ((sip)->content_length)
301 #endif
302 
307  int osip_message_set_content_type (osip_message_t * sip, const char *hvalue);
312 #ifndef MINISIZE
314 #else
315 #define osip_message_get_content_type(sip) ((sip)->content_type)
316 #endif
317 
322  int osip_message_set_cseq (osip_message_t * sip, const char *hvalue);
327 #ifndef MINISIZE
329 #else
330 #define osip_message_get_cseq(sip) ((sip)->cseq)
331 #endif
332 
337 #ifndef MINISIZE
338  int osip_message_set_error_info (osip_message_t * sip, const char *hvalue);
339 #else
340 #define osip_message_set_error_info(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Error-Info",value)
341 #endif
342 
348 #ifndef MINISIZE
349  int osip_message_get_error_info (const osip_message_t * sip, int pos, osip_error_info_t ** dest);
350 #else
351 #define osip_message_get_error_info(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"error-info",pos,(osip_header_t **)dest)
352 #endif
353 
358  int osip_message_set_from (osip_message_t * sip, const char *hvalue);
363 #ifndef MINISIZE
365 #else
366 #define osip_message_get_from(sip) ((sip)->from)
367 #endif
368 
373  int osip_message_set_mime_version (osip_message_t * sip, const char *hvalue);
378 #ifndef MINISIZE
380 #else
381 #define osip_message_get_mime_version(sip) ((sip)->mime_version)
382 #endif
383 
388  int osip_message_set_proxy_authenticate (osip_message_t * sip, const char *hvalue);
395 #ifndef MINISIZE
397 #else
398 #define osip_message_get_proxy_authenticate(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->proxy_authenticates), pos, (void **)(dest))
399 #endif
400 
405  int osip_message_set_proxy_authorization (osip_message_t * sip, const char *hvalue);
412 #ifndef MINISIZE
414 #else
415 #define osip_message_get_proxy_authorization(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->proxy_authorizations), pos, (void **)(dest))
416 #endif
417 
422 #ifndef MINISIZE
423  int osip_message_set_proxy_authentication_info (osip_message_t * sip, const char *hvalue);
424 #else
425 #define osip_message_set_proxy_authentication_info(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Proxy-Authentication-Info",value)
426 #endif
427 
433 #ifndef MINISIZE
435 #else
436 #define osip_message_get_proxy_authentication_info(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"proxy-authentication-info",pos,(osip_header_t **)dest)
437 #endif
438 
443  int osip_message_set_record_route (osip_message_t * sip, const char *hvalue);
450 #ifndef MINISIZE
451  int osip_message_get_record_route (const osip_message_t * sip, int pos, osip_record_route_t ** dest);
452 #else
453 #define osip_message_get_record_route(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->record_routes), pos, (void **)(dest))
454 #endif
455 
460  int osip_message_set_route (osip_message_t * sip, const char *hvalue);
467 #ifndef MINISIZE
468  int osip_message_get_route (const osip_message_t * sip, int pos, osip_route_t ** dest);
469 #else
470 #define osip_message_get_route(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->routes), pos, (void **)(dest))
471 #endif
472 
477  int osip_message_set_to (osip_message_t * sip, const char *hvalue);
482 #ifndef MINISIZE
484 #else
485 #define osip_message_get_to(sip) ((sip)->to)
486 #endif
487 
492  int osip_message_set_via (osip_message_t * sip, const char *hvalue);
498  int osip_message_append_via (osip_message_t * sip, const char *hvalue);
505 #ifndef MINISIZE
506  int osip_message_get_via (const osip_message_t * sip, int pos, osip_via_t ** dest);
507 #else
508 #define osip_message_get_via(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->vias), pos, (void **)(dest))
509 #endif
510 
515  int osip_message_set_www_authenticate (osip_message_t * sip, const char *hvalue);
522 #ifndef MINISIZE
524 #else
525 #define osip_message_get_www_authenticate(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->www_authenticates), pos, (void **)(dest))
526 #endif
527 #ifndef DOXYGEN
528 
534  int osip_message_set_multiple_header (osip_message_t * sip, char *hname, char *hvalue);
535 #endif
536 
542  int osip_message_set_header (osip_message_t * sip, const char *hname, const char *hvalue);
549  int osip_message_replace_header (osip_message_t * sip, const char *hname, const char *hvalue);
550 #ifndef MINISIZE
551 
558  int osip_message_set_topheader (osip_message_t * sip, const char *hname, const char *hvalue);
559 #endif
560 
567  int osip_message_header_get_byname (const osip_message_t * sip, const char *hname, int pos, osip_header_t ** dest);
574 #ifndef MINISZE
575  int osip_message_get_header (const osip_message_t * sip, int pos, osip_header_t ** dest);
576 #else
577 #define osip_message_get_header(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->headers), pos, (void **)(dest))
578 #endif
579 
585  int osip_message_set_body (osip_message_t * sip, const char *buf, size_t length);
592  int osip_message_set_body_mime (osip_message_t * sip, const char *buf, size_t length);
599 #ifndef MINISIZE
600  int osip_message_get_body (const osip_message_t * sip, int pos, osip_body_t ** dest);
601 #else
602 #define osip_message_get_body(sip, pos, dest) osip_message_get_knownheaderlist((&(sip)->bodies), pos, (void **)(dest))
603 #endif
604 
605 
606 
607 /* trace facilities */
608 #ifndef DOXYGEN /* avoid DOXYGEN warning */
609 #ifdef ENABLE_TRACE
610  void msg_logrequest (osip_message_t * sip, char *fmt);
611  void msg_logresponse (osip_message_t * sip, char *fmt);
612 #else
613 #define msg_logrequest(P,Q) ;
614 #define msg_logresponse(P,Q) ;
615 #endif
616 #endif
617 
623 #define osip_message_set_date(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Date",value)
624 
630 #define osip_message_get_date(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"date",pos,(osip_header_t **)dest)
631 
636 #define osip_message_set_encryption(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Encryption",value)
637 
643 #define osip_message_get_encryption(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"encryption",pos,(osip_header_t **)dest)
644 
649 #define osip_message_set_organization(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Organization",value)
650 
656 #define osip_message_get_organization(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"organization",pos,(osip_header_t **)dest)
657 
662 #define osip_message_set_require(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Require",value)
663 
669 #define osip_message_get_require(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"require",pos,(osip_header_t **)dest)
670 
675 #define osip_message_set_supported(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Supported",value)
676 
682 #define osip_message_get_supported(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"supported",pos,(osip_header_t **)dest)
683 
688 #define osip_message_set_timestamp(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Timestamp",value)
689 
695 #define osip_message_get_timestamp(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"timestamp",pos,(osip_header_t **)dest)
696 
701 #define osip_message_set_user_agent(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"User-Agent",value)
702 
708 #define osip_message_get_user_agent(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"user-agent",pos,(osip_header_t **)dest)
709 
714 #define osip_message_set_content_language(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Content-Language",value)
715 
721 #define osip_message_get_content_language(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"content-language",pos,(osip_header_t **)dest)
722 
727 #define osip_message_set_expires(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Expires",value)
728 
734 #define osip_message_get_expires(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"expires",pos,(osip_header_t **)dest)
735 
740 #define osip_message_set_in_reply_to(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"In-Reply-To",value)
741 
747 #define osip_message_get_in_reply_to(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"in-reply-to",pos,(osip_header_t **)dest)
748 
753 #define osip_message_set_max_forwards(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Max-Forwards",value)
754 
760 #define osip_message_get_max_forwards(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"max-forwards",pos,(osip_header_t **)dest)
761 
766 #define osip_message_set_priority(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Priority",value)
767 
773 #define osip_message_get_priority(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"priority",pos,(osip_header_t **)dest)
774 
779 #define osip_message_set_proxy_require(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Proxy-Require",value)
780 
786 #define osip_message_get_proxy_require(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"proxy-require",pos,(osip_header_t **)dest)
787 
792 #define osip_message_set_response_key(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Response-Key",value)
793 
799 #define osip_message_get_response_key(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"response-key",pos,(osip_header_t **)dest)
800 
805 #define osip_message_set_subject(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Subject",value)
806 
812 #define osip_message_get_subject(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"subject",pos,(osip_header_t **)dest)
813 
818 #define osip_message_set_retry_after(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Retry-After",value)
819 
825 #define osip_message_get_retry_after(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"retry-after",pos,(osip_header_t **)dest)
826 
831 #define osip_message_set_server(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Server",value)
832 
838 #define osip_message_get_server(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"server",pos,(osip_header_t **)dest)
839 
844 #define osip_message_set_unsupported(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Unsupported",value)
845 
851 #define osip_message_get_unsupported(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"unsupported",pos,(osip_header_t **)dest)
852 
857 #define osip_message_set_warning(sip,value) osip_message_set_header((osip_message_t *)sip,(const char *)"Warning",value)
858 
864 #define osip_message_get_warning(sip,pos,dest) osip_message_header_get_byname(( osip_message_t *)sip,(const char *)"warning",pos,(osip_header_t **)dest)
865 
869 #ifdef __cplusplus
870 }
871 #endif
872 #endif
int osip_message_set_accept(osip_message_t *sip, const char *hvalue)
Set the Accept header.
Structure for SIP Message (REQUEST and RESPONSE).
Definition: osip_message.h:55
osip_content_length_t * osip_message_get_content_length(const osip_message_t *sip)
Get one Content-length header.
Definition of the CSeq header.
Definition: osip_cseq.h:45
int osip_message_get_proxy_authenticate(const osip_message_t *sip, int pos, osip_proxy_authenticate_t **dest)
Get the Proxy-authenticate header.
osip_from_t * osip_message_get_from(const osip_message_t *sip)
Get the From header.
int osip_message_set_proxy_authorization(osip_message_t *sip, const char *hvalue)
Set the Proxy-authorization header.
osip_cseq_t * osip_message_get_cseq(const osip_message_t *sip)
Get one Cseq header.
Definition of the Content-Length header.
int osip_message_get_allow(const osip_message_t *sip, int pos, osip_allow_t **dest)
Get one Allow header.
osip_to_t * osip_message_get_to(const osip_message_t *sip)
Get the To header.
int osip_message_get_content_encoding(const osip_message_t *sip, int pos, osip_content_encoding_t **dest)
Get one Content-encoding header.
Structure for holding Body.
Definition: osip_body.h:48
int osip_message_set_content_type(osip_message_t *sip, const char *hvalue)
Set the Content-type header.
int osip_message_get_proxy_authorization(const osip_message_t *sip, int pos, osip_proxy_authorization_t **dest)
Get one Proxy-authorization header.
int osip_message_get_via(const osip_message_t *sip, int pos, osip_via_t **dest)
Get one Via header.
int osip_message_get_accept_encoding(const osip_message_t *sip, int pos, osip_accept_encoding_t **dest)
Get one Accept-encoding header.
osip_call_id_t * osip_message_get_call_id(const osip_message_t *sip)
Get one Call-id header.
int osip_message_header_get_byname(const osip_message_t *sip, const char *hname, int pos, osip_header_t **dest)
Find an "unknown" header.
#define msg_logrequest(P, Q)
Definition: osip_parser.h:613
int osip_message_set_header(osip_message_t *sip, const char *hname, const char *hvalue)
Allocate and Add an "unknown" header (not defined in oSIP).
int osip_message_set_content_length(osip_message_t *sip, const char *hvalue)
Set the Content-length header.
Definition of the Content-Type header.
osip_content_type_t * osip_message_get_content_type(const osip_message_t *sip)
Get one Content-type header.
int osip_message_set_via(osip_message_t *sip, const char *hvalue)
Set the Via header.
int osip_message_set_mime_version(osip_message_t *sip, const char *hvalue)
Set the mime-version header.
Definition of the Call-Info header.
Definition of the Authentication-Info header.
int osip_message_set_www_authenticate(osip_message_t *sip, const char *hvalue)
Set the Www-authenticate header.
int osip_message_set_topheader(osip_message_t *sip, const char *hname, const char *hvalue)
Allocate and Add an "unknown" header (not defined in oSIP).
int osip_message_get_alert_info(const osip_message_t *sip, int pos, osip_alert_info_t **dest)
Get one Alert-info header.
int osip_message_set_to(osip_message_t *sip, const char *hvalue)
Set the To header.
Definition of the Accept-Encoding header.
int osip_message_set_content_encoding(osip_message_t *sip, const char *hvalue)
Set the Content-encoding header.
int osip_message_set_accept_language(osip_message_t *sip, const char *hvalue)
Set the Accept-language header.
int osip_message_set_authorization(osip_message_t *sip, const char *hvalue)
Set the Authorization header.
int osip_message_set_proxy_authenticate(osip_message_t *sip, const char *hvalue)
Set the Proxy-authenticate header.
int parser_init(void)
Initialise the oSIP parser.
int osip_message_set_error_info(osip_message_t *sip, const char *hvalue)
Set the Error-info header.
int osip_message_set_call_info(osip_message_t *sip, const char *hvalue)
Set the Call-info header.
int osip_message_append_via(osip_message_t *sip, const char *hvalue)
Append a Via header.
#define msg_logresponse(P, Q)
Definition: osip_parser.h:614
int osip_message_set_authentication_info(osip_message_t *sip, const char *hvalue)
Set the Authentication-info header.
const char * osip_message_get_reason(int status_code)
Get the usual reason phrase as defined in SIP for a specific status code.
int osip_message_set_accept_encoding(osip_message_t *sip, const char *hvalue)
Set the Accept-encoding header.
int osip_message_get_accept(const osip_message_t *sip, int pos, osip_accept_t **dest)
Get one Accept header.
Definition of the From header.
Definition: osip_from.h:48
int osip_message_get_www_authenticate(const osip_message_t *sip, int pos, osip_www_authenticate_t **dest)
Get one Www-authenticate header.
int osip_message_get_error_info(const osip_message_t *sip, int pos, osip_error_info_t **dest)
Get one Error-info header.
int osip_message_replace_header(osip_message_t *sip, const char *hname, const char *hvalue)
Allocate and Add/Replace an "unknown" header (not defined in oSIP).
int osip_message_get_contact(const osip_message_t *sip, int pos, osip_contact_t **dest)
Get one Contact header.
int osip_message_set_alert_info(osip_message_t *sip, const char *hvalue)
Set the Alert-info header.
int osip_message_force_update(osip_message_t *sip)
Force a osip_message_t element to be rebuild on next osip_message_to_str() call.
int osip_message_set_proxy_authentication_info(osip_message_t *sip, const char *hvalue)
Set the Proxy-authentication-info header.
oSIP SIP Message Accessor Routines
int osip_message_get_accept_language(const osip_message_t *sip, int pos, osip_accept_language_t **dest)
Get one Accept-Language header.
Definition of a generic sip header.
Definition: osip_header.h:52
int osip_message_set_body_mime(osip_message_t *sip, const char *buf, size_t length)
Set the Body of the SIP message.
int osip_message_get_call_info(const osip_message_t *sip, int pos, osip_call_info_t **dest)
Get one Call-info header.
int osip_message_set_record_route(osip_message_t *sip, const char *hvalue)
Set the Record-Route header.
Definition of the Via header.
Definition: osip_via.h:47
int osip_message_get_route(const osip_message_t *sip, int pos, osip_route_t **dest)
Get one Route header.
int osip_message_set_contact(osip_message_t *sip, const char *hvalue)
Set the Contact header.
int osip_message_set_call_id(osip_message_t *sip, const char *hvalue)
Set the Call-id header.
int osip_message_get_proxy_authentication_info(const osip_message_t *sip, int pos, osip_proxy_authentication_info_t **dest)
Get the Proxy-authentication-info header.
int osip_message_get_authentication_info(const osip_message_t *sip, int pos, osip_authentication_info_t **dest)
Get one Authentication-info header.
Definition of the Authorization header.
int osip_message_get__property(const osip_message_t *sip)
define this macro to avoid building several times the message on retransmissions. ...
Definition of the Call-Id header.
Definition: osip_call_id.h:45
int osip_message_get_header(const osip_message_t *sip, int pos, osip_header_t **dest)
Get one "unknown" header.
int osip_message_set_from(osip_message_t *sip, const char *hvalue)
Set the From header.
int osip_message_set_route(osip_message_t *sip, const char *hvalue)
Set the Route header.
int osip_message_set_allow(osip_message_t *sip, const char *hvalue)
Set the Allow header.
osip_mime_version_t * osip_message_get_mime_version(const osip_message_t *sip)
Get the Mime-version header.
int osip_message_get_body(const osip_message_t *sip, int pos, osip_body_t **dest)
Get one body header.
int osip_message_set_multiple_header(osip_message_t *sip, char *hname, char *hvalue)
Allocate and Add multiple header (not defined in oSIP).
Definition of the WWW-Authenticate header.
int osip_message_get_record_route(const osip_message_t *sip, int pos, osip_record_route_t **dest)
Get one Record-route header.
int osip_message_get_authorization(const osip_message_t *sip, int pos, osip_authorization_t **dest)
Get one Authorization header.
int osip_message_set_body(osip_message_t *sip, const char *buf, size_t length)
Set the Body of the SIP message.
int osip_message_set_cseq(osip_message_t *sip, const char *hvalue)
Set the Cseq header.
int osip_message_fix_last_via_header(osip_message_t *request, const char *ip_addr, int port)
Fix the via header for INCOMING requests only.