diff --git a/share/scripts/playrec.php b/share/scripts/playrec.php index 190f5193..fd544e43 100755 --- a/share/scripts/playrec.php +++ b/share/scripts/playrec.php @@ -80,7 +80,7 @@ function setState($newstate) $state = $newstate; } -function gotNotify() +function gotNotify($reason) { global $ourcallid; global $partycallid; @@ -88,6 +88,9 @@ function gotNotify() Yate::Output("gotNotify() state: " . $state); + if ($reason == "replaced") + return; + switch ($state) { case "goodbye": setState(""); @@ -159,7 +162,7 @@ while ($state != "") { case "chan.notify": if ($ev->params["targetid"] == $ourcallid) { - gotNotify(); + gotNotify($ev->getValue("reason")); $ev->handled = true; } break;