[asterisk-users] Log CODECS in CDR's
Karsten Wemheuer
kwem at gmx.de
Fri May 11 08:58:38 MST 2007
Hi Morgan,
Am Freitag, den 11.05.2007, 10:32 +0100 schrieb Morgan Gilroy:
> Thanks for the pointers, I know about the Set(CDR..) function but I need
> the codec that was negotiated in the Dial (once I have that its easy to
> stick it into the cdrs as you pointed out).
> Ie a call comes in as G729 Dial then negotiates GSM for the outbound
> leg,
> I want to log both these codecs in a CDR.
>
> At the moment to find the codecs used I have to look though the sip
> trace or show channels/show channel (annoying when you have 50+
> channels).
> Im just trying to find an easier and quicker way to keep track of the
> codecs used to help with debug etc.
>
> The closest variable iv found is, "${SIP_CODEC} Set the SIP codec for a
> call"
> Ill see if NoOp (${SIP_CODEC}) shows the codec that was used without me
> setting it though I don't think it will.
>
> Iv looked all over and I cant find anything so it looks like I may have
> to hack a ast_set_var into app_dial or chan_sip
It is untested, but maybe You can write a little AGI-Script which
accesses some channel vars. Call that AGI as a DeadAGI. A DeadAGI will
be called, if a connection terminates (connect it with the
'h'-Extension, see the wiki). I don't know if the neccessary information
is still alive at this time, but maybe it will do what You want...
HTH,
Karsten
More information about the asterisk-users
mailing list