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

Fixed regexp that was ignorning SIP channels

This commit is contained in:
azammitdcarf
2011-08-19 05:29:47 +00:00
parent b0a6ade3b3
commit 2f51b37aeb

View File

@@ -102,14 +102,14 @@ class voip {
$chans = array(); $chans = array();
foreach ($c as $s) foreach ($c as $s)
{ {
if(eregi("Event: Status.*Channel: (SIP/|IAX2/[0-9a-zA-Z-]+).*BridgedChannel: (SIP/|IAX2/[/0-9a-zA-Z-]+)",$s,$regs)) if(eregi("Event: Status.*Channel: ((SIP/|IAX2/)[0-9a-zA-Z-]+).*BridgedChannel: ((SIP/|IAX2/)[/0-9a-zA-Z-]+)",$s,$regs))
{ {
//print T_("Channel: SIP/") . $regs[1] . " BridgedChannel " . $regs[2] . "\n"; //print T_("Channel: SIP/") . $regs[1] . " BridgedChannel " . $regs[2] . "\n";
$ccs = explode('-',$regs[1]); $ccs = explode('-',$regs[1]);
$chan = $ccs[0]; $chan = $ccs[0];
$chans[$chan] = array($regs[1],$regs[2]); $chans[$chan] = array($regs[1],$regs[3]);
} }
else if(eregi("Event: Status.*Channel: (SIP/|IAX2/[0-9a-zA-Z-]+).*",$s,$regs)) else if(eregi("Event: Status.*Channel: ((SIP/|IAX2)/[0-9a-zA-Z-]+).*",$s,$regs))
{ {
//print T_("Channel: ") . $regs[1] . "\n"; //print T_("Channel: ") . $regs[1] . "\n";
$ccs = explode('-', $regs[1]); $ccs = explode('-', $regs[1]);