[asterisk-users] How to see initiall dialled extension in CDR records ?

Raj Mathur ( राज माथुर ) raju at linux-delhi.org
Mon Dec 12 10:55:59 CST 2011


Please start a new thread for new conversations.

On Monday 12 Dec 2011, Albert wrote:
> I have following problem. For statistical reasons I need to know what
> was initiall number dialled by customer. I have 2 premium numbers,
> for which customers are billed differently per minute. But in my CDR
> table i can see only last dialled extension from voice menu. In this
> example it shows me that customer (077XXXXXXX) was billed 293
> seconds but i am not seeing which number he dialed. Only what i can
> see is last destination he choosed from voice menu which was '1'.
> 
> What shall I do to see which number was dialled initially?
> 
> ps. Original numer was X-ed.
> 
>        calldate       |    clid    |    src     | dst |
> 
> dcontext      |        channel         | dstchannel |  lastapp
> 
> |              lastdata              | duration | billsec |
> |              disposition
> | 
> | amaflags | accountcode |   uniqueid    | userfield
> 
> ---------------------+------------+------------+-----+---------------
> -----+------------------------+------------+------------+------------
> ------------------------+----------+---------+-------------+---------
> -+-------------+---------------+-----------
> 
>   2011-12-12 15:11:26 | 077XXXXXXX | 077XXXXXXX | 1   |
> 
> stories-en-options | DAHDI/i1/077XXXXXXX-13 |            | Playback  
> | custom/l_stories/en/en_bible |      293 |     293 | ANSWERED    |
> 3 |             | 1323691886.91 |
> 
> Below is part on my extensioans file and voice menu structure
> 
> [incoming-calls-from-e1-span1]
> exten => 902000111,1,Verbose(Call is comming .... ${EXTEN})
> exten => 902000111,n,Goto(voiceservices_menu,2666,1)
> 
> exten => 902000222,1,Verbose(Call is comming .... ${EXTEN})
> exten =>
> 902000222,n,GotoIfTime(08:00-22:59,mon-sun,*,*?supportmenu,2555,1)
> exten => 902000222,n,Playback(custom/l_line/callcenter-closed) exten
> => 902000222,n,Goto(voiceservices_menu,2666,1)

If I understand your problem correctly, you have a few options:

1. Answer() the call in the 902000XXX extension.  That will cause the 
CDR to be written with that extension as the dst.

2. Save the called number in the CDR userfield in the 902000XXX 
extension itself using something like:

  exten => 902000111,n,Set(CDR(userfield)=${EXTEN})

There're probably many other (better) ways of achieving this too.

Regards,

-- Raj
-- 
Raj Mathur                          || raju at kandalaya.org   || GPG:
http://otheronepercent.blogspot.com || http://kandalaya.org || CC68
It is the mind that moves           || http://schizoid.in   || D17F



More information about the asterisk-users mailing list