diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-26 19:59:03 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-26 19:59:03 +0000 |
commit | 75974cbd2c414cda31c0d5f52586f8dc9da2e66b (patch) | |
tree | d66add87856da7eaff57fbf33cb7d347b5fabf71 /channels/sip/include/reqresp_parser.h | |
parent | a1ab79cc0e7c786f8b2b11b44a03aad43cbd5d16 (diff) |
transaction matching using top most Via header
This patch modifies the way chan_sip.c does transaction to dialog
matching. Asterisk now stores information in the top most Via header
of the initial incoming request and compares that against other Requests
that have the same call-id. This results in Asterisk being able to
detect a forked call in which it has received multiple legs of the
fork. I completely stripped out the previous matching code and made
the comparisons a little more explicit and easier to understand. My
comments in the code should offer all the details involving this patch.
This patch also fixes a bug with the usage of the OBJ-MULTIPLE flag to
find multiple dialogs with the same call-id. Since the callback
function was returning (CMP_MATCH | CMP_STOP) only the first item
found was being returned. I fixed this by making a new callback
function for finding multiple dialogs that only returns (CMP_MATCH)
on a match allowing for multiple items to be returned.
Review: https://reviewboard.asterisk.org/r/776/
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@279568 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sip/include/reqresp_parser.h')
-rw-r--r-- | channels/sip/include/reqresp_parser.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/sip/include/reqresp_parser.h b/channels/sip/include/reqresp_parser.h index 2957151aa..8c8c59ad6 100644 --- a/channels/sip/include/reqresp_parser.h +++ b/channels/sip/include/reqresp_parser.h @@ -165,4 +165,10 @@ int sip_reqresp_parser_init(void); */ void sip_reqresp_parser_exit(void); +/*! + * \brief Parse the VIA header into it's parts. + * + * \note This will modify the string + */ +void get_viabranch(char *via, char **sent_by, char **branch); #endif |