[asterisk-users] Sticky Park

C. Chad Wallace cwallace at lodgingcompany.com
Thu Aug 27 14:12:39 CDT 2009


At 11:52 AM on 27 Aug 2009, Mat Murdock wrote:

> [parkedcallstimeout]
> 
> exten => _SIP011XX,1,Answer()
> exten => _SIP011XX,n,NoOp(Call Parked on: ${PARKINGSLOT})
> exten => _SIP011XX,n,NoOp(This is who parked us: ${EXTEN})
> exten => _SIP011XX,n,Set(PARKINGEXTEN=${PARKINGSLOT})
> ;This sets the PARKINGEXTEN to the parking slot we were parked in.
> exten => 
> _SIP011XX,n,Dial(SIP/${EXTEN:4:4},${RINGTIMER},${INTERNAL_DIAL_OPTIONS})
> ;This send the call back to the person who parked it.  There are a 
> couple of global variables I use here.  Nothing unusual here.
> 
> 
> So what is the problem?  Well the problem is that the PARKINGEXTEN 
> variable gets reset after the dial command in parkedcallstimeout.
> That makes it so I cannot find out where that call was originally
> parked  If I can find out how to get that little bit of information
> when the call is re-parked then I think this will work.  If anyone
> has any suggestions on how to accomplish this I would be grateful.

Have you tried prefixing PARKINGEXTEN with '__' (two underscores) on
the Set call in parkedcallstimeout?  That makes it a persistent
variable, which will be inherited by sub-channels, like after a Dial.

exten => _SIP011XX,n,Set(__PARKINGEXTEN=${PARKINGSLOT})

You might only need one underscore. 
For more info, see 'core show application set'.


-- 

C. Chad Wallace, B.Sc.
The Lodging Company
http://www.skihills.com/
OpenPGP Public Key ID: 0x262208A0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090827/1b884d9c/attachment.pgp 


More information about the asterisk-users mailing list