[asterisk-users] cdr_adaptive_odbc writing CDR before h extension is processed
Eric Chamberlain
eric at rf.com
Sat Sep 13 18:13:13 CDT 2008
On Sep 12, 2008, at 8:11 PM, Tilghman Lesher wrote:
> On Friday 12 September 2008 19:27:30 Eric Chamberlain wrote:
>> We are using Asterisk 1.6rc6 and are trying to set some values before
>> the cdr is inserted into the database, but the cdr is inserted before
>> the h extension is processed.
>>
>> What are we doing wrong? How can we get these extra values in the
>> CDR?
>>
>> In cdr.conf we have:
>> endbeforehexten=no
>>
>> And our dial plans end with:
>> exten => h,1,Macro(create-cdr)
>
> I have to turn this over to Steve Murphy, as you're asking a
> question about
> when the driver is actually called. Steve?
>
We thought we had a work-around, but that too is not logging all the
fields to the CDR.
cdr_adaptive_odbc knows about the field:
> Found dst_call_id column with type 12 with len 80, octetlen
255, and numlen (0,0)
We tried having Dial launch a macro that set the CDR values, but those
CDR values don't get inserted into the database:
-- Executing [s at macro-hunt-dial:3] Dial("SIP/
64.61.93.170-0a081768", "SIP/echo123 at skype1,,M(set-dst-cdr)") in new
stack
== Using SIP RTP CoS mark 5
-- Called echo123 at skype1
-- SIP/skype1-0a087b18 is ringing
-- SIP/skype1-0a087b18 answered SIP/64.61.93.170-0a081768
-- Executing [s at macro-set-dst-cdr:1] NoOp("SIP/skype1-0a087b18",
"Set destination CDR information") in new stack
-- Executing [s at macro-set-dst-cdr:2] Set("SIP/skype1-0a087b18",
"CDR(dst_call_id)=2d6a4858271cffc66b43b16e025638c0 at 67.225.199.190") in
new stack
-- Packet2Packet bridging SIP/64.61.93.170-0a081768 and SIP/
skype1-0a087b18
> [INSERT INTO dialer_cdr
(channel
,clid
,src
,src_call_id
,src_peer_ip
,src_agent
,dcontext
,dst
,dstchannel
,lastapp
,lastdata
,start,answer,end_time,duration,billsec,disposition,amaflags,uniqueid)
VALUES ('SIP/64.61.93.170-0a081768','5105555555','5105555555','058ca70e4c9dfd8a548c43343a4f6938 at 64.61.93.170.gwout
','172.30.1.9','CommuniGatePro-callLeg/5.2.6','cgp-in','echo123','SIP/
skype1-0a087b18','Dial','SIP/echo123 at skype1,,M(set-dst-cdr)',{ ts
'2008-09-13 19:02:48' },{ ts '2008-09-13 19:03:02' },{ ts '2008-09-13
19:03:08' },20,6,8,3,'1221346968.18')]
--
Eric Chamberlain
More information about the asterisk-users
mailing list