2
0
mirror of https://github.com/ACSPRI/queXS synced 2024-04-02 12:12:16 +00:00

Only update for known extensions

This commit is contained in:
azammitdcarf
2009-08-27 03:03:33 +00:00
parent 316c0c472b
commit 24b4f9e0e0

View File

@@ -434,24 +434,36 @@ class voipWatch extends voip {
*/ */
if (eregi("Event: Dial.*SubEvent: Begin.*Channel: SIP/([0-9]+)",$line,$regs)) if (eregi("Event: Dial.*SubEvent: Begin.*Channel: SIP/([0-9]+)",$line,$regs))
{ {
print T_("Ringing") . T_(" Extension ") . $regs[1] . "\n"; $call_id = $this->getCallId($regs[1]);
$this->setState($this->getCallId($regs[1]),2); if ($call_id != 0)
{
print T_("Ringing") . T_(" Extension ") . $regs[1] . "\n";
$this->setState($call_id,2);
}
} }
/** /**
* The call has been answered * The call has been answered
*/ */
else if (eregi("Event: Bridge.*Channel1: SIP/([0-9]+)",$line,$regs)) else if (eregi("Event: Bridge.*Channel1: SIP/([0-9]+)",$line,$regs))
{ {
print T_("Answered") . T_(" Extension ") . $regs[1] . "\n"; $call_id = $this->getCallId($regs[1]);
$this->setState($this->getCallId($regs[1]),3); if ($call_id != 0)
{
print T_("Answered") . T_(" Extension ") . $regs[1] . "\n";
$this->setState($call_id,3);
}
} }
/** /**
* The call has been hung up * The call has been hung up
*/ */
else if (eregi("Event: Hangup.*Channel: SIP/([0-9]+)",$line,$regs)) else if (eregi("Event: Hangup.*Channel: SIP/([0-9]+)",$line,$regs))
{ {
print T_("Hangup") . T_(" Extension ") . $regs[1] . "\n"; $call_id = $this->getCallId($regs[1]);
$this->setState($this->getCallId($regs[1]),4,true); if ($call_id != 0)
{
print T_("Hangup") . T_(" Extension ") . $regs[1] . "\n";
$this->setState($call_id,4,true);
}
} }
//print $line . "\n\n"; //print $line . "\n\n";