Shout: Trim off the channel type from device names
authorBen Klang <ben@alkaloid.net>
Sat, 2 Jan 2010 18:46:54 +0000 (13:46 -0500)
committerBen Klang <ben@alkaloid.net>
Sat, 2 Jan 2010 18:46:54 +0000 (13:46 -0500)
shout/lib/Driver/Ldap.php

index bef003c..3414a23 100644 (file)
@@ -123,8 +123,9 @@ class Shout_Driver_Ldap extends Shout_Driver
                 $res[$i]['astextension']['count'] = -1;
             }
             while ($j < $res[$i]['astextension']['count']) {
-                $entries[$context][$extension]['devices'][] =
-                    $res[$i]['astextension'][$j];
+                // Trim off the Asterisk channel type from the device string
+                $device = explode('/', $res[$i]['astextension'][$j], 2);
+                $entries[$context][$extension]['devices'][] = $device[1];
                 $j++;
             }