Asterisk 12 channel varables to save jitters in cdr

Hi All
I am trying to save cdr column ljitt with the following dialplan

exten => h,n,set(CDR(ljitt)=${CHANNEL(rtpqos,audio,local_jitter)})

But got the following error

[Jul 26 02:23:15] WARNING[6248][C-0000001a]: func_channel.c:560 func_channel_read: Unknown or unavailable item requested: ‘rtpqos,audio,local_jitter’
[Jul 26 02:23:15] WARNING[6248][C-0000001a]: func_channel.c:560 func_channel_read: Unknown or unavailable item requested: ‘rtpqos,audio,local_jitter’

Could you help to have the correct syntax or updated document?

I am using Asterisk 12.3.2

I would be better if we have complete channel functions / variables.

Thank you
Raja

You have to pass a single parameter to CHANNEL.

david55,

Thanks for your reply. But the core show function CHANNEL shows

rtpqos - R/O Get QOS information about the RTP stream
This option takes two additional arguments:
Argument 1:
‘audio’ Get data about the audio stream
’video’ Get data about the video stream
’text’ Get data about the text stream
Argument 2:
‘local_ssrc’ Local SSRC (stream ID)
‘local_lostpackets’ Local lost packets
’local_jitter’ Local calculated jitter
’local_maxjitter’ Local calculated jitter (maximum)
‘local_minjitter’ Local calculated jitter (minimum)
'local_normdevjitter’Local calculated jitter (normal
deviation)

Please help me to fix this problem.

Thanks in advance.

I think your problem is that you are trying to do this in an h extension, which will be run after the channel technology driver has been shut down for the channel. The CHANNEL function passes unrecognized parameters to the current channel technology driver.

It will take too long to be sure that the technology driver has actually be disconnected at this point, but it seems a reasonable thing to do. Remember Asterisk is a back to back user agent and also the technology and specific device channel can change during the life of an Asterisk channel. Having the high level channel structure know about all the possible technology specific parameters would break the device independence of the Asterisk core.

chan_sip does set some channel variables with QOS information as it is being hung up (${RTPAUDIOQOS} etc.). Whilst the comments say:

[quote]The channel variables are set below just to get the AMI
VarSet event because the channel is being hungup.[/quote]

I don’t see why they wouldn’t be available to the dialplan.

David,

Thanks for your response.

I rolled down to Asterisk 1.8 and tried the same dialplan with error

I found the new values for the rtpqos

Below is my new dialplan. Now I can save the jitter values and other qos.

exten => h,1,noop(“extended CDR”)
exten => h,n,set(CDR(hangupcause)=${HANGUPCAUSE})
exten => h,n,set(CDR(peerip)=${CHANNEL(peerip)})
exten => h,n,set(CDR(recvip)=${CHANNEL(recvip)})
exten => h,n,set(CDR(fromuri)=${CHANNEL(from)})
exten => h,n,set(CDR(uri)=${CHANNEL(uri)})
exten => h,n,set(CDR(useragent)=${CHANNEL(useragent)})
exten => h,n,set(CDR(codec1)=${CHANNEL(audioreadformat)})
exten => h,n,set(CDR(codec2)=${CHANNEL(audiowriteformat)})
exten => h,n,set(CDR(llp)=${CHANNEL(rtpqos,audio,txploss)})
exten => h,n,set(CDR(rlp)=${CHANNEL(rtpqos,audio,rxploss)})
exten => h,n,set(CDR(ljitt)=${CHANNEL(rtpqos,audio,txjitter)})
exten => h,n,set(CDR(rjitt)=${CHANNEL(rtpqos,audio,rxjitter)})

I suspect my Asterisk 12 is a corrupt installation. Anyways, thanks a lot for your help.

Good day.

More likely they have just changed the the code so that it hangs up the technology specific part of the channel earlier in the process.