DID's in CDR

I have been trying to get set up where the did’s my company uses will be saved to my cdr database. Created a new field in my asteriskcdrdb.cdr table. Thought I added in the correct code for the hang up macro, but it doesnt seem to be doing anything.

exten => s,1,Set(CDR(did)=${FROM_DID})
exten => s,n,ResetCDR(w)
exten => s,n,NoCDR()

did is my column name. Found the code in another forum post on the subject.

±------------±-------------±-----±----±--------------------±------+
| Field | Type | Null | Key | Default | Extra |
±------------±-------------±-----±----±--------------------±------+
| calldate | datetime | NO | | 0000-00-00 00:00:00 | |
| clid | varchar(80) | NO | | | |
| src | varchar(80) | NO | | | |
| dst | varchar(80) | NO | | | |
| did | varchar(30) | YES | | NULL | |
| dcontext | varchar(80) | NO | | | |
| channel | varchar(80) | NO | | | |
| dstchannel | varchar(80) | NO | | | |
| lastapp | varchar(80) | NO | | | |
| lastdata | varchar(80) | NO | | | |
| duration | int(11) | NO | | 0 | |
| billsec | int(11) | NO | | 0 | |
| disposition | varchar(45) | NO | | | |
| amaflags | int(11) | NO | | 0 | |
| accountcode | varchar(20) | NO | | | |
| uniqueid | varchar(32) | NO | MUL | | |
| userfield | varchar(255) | NO | | |

not sure if the issue is due to that null in my field or if thats just due to it having to be populated. Thanks in advance.

George

FreePBX 2.10 already has this feature.

sadly upgrading broke elastix. Back up I have is of the stuff before i went to move to 2.10 and its contains broke stuff from moving to 2.9. I have an older back up, but its missing a few things. Guess Im gonna use the newest back up, as my phones still work, but pbx config is broken in the gui. Suggestions on fixing? Reinstalled elastix 4 times tonight on my own dime to try and fix my screw up.

This is why we always ask you to tell us about your system, if I had known it was Elastix I would have pushed you back in that direction.

I can see that FreePBX might not work within the Elastix framework anymore but you still should be able to go straight to the FreePBX x.x.x.x/admin/config.php

I am not sure what you think is broken but it is probably something simple such as Asterisk Manager or DB passwords.

managed to get to get the pbx config working between jumping back and forth on restore points. the Freepbx interface shows all my stuff is either disabled or broken right now. Tried to do the upgrade to 2.8.x.x and none of that worked last night. My own fault for not being a bit more cautious.