Author Topic: SMDR record  (Read 10643 times)

Offline doctora

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
SMDR record
« on: July 26, 2012, 11:20:28 AM »
the number being called is not being recorded if it is an internal extension.  I am grabbing the raw data coming out of the 3300 and the number being called is there if it is an external call but it shows nothing if it is an internal extension. 

Thank you for your help
Mark


Online ralph

  • Mitel Forums Admin
  • Hero Member
  • *****
  • Posts: 5768
  • Country: us
  • Karma: +469/-0
  • Published Author: http://amzn.to/2dcYSY5
    • View Profile
Re: SMDR record
« Reply #1 on: July 26, 2012, 11:33:39 AM »
Look in the SMDR options form.  There's a tic box there for recording internal calls.
You also need it enabled in the COS of the phone.

Ralph


Offline doctora

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: SMDR record
« Reply #2 on: July 26, 2012, 11:48:01 AM »
In the COS SMDR options I have both internal and external options set to yes for all.

I have attached a snapshot of the SMDR settings.

I am getting the record it is just missing the extension being called.  Is there someplace else that will restrict that particular information.

Thanks for your help.

Online ralph

  • Mitel Forums Admin
  • Hero Member
  • *****
  • Posts: 5768
  • Country: us
  • Karma: +469/-0
  • Published Author: http://amzn.to/2dcYSY5
    • View Profile
Re: SMDR record
« Reply #3 on: July 26, 2012, 11:52:23 AM »
Can you post one of the call records?

Ralph

Offline doctora

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: SMDR record
« Reply #4 on: July 26, 2012, 12:35:10 PM »
I think I can but I will have to rewrite a bit of my code.  I don't want to lose any records.  I built my own call accounting system so individual users can log in and see their calls.  Most calls don't matter but if I randomly grab that one important call my users will freak out.  With my luck I will grab that one important call.  I will post back as soon as I can.  Thanks again for your help so far.

Mark

Online ralph

  • Mitel Forums Admin
  • Hero Member
  • *****
  • Posts: 5768
  • Country: us
  • Karma: +469/-0
  • Published Author: http://amzn.to/2dcYSY5
    • View Profile
Re: SMDR record
« Reply #5 on: July 26, 2012, 01:25:24 PM »
log into you system and enter: logs re smdr new 5
You can even make a couple of calls yourself and replace any digits you don't want to see with '-'

Ralph

Offline doctora

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: SMDR record
« Reply #6 on: July 26, 2012, 01:26:48 PM »
It was easier than I thought.  And I think I may have it figured out.  It appears on an Internal call there is no call origin.  The originating number shows up in the trunk origin and then in (What I call the detail) portion is some three digit code and the destination number.

example I normal call record. Ext 2273 calling out
07/26 11:53A 00:00:04 2273 2273 71XXXXXXXXX A X999

example II . Extension 2326 calling ext 2110.
07/26 11:54A 00:01:16 2326 011 2110 I 2110

Now I have to figure out my logic.  I am currently wondering why I am not seeing the 011.  Of course that is in my own programming logic.  For us collecting internal calls is going to be a new thing. 

Do you know if the I prior to the last 2110 indicates an internal call?

Mark

Online ralph

  • Mitel Forums Admin
  • Hero Member
  • *****
  • Posts: 5768
  • Country: us
  • Karma: +469/-0
  • Published Author: http://amzn.to/2dcYSY5
    • View Profile
Re: SMDR record
« Reply #7 on: July 26, 2012, 03:16:52 PM »
Yes, the 'I' is an internal flag.

Ralph

Offline JoeShmo

  • Jr. Member
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: SMDR record
« Reply #8 on: July 26, 2012, 03:24:29 PM »
I also reverse engineered the SMDR to start writing an app that would dump SMDR into a MySQL database...  Do you have the doc that describes the SMDR layout?  that helps a bit...  I'd post it here if I could find it... its on one of my shared drives.... somewhere...  If you need, I'll find it.  or just plaster up my reverse engineered code, and you can figure it out if I ever got a chance to decypher it.  We eventually went with PrairieFyre since I got fed up with it.  PF keeps a sort-of database of the SMDR that I havnt had a chance to whack on directly to let users (and university police) lookup stuff.

