Last active
May 23, 2019 10:03
-
-
Save rijnhard/ffd30a9a408aa662ba86c8b65ceffc6d to your computer and use it in GitHub Desktop.
[finding calls for extensions] #freepbx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET NAMES 'UTF8'; | |
SET CHARACTER SET 'UTF8'; | |
SET @EXT = 7443; | |
SET @EXTV = concat('vmu', @EXT); | |
SET @CHANNEL = concat('%/', @EXT, '-%'); | |
SELECT * FROM asteriskcdrdb.cdr | |
where ( | |
dstchannel LIKE @CHANNEL | |
OR channel LIKE @CHANNEL | |
OR src = @EXT | |
OR dst = @EXT | |
OR src = @EXTV | |
OR dst = @EXTV | |
OR cnum = @EXT | |
OR cnum = @EXTV | |
) | |
order by calldate desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment