Add and document PARKEDCALL variable set during timeout
authorJonathan Rose <jrose@digium.com>
Wed, 14 Dec 2011 21:08:20 +0000 (21:08 +0000)
committerJonathan Rose <jrose@digium.com>
Wed, 14 Dec 2011 21:08:20 +0000 (21:08 +0000)
PARKEDCALL variable tracks which parking lot the call was last parked in.  This can be
used afterwards for flow control when returntoorigin is set to off. I went ahead and
documented both this and the existing variable set during timeout (PARKINGSLOT) in
the sample features.conf since there was no prior mention of variables being set during
timeout.

(closes issue ASTERISK-16239)
Reported By: Clod Patry
Patches:
M17503.diff uploaded by Clod Patry (license 5138)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@348161 65c4cc65-6c06-0410-ace0-fbb531ad65f3

configs/features.conf.sample
main/features.c

index 4043c38..904c5d9 100644 (file)
@@ -43,8 +43,9 @@ context => parkedcalls          ; Which context parked calls are in (default par
                                 ;         created in the 'park-dial' context.  This extension will be set up to do a
                                 ;         Dial() to 'SIP/0004F2040001'.
                                 ;
-                                ;         During the timeout procedure, the following variable is set
+                                ;         During the timeout procedure, the following variables are set
                                 ;         PARKINGSLOT - extension that the call was parked in prior to timing out
+                                ;         PARKEDLOT - name of the lot that the call was parked in prior to timing out
 
 ;courtesytone = beep            ; Sound file to play to when someone picks up a parked call
                                 ; and also when the Touch Monitor is activated/deactivated.
index e03e685..6f23bd3 100644 (file)
@@ -4632,6 +4632,7 @@ static int manage_parked_call(struct parkeduser *pu, const struct pollfd *pfds,
 
                                snprintf(parkingslot, sizeof(parkingslot), "%d", pu->parkingnum);
                                pbx_builtin_setvar_helper(chan, "PARKINGSLOT", parkingslot);
+                               pbx_builtin_setvar_helper(chan, "PARKEDLOT", pu->parkinglot->name);
                                set_c_e_p(chan, "parkedcallstimeout", peername_flat, 1);
                        }
                } else {