Browse Source

early handle of subscription timeout

4.1 4.1.33
lazedo 7 years ago
committed by Luis Azedo
parent
commit
47838e03eb
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      kamailio/presence_notify_sync-role.cfg

+ 4
- 3
kamailio/presence_notify_sync-role.cfg View File

@ -51,12 +51,13 @@ event_route[presence:notify-reply]
$xavp(pres=>delete_subscription) = 0;
if($notify_reply($rs) == 200) {
if($subs(reason) == "timeout") {
$xavp(pres=>delete_subscription) = 1;
xlog("L_INFO", "$ci|end|deleting subscribtion $subs(pres_uri) for $subs(watcher_username)@$subs(watcher_domain) due to timeout\n");
} else if($notify_reply($rs) == 200) {
$sht(notify=>$ci) = $null;
$sht(notify=>$ci::count) = 0;
xlog("L_INFO", "$ci|end|notified $subs(watcher_username)@$subs(watcher_domain) on behalf of $subs(pres_uri)\n");
} else if($notify_reply($rs) == 481 && $subs(reason) == "timeout") {
xlog("L_INFO","$ci|end|sent subscription $hdr(Subscription-State)\n");
} else {
xlog("L_ERROR", "$ci|error|received $notify_reply($rs) when notifying $subs(watcher_username)@$subs(watcher_domain) on behalf of $subs(pres_uri)\n");
if($rP != "UDP") {


Loading…
Cancel
Save