Browse Source

Merge pull request #39 from 2600hz/subscribe-tweaks-master

handle subscribe tweaks
4.2 4.2.2
bitbashing 8 years ago
committed by GitHub
parent
commit
8987173b9a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 4 deletions
  1. +13
    -4
      kamailio/presence-role.cfg

+ 13
- 4
kamailio/presence-role.cfg View File

@ -69,13 +69,12 @@ modparam("nat_traversal", "keepalive_interval", 45)
#!ifdef NAT_TRAVERSAL_ROLE
route[PRESENCE_NAT]
{
force_rport();
if (client_nat_test("3")) {
fix_contact();
if(is_first_hop())
set_contact_alias();
}
nat_keepalive();
force_rport();
}
#!endif
@ -89,18 +88,26 @@ route[HANDLE_SUBSCRIBE]
route(PRESENCE_NAT);
#!endif
if (!t_newtran()) {
sl_reply_error();
exit;
}
if(has_totag()) {
route(HANDLE_RESUBSCRIBE);
} else {
route(HANDLE_NEW_SUBSCRIBE);
}
t_release();
exit;
}
route[HANDLE_RESUBSCRIBE]
{
loose_route();
if(handle_subscribe()) {
if($subs(remote_cseq) < 5) {
$sht(first=>$subs(callid)) = $null;
@ -144,6 +151,8 @@ route[HANDLE_NEW_SUBSCRIBE]
}
}
record_route();
if (handle_subscribe()) {
route(SUBSCRIBE_AMQP);
xlog("L_INFO","$ci|end|new $hdr(Event) subscription from $fU to $tU in realm $fd : $sht(first=>$ci) : $sht(first=>$fU::$tU::$fd::$hdr(Event))\n");


Loading…
Cancel
Save