[Home]

Summary:ASTERISK-14932: [patch] SIP CHANNEL(rtpqos,audio,...) variables missing.
Reporter:Kirill Katsnelson (kkm)Labels:
Date Opened:2010-01-19 14:19:36.000-0600Date Closed:2011-02-07 12:44:12.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20100204__issue16652.diff.txt
Description:CHANNEL(rtpqos,audio,x) causes the following warnings for some x:

[Jan 14 21:56:19] WARNING[16860] chan_sip.c: Unrecognized argument 'rtpqos,audio,local_maxjitter' to CHANNEL
[Jan 14 21:56:19] WARNING[16860] func_channel.c: Unknown or unavailable item requested: 'rtpqos,audio,local_maxjitter'

Affected variables (not exhaustive list)

local_maxjitter
local_normdevjitter
remote_maxjitter
remote_normdevjitter
maxrtt
minrtt
normdevrtt

****** 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.

<blockquote>
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();
}
</blockquote>

[Jan 14 21:56:19] WARNING[16860] chan_sip.c: Unrecognized argument 'rtpqos,audio,local_maxjitter' to CHANNEL
[Jan 14 21:56:19] WARNING[16860] func_channel.c: Unknown or unavailable item requested: 'rtpqos,audio,local_maxjitter'
[Jan 14 21:56:19] WARNING[16860] chan_sip.c: Unrecognized argument 'rtpqos,audio,local_normdevjitter' to CHANNEL
[Jan 14 21:56:19] WARNING[16860] func_channel.c: Unknown or unavailable item requested: 'rtpqos,audio,local_normdevjitter'
[Jan 14 21:56:19] WARNING[16860] chan_sip.c: Unrecognized argument 'rtpqos,audio,remote_maxjitter' to CHANNEL
[Jan 14 21:56:19] WARNING[16860] func_channel.c: Unknown or unavailable item requested: 'rtpqos,audio,remote_maxjitter'
[Jan 14 21:56:19] WARNING[16860] chan_sip.c: Unrecognized argument 'rtpqos,audio,remote_normdevjitter' to CHANNEL
[Jan 14 21:56:19] WARNING[16860] func_channel.c: Unknown or unavailable item requested: 'rtpqos,audio,remote_normdevjitter'
[Jan 14 21:56:19] WARNING[16860] chan_sip.c: Unrecognized argument 'rtpqos,audio,maxrtt' to CHANNEL
[Jan 14 21:56:19] WARNING[16860] func_channel.c: Unknown or unavailable item requested: 'rtpqos,audio,maxrtt'
[Jan 14 21:56:19] WARNING[16860] chan_sip.c: Unrecognized argument 'rtpqos,audio,minrtt' to CHANNEL
[Jan 14 21:56:19] WARNING[16860] func_channel.c: Unknown or unavailable item requested: 'rtpqos,audio,minrtt'
[Jan 14 21:56:19] WARNING[16860] chan_sip.c: Unrecognized argument 'rtpqos,audio,normdevrtt' to CHANNEL
[Jan 14 21:56:19] WARNING[16860] func_channel.c: Unknown or unavailable item requested: 'rtpqos,audio,normdevrtt'
Comments:By: Kirill Katsnelson (kkm) 2010-01-19 14:53:16.000-0600

I repeated "context from-ptsn {...}" in the dialpan twice. Sorry.

By: Tilghman Lesher (tilghman) 2010-02-04 15:33:21.000-0600

Patch uploaded.  Needs some testing by the reporter to verify.

At a certain point, we'll add some verification testing code here, too.

By: Kirill Katsnelson (kkm) 2010-02-06 22:32:56.000-0600

Sorry, I still could not test that. The machine where I can test it is currently under production load; also, I am not sure I am finding time for that. My question is, can the change go into the trunk without me testing it? Looks straightforward and clean to me.

By: Digium Subversion (svnbot) 2010-02-17 00:25:18.000-0600

Repository: asterisk
Revision: 247124

U   trunk/channels/Makefile
U   trunk/channels/chan_sip.c
A   trunk/channels/sip/dialplan_functions.c
U   trunk/channels/sip/include/config_parser.h
A   trunk/channels/sip/include/dialog.h
A   trunk/channels/sip/include/dialplan_functions.h
A   trunk/channels/sip/include/globals.h
U   trunk/channels/sip/include/sip_utils.h

------------------------------------------------------------------------
r247124 | tilghman | 2010-02-17 00:25:16 -0600 (Wed, 17 Feb 2010) | 13 lines

Make all of the various rtpqos parameters in this branch available from the CHANNEL function.

Also includes a test for retrieving rtpqos parameters, including a NULL RTP
driver.  Additionally, some further separation of the SIP internal API into
headers was necessary.

(closes issue ASTERISK-14932)
Reported by: kkm
Patches:
      20100204__issue16652.diff.txt uploaded by tilghman (license 14)

Review: https://reviewboard.asterisk.org/r/501/

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=247124