mobile-push: b/f: reply only once with FR to INVITE

sayer/1.4-spce2.6
Stefan Sayer 14 years ago
parent 62c0531458
commit acec80a2b8

@ -139,10 +139,21 @@ function releaseRegEvalObjects() {
};
function replyWith300() {
set($dlg.reply.hdrs="Contact: ");
append($dlg.reply.hdrs, @local_uri);
append($dlg.reply.hdrs, $config.extra_3xx_uri_append);
dlg.reply(300, "Multiple Choices");
if test($has_replied!="yes") {
set($dlg.reply.hdrs="Contact: ");
append($dlg.reply.hdrs, @local_uri);
append($dlg.reply.hdrs, $config.extra_3xx_uri_append);
dlg.reply(300, "Multiple Choices");
set($has_replied="yes");
}
stop(false);
};
function replyWith480() {
if test($has_replied!="yes") {
dlg.reply(480, "Not found");
set($has_replied="yes");
}
stop(false);
};
@ -152,7 +163,6 @@ transition "NOTIFY received, with body" WAITING - subscription(#status!="termina
if test($active_contacts != 0) {
replyWith300();
subscription.remove($r.handle);
stop(false);
}
releaseRegEvalObjects();
@ -169,21 +179,18 @@ transition "NOTIFY received, terminated (but with body)" WAITING - subscription(
if test($active_contacts != 0) {
replyWith300();
} else {
dlg.reply(480, "Not found");
replyWith480();
}
releaseRegEvalObjects();
stop(false);
} -> END;
transition "NOTIFY received, subscription terminated" WAITING - subscription(#status=="terminated") / {
dlg.reply(480, "Not found");
stop(false);
replyWith480();
} -> END;
transition "timer hit" WAITING - timer(#id==1) / {
subscription.remove($r.handle);
dlg.reply(480, "Not found");
stop(false);
replyWith480();
} -> END;
transition "CANCEL received" WAITING - hangup / {

Loading…
Cancel
Save