summaryrefslogtreecommitdiff
path: root/channels/sip/include/sip.h
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2010-04-09 16:04:16 +0000
committerMark Michelson <mmichelson@digium.com>2010-04-09 16:04:16 +0000
commit4b8f1c8cacd73dcdfa0cc13b33c0ed12fa67439f (patch)
tree22aadabe7400160d5fd2b4522fabdfe2a59d3e68 /channels/sip/include/sip.h
parentae7b76a1b9bcdb80b2e62ae66b3ec2e6b06ed4cb (diff)
Add routines for parsing SIP URIs consistently.
From the original issue report opened by Nick Lewis: Many sip headers in many sip methods contain the ABNF structure name-andor-addr = name-addr / addr-spec Examples include the to-header, from-header, contact-header, replyto-header At the moment chan_sip.c makes various different attempts to parse this name-andor-addr structure for each header type and for each sip method with sometimes limited degrees of success. I recommend that this name-andor-addr structure be parsed by a dedicated function and that it be used irrespective of the specific method or header that contains the name-andor-addr structure Nick has also included unit tests for verifying these routines as well, so...heck yeah. (closes issue #16708) Reported by: Nick_Lewis Patches: reqresp_parser-nameandoraddr2.patch uploaded by Nick Lewis (license 657 Review: https://reviewboard.asterisk.org/r/549 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@256530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip/include/sip.h')
-rw-r--r--channels/sip/include/sip.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h
index 1d900eb58..49f8ed098 100644
--- a/channels/sip/include/sip.h
+++ b/channels/sip/include/sip.h
@@ -1647,4 +1647,34 @@ struct sip_monitor_instance {
struct sip_epa_entry *suspension_entry;
};
+/*!
+ * \brief uri parameters
+ *
+ */
+
+struct uriparams {
+ char *transport;
+ char *user;
+ char *method;
+ char *ttl;
+ char *maddr;
+ int lr;
+};
+
+struct contact {
+ AST_LIST_ENTRY(contact) list;
+ char *name;
+ char *user;
+ char *pass;
+ char *host;
+ char *port;
+ struct uriparams params;
+ char *headers;
+ char *expires;
+ char *q;
+};
+
+AST_LIST_HEAD_NOLOCK(contactliststruct, contact);
+
+
#endif