Skip to content

Commit

Permalink
- fixed CANCEL matching in B2B
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-iancu committed Sep 4, 2013
1 parent 0bb5728 commit 195e12c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/b2b_entities/dlg.c
Expand Up @@ -635,7 +635,7 @@ int b2b_prescript_f(struct sip_msg *msg, void *uparam)
/* if a CANCEL request - search iteratively in the server_htable*/
if(method_value == METHOD_CANCEL)
{
str ruri= msg->first_line.u.request.uri;
/*str ruri= msg->first_line.u.request.uri;*/
str reply_text={"canceling", 9};
/* This makes no sense - why not accepting a CANCEL that was
generated by other b2b instance ? or ourselves ? - bogdan
Expand All @@ -647,7 +647,12 @@ int b2b_prescript_f(struct sip_msg *msg, void *uparam)
*/

hash_index = core_hash(&callid, &from_tag, server_hsize);
dlg = b2bl_search_iteratively(&callid, &from_tag, &ruri, hash_index);
/* As per RFC3261, the RURI must be used when matching the CANCEL
against the INVITE, but we should not do it here as B2B learns
a RURI that may have been changed in script (before invoking the
B2B module), while the CANCEL has the original RURI (as received)
*/
dlg = b2bl_search_iteratively(&callid, &from_tag, NULL/*&ruri*/, hash_index);
if(dlg == NULL)
{
lock_release(&server_htable[hash_index].lock);
Expand Down

0 comments on commit 195e12c

Please sign in to comment.