Offline doctora

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +0/-0
    • View Profile
Re: SMDR record
« Reply #9 on: July 26, 2012, 04:19:32 PM »
Thanks Ralph,  It is working fine now.   I am going to rethink how I parse the data.  I am not sure the benefit of internal calls but it is always fun to have a challenge.


Joe,   I found the help file in the Mitel system with the SMDR fields. I use php and mysql to generate my call accounting system.  It has a nice web front end and every person can log in and see their call history, sort, search, and alter their user information.  I can also do some accounting functions but I am still working on that.  I am getting ready to convert the whole thing to a .net mssql site.  I keep track of the usage of my system and it is very minimal but as I stated above I love a challenge so I dont really care if it is used.

Online ralph

  • Mitel Forums Admin
  • Hero Member
  • *****
  • Posts: 5768
  • Country: us
  • Karma: +469/-0
  • Published Author: http://amzn.to/2dcYSY5
    • View Profile
Re: SMDR record
« Reply #10 on: July 26, 2012, 04:46:10 PM »
How are you collecting your data?
The reason I'm asking is because I'd like to create a windows based program that captures the traffic stats and saves it to a directory every hour so you can go back and review any time you'd like.   
I'd like to make the program avail free from here.

Ralph


Offline JoeShmo

  • Jr. Member
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: SMDR record
« Reply #11 on: July 27, 2012, 12:09:25 PM »
I'm collecting my data via a socket connection.  I too write in php and mysql.  So I have a php script that opens a connection to the MCD on tcp port 1752, listens for data, then stuffs it into a mysql database.  Because it was taking so long to get the decoding right, I broke it down into two processes.  One dumps raw SMDR into the database, the other reads the unprocessed records from the database, figures out calls, and dumps them to another database.
NOTE that the MCD will only allow so many connections to the SMDR.  I think maybe 3 or 4? (not sure if its configurable).
I'm sure you can just write php code in windows and compile it, and maybe doctora will release either source or compiled app so we can all benefit.
but the socket portion is easy:

$sock=socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_connect($sock,"mcd.mydomain.com","1752");
socket_set_block($sock);
while($sock) {
    $stuff=rtrim(socket_read($sock, 255, PHP_NORMAL_READ));
    if(strlen($stuff)>5) {
       echo $stuff . "\n";
    }
    sleep(3);
    unset($stuff);
}

Thats about it.  Of course it would be nice to put some better sanity/error checks in there, as there are times when the connection just goes away, and you are no longer reading.  But as is, the above can be used, then just redirect the output to a file, and you are done.

Doctora: what are your plans as far as releasing anything?  PF is a bit of overkill for us, but we have yet to find any other decent call accounting package (small and simple), so I really wanted to go back to writing my own (in my "spare" time).  The part that got me messed up was that we have 6 controllers.  So seeing all those internal calls bounce around got annoying.   I basically used that above script with some other features added on for multiple controllers, and the database entry said what controller the smdr came from.   but I left that part out in this posting for simplicity.

Online ralph

  • Mitel Forums Admin
  • Hero Member
  • *****
  • Posts: 5768
  • Country: us
  • Karma: +469/-0
  • Published Author: http://amzn.to/2dcYSY5
    • View Profile
Re: SMDR record
« Reply #12 on: July 27, 2012, 01:10:22 PM »
Would this work on the windows version of PHP?

Ralph

Offline JoeShmo

  • Jr. Member
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: SMDR record
« Reply #13 on: July 30, 2012, 11:05:44 AM »
It should... nothing fancy there.  Do you know PHP enough to try it out, and add features/functions to pretty it up, or would you prefer I came up with an actual compiled PHP executable, so users wouldnt even have to install php?

Online ralph

  • Mitel Forums Admin
  • Hero Member
  • *****
  • Posts: 5768
  • Country: us
  • Karma: +469/-0
  • Published Author: http://amzn.to/2dcYSY5
    • View Profile
Re: SMDR record
« Reply #14 on: July 30, 2012, 11:23:22 AM »
I'd love to have the executable. 

Ralph


 

Sitemap 1 2 3 4 5 6 7 8 9 10