[Home]

Summary:ASTERISK-17185: [patch] SIP CHANNEL(rtpqos,audio,...) variables missing.
Reporter:Kirill Katsnelson (kkm)Labels:patch
Date Opened:2010-12-29 22:27:40.000-0600Date Closed:
Priority:MinorRegression?Yes
Status:Open/NewComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 018555-rtpqos-options-doc-and-compat-r300039.diff
Description:Intimately related to ASTERISK-1644652. That patch inadvertently renamed 6 options, essentially

local_count -> txcount
local_lostpackets -> rxploss
local_jitter -> txjitter
remote_count -> rxcount
remote_lostpackets -> txploss
remote_jitter -> rxjitter

These worked in 1.6.2.

Also, some options are undocumented and some are documented twice in `core show function CHANNEL'.

****** STEPS TO REPRODUCE ******

With the following dialplan idea, dial a SIP extension from another one and then hang up. The on-hangup macro is ran, and the warnings listed below are printed.

context from-ptsn {
 _[!-z]. => Dial(${EXTEN});
 h => &on-hangup();
}

macro on-hangup() {
   &cdr-from-channel(local_count);
   &cdr-from-channel(local_lostpackets);
   &cdr-from-channel(local_jitter);
   &cdr-from-channel(local_maxjitter);
   &cdr-from-channel(local_normdevjitter);
   &cdr-from-channel(remote_count);
   &cdr-from-channel(remote_lostpackets);
   &cdr-from-channel(remote_jitter);
   &cdr-from-channel(remote_maxjitter);
   &cdr-from-channel(remote_normdevjitter);
   &cdr-from-channel(rtt);
   &cdr-from-channel(maxrtt);
   &cdr-from-channel(minrtt);
   &cdr-from-channel(normdevrtt);
}

macro cdr-from-channel (varname) {
 LOCAL(v)="${CHANNEL(rtpqos,audio,${varname})}";
 if ("${v}" != "") CDR(${varname})="${v}";
}

context from-ptsn {
 _[!-z]. => Dial(${EXTEN});
 h => &on-hangup();
}

[2010-12-28 22:34:00.160] WARNING[15166]: sip/dialplan_functions.c:214 sip_acf_channel_read: Unrecognized argument 'rtpqos,audio,local_count' to CHANNEL
[2010-12-28 22:34:00.160] WARNING[15166]: func_channel.c:374 func_channel_read: Unknown or unavailable item requested: 'rtpqos,audio,local_count'
[2010-12-28 22:34:00.167] WARNING[15166]: sip/dialplan_functions.c:214 sip_acf_channel_read: Unrecognized argument 'rtpqos,audio,local_lostpackets' to CHANNEL
[2010-12-28 22:34:00.167] WARNING[15166]: func_channel.c:374 func_channel_read: Unknown or unavailable item requested: 'rtpqos,audio,local_lostpackets'
[2010-12-28 22:34:00.169] WARNING[15166]: sip/dialplan_functions.c:214 sip_acf_channel_read: Unrecognized argument 'rtpqos,audio,local_jitter' to CHANNEL
[2010-12-28 22:34:00.169] WARNING[15166]: func_channel.c:374 func_channel_read: Unknown or unavailable item requested: 'rtpqos,audio,local_jitter'
[2010-12-28 22:34:00.177] WARNING[15166]: sip/dialplan_functions.c:214 sip_acf_channel_read: Unrecognized argument 'rtpqos,audio,remote_count' to CHANNEL
[2010-12-28 22:34:00.177] WARNING[15166]: func_channel.c:374 func_channel_read: Unknown or unavailable item requested: 'rtpqos,audio,remote_count'
[2010-12-28 22:34:00.180] WARNING[15166]: sip/dialplan_functions.c:214 sip_acf_channel_read: Unrecognized argument 'rtpqos,audio,remote_lostpackets' to CHANNEL
[2010-12-28 22:34:00.180] WARNING[15166]: func_channel.c:374 func_channel_read: Unknown or unavailable item requested: 'rtpqos,audio,remote_lostpackets'
[2010-12-28 22:34:00.183] WARNING[15166]: sip/dialplan_functions.c:214 sip_acf_channel_read: Unrecognized argument 'rtpqos,audio,remote_jitter' to CHANNEL
[2010-12-28 22:34:00.183] WARNING[15166]: func_channel.c:374 func_channel_read: Unknown or unavailable item requested: 'rtpqos,audio,remote_jitter'


****** ADDITIONAL INFORMATION ******

I am taking most of the blame for this: tilghman posted the fix, and I, being the original reporter, eyeballed but did not test it.

I'll post a patch tonight.
Comments:By: Kirill Katsnelson (kkm) 2010-12-29 23:11:40.000-0600

The patch adds (but does not document) old 1.6 option names to be recognized by CHANNEL(), and documents new names.