Summary:ASTERISK-16284: [patch] comebacktoorigin=no returns to flattened channel, not extensions s, for parked call timeout
Reporter:David Woolley (davidw)Labels:
Date Opened:2011-01-20 12:12:03.000-0600Date Closed:2011-03-29 08:23:59
Versions:Frequency of
Environment:Attachments:( 0) patch.diff
Description:There appears to be a cut and paste error in the parked call timeout code, when combacktoorigin=no and there is a peer channel.  Instead of returning to (parkedcallstimeout, s, 1), as indicated by a warning, output in 1.6.2 branch, it actually returns to (parkedcallstimeout, <peername_flat>, 1).

This may work most of the time because of fallback processing in the PBX, but is clearly a cut and paste error from the comebacktoorigin=yes branch.


Except for the complete removal of the warning, the code in this area is unchanged in trunk from when it first went in.

Examples of this happening in real life can be found in comments, about 1.6.x, in DLNoah's comments on ASTERISK-13819  Unfortunately that issue, itself, was invalid, as it related to 1.4, where the feature hadn't been added, so the comments got lost.

The code in question, in 1.6.2 branch, with blames, is:

205287    dbrooks                                       if (comebacktoorigin) {
205287    dbrooks                                               set_c_e_p(chan,
pu->parkinglot->parking_con_dial, peername_flat, 1);
205287    dbrooks                                       } else {
205287    dbrooks                                               ast_log(LOG_WARNING, "now going to parkedcallstimeout,s,1 | ps is %d\n",pu->parkingnum);
205287    dbrooks                                               snprintf(parkingslot, sizeof(parkingslot), "%d", pu->parkingnum);
205287    dbrooks                                               pbx_builtin_setvar_helper(chan, "PARKINGSLOT", parkingslot);
205287    dbrooks                                               set_c_e_p(chan, "parkedcallstimeout", peername_flat, 1);
205287    dbrooks                                       }
Comments:By: David Woolley (davidw) 2011-01-20 12:21:33.000-0600

It looks like the trunk .conf.sample describes the de facto behaviour, even though it isn't clear why using the flattened peer name would be any use to anyone.

However, the 1.6.2 branch .conf.sample describes it as returning it to s, 1 - which I suspect was always the real intent.

Whilst I think the right change here is to roll back the .conf.sample text in trunk and fix the extension in the code in both trunk and 1.6.2, at a minimum, one needs to back port the trunk .conf.sample change and remove the warning in 1.6.2.

By: Digium Subversion (svnbot) 2011-03-29 08:17:03

Repository: asterisk
Revision: 311844

U   branches/1.6.2/main/features.c

r311844 | jrose | 2011-03-29 08:17:02 -0500 (Tue, 29 Mar 2011) | 10 lines

When comebacktoorigin=no, Asterisk no longer tries to dial extension <Originating Channe>@parkedcalltimeout and instead dials s without going through fallback.

(closes issue ASTERISK-16284)
Reported by: davidw
     patch.diff uploaded by jrose (license 1225)




By: Jonathan Rose (jrose) 2011-03-29 08:21:28

I've patched this in 1.6.2 to make the warning just a message telling the user that comebacktoorigin=no is set and also to immediately seek the 's' extension in the timeout context instead of trying to dial the originating channel name as the extension and then falling back because it isn't there.

This change is in 1.6.2 in SVN as well now.  This isn't the case with trunk since the code is different in trunk.  If this is an issue to you, please open a new issue for the equivalent bug in trunk.