[Asterisk-Users] how to alter cdr dst info?

Steven asterisk at tescogroup.com
Wed Dec 28 12:10:28 MST 2005


Here is a reference cdr:
      29.  2005-12-28 13:02:01 Zap/1-1... 8103970196 8103970196<8103970196> 5100 ANSWERED 78 
      30.  2005-12-28 12:59:54 Zap/1-1... 8104590192 8104590192<8104590192> 5128 ANSWERED 23 
      31.  2005-12-28 12:56:01 Zap/1-1... 8102320369 8102320369 5162 ANSWERED 165 
      32.  2005-12-28 12:54:19 Zap/2-1... 2489220303 2489220303 5162 ANSWERED 40 
      33.  2005-12-28 12:54:16 Zap/71-1... 2480365108 Mika<2480365108> 15860360822 NO ANSWER 25 
      34.  2005-12-28 12:51:11 Zap/71-1... 2480365123 Gary<2480365123> 12402240667 NO ANSWER 24 
        



I am using a PBX behind our asterisk server, so calls coming from the PBX may be extensions or forwarded calls from outside.
To add consistency, I have set all of the callerID info for asterisk extensions to be 10 digit numbers.
Outbound calls from asterisk start with a 9, but there is no 9 from the PBX, so I have 2 sets of outbound rules. (1 for each context)

What I would like to do:

When DID calls come in, I would like to record a 10 digit number in the "dst" cdr field.
When outbound calls are made, I would like to store them as 10 digits as well. either stripping off the 1 from PBX calls or the 91 from asterisk calls.
I would also have to take International calls into account. removing the 9 from the 011X. from the PBX or just leaving the 011X. in tact from asterisk calls
This alteration would have to after the call is made, to make sure that we are still dialing the number correctly.

I will figure out the rules if someone can just point me in the right direction for altering the "dst" field in the cdr, or at least tell me that it can not be done.
If not, I will have to see if I can do it via SQL after the fact.

please advise.






-- 
-- 
Steven

May you have the peace and freedom that come from abandoning all hope of having a better past.
---    -      ---  - - -       -    -     -   -   --  - - - --- - ------   - - --- - - -- -  -    - --   -   -    -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051228/367a7f18/attachment.htm


More information about the asterisk-users mailing list