nicknomo
Happy-IT-Guy
- Joined
- Mar 5, 2009
- Messages
- 63
- Reaction score
- 12
PLEASE SEE UPDATED CONFIGURATION:
http://pbxinaflash.com/community/in...arking-slots-valet-parking.14606/#post-104433
Basically, I wanted to give people the ability to park calls in parking spot positions of my choosing ("valet style" parking). These would often be represented by BLFs on the phone, and someone like an operator could quickly transfer calls to free slots and announce them instead of having the parking lot position read back to them. This can replicate the functionality of a key system, to some degree, where you have LINE keys.
There were many many solutions to this online, and while none of them worked for me, I was able to use them to tweak things. So, credit goes to all of those who posted their solutions. This is tested and working for me (using Elastix 2.4, Asterisk 11.5, FreePBX 2.8). Since it almost entirely involves using the Asterisk dial plan, I'm pretty sure it will work with almost all Asterisk 11 / FreePBX distros.
edit: THIS IS NOW TESTED AND WORKING WITH FREEPBX 2.11
I believe I've accounted for most situations. If a transfer comes into an occupied parking spot, it gets shot back. If someone dials into the parking spot, they can pick up a call, provided the extension is in use. The only real non-standard thing I can see is that if the extension isn't in use, and someone dials in, they can park themselves. I suppose I could've added a few more lines to account for this, but I didn't think it was really worth the extra complexity. If you park yourself, you can just hang up.
I hope this is useful to those who were in my position.
Instructions:
note: file editing can be done by using the config editor in PBXIAF or Elastix
1) If your version of FreePBX is 2.8 or earlier, turn off parking in FreePBX. We will be using a custom dialplan instead. If its a later version of FreePBX, turn off hints.
2) Edit features_general_custom.conf add this:
3) Edit extensions_custom.conf , and
a) insert this under the [from-internal-custom] section
b) at the bottom of the file, add the following
note: IF you use 4 digit extensions, change this:
exten => _70[12345],n,set(extLeng=3).
so that it says this:
exten => _70[12345],n,set(extLeng=4).
and optionally, if you are using FreePBX 2.8...
That last section is something I stole from the FreePBX generated code. You will probably want to edit this very last section of the code if you choose to use it (you don't have to!). It most likely will not work the way you want it to. It is normally found in extensions_additional.conf, but I now have it tacked to the end of extensions_custom.conf. You can enable call parking in FreePBX, set the desired behavior, and then go search for [park-dial] in extensions_additional.conf. After you find it, cut and paste it to the end of extensions_custom.conf, and disable call parking in FreePBX.
http://pbxinaflash.com/community/in...arking-slots-valet-parking.14606/#post-104433
Basically, I wanted to give people the ability to park calls in parking spot positions of my choosing ("valet style" parking). These would often be represented by BLFs on the phone, and someone like an operator could quickly transfer calls to free slots and announce them instead of having the parking lot position read back to them. This can replicate the functionality of a key system, to some degree, where you have LINE keys.
There were many many solutions to this online, and while none of them worked for me, I was able to use them to tweak things. So, credit goes to all of those who posted their solutions. This is tested and working for me (using Elastix 2.4, Asterisk 11.5, FreePBX 2.8). Since it almost entirely involves using the Asterisk dial plan, I'm pretty sure it will work with almost all Asterisk 11 / FreePBX distros.
edit: THIS IS NOW TESTED AND WORKING WITH FREEPBX 2.11
I believe I've accounted for most situations. If a transfer comes into an occupied parking spot, it gets shot back. If someone dials into the parking spot, they can pick up a call, provided the extension is in use. The only real non-standard thing I can see is that if the extension isn't in use, and someone dials in, they can park themselves. I suppose I could've added a few more lines to account for this, but I didn't think it was really worth the extra complexity. If you park yourself, you can just hang up.
I hope this is useful to those who were in my position.
Instructions:
note: file editing can be done by using the config editor in PBXIAF or Elastix
1) If your version of FreePBX is 2.8 or earlier, turn off parking in FreePBX. We will be using a custom dialplan instead. If its a later version of FreePBX, turn off hints.
2) Edit features_general_custom.conf add this:
Code:
parkedcalltransfers = caller
parkedcallreparking = caller
parkext=700
parkpos=701-705
context=parkedcalls
parkingtime=60
pickupexten=*8
parkext_exclusive=no
;Enter any other desired parking lot variables.
;See list of variables here
;https://wiki.asterisk.org/wiki/display/AST/Asterisk+12+Configuration_res_parking
3) Edit extensions_custom.conf , and
a) insert this under the [from-internal-custom] section
Code:
include => park-hints2
b) at the bottom of the file, add the following
note: IF you use 4 digit extensions, change this:
exten => _70[12345],n,set(extLeng=3).
so that it says this:
exten => _70[12345],n,set(extLeng=4).
Code:
[park-hints2]
include => park-hints-custom
exten => 701,hint,park:701@parkedcalls
exten => 702,hint,park:702@parkedcalls
exten => 703,hint,park:703@parkedcalls
exten => 704,hint,park:704@parkedcalls
exten => 705,hint,park:705@parkedcalls
exten => _70[12345],1,Set(PARKINGEXTEN=${EXTEN})
;start state debugging info
exten => _70[12345],n,NoOP(Park in parkinglot: ${PARKINGEXTEN})
exten => _70[12345],n,NoOP(Checking for parking lot: park:${EXTEN}@parkedcalls)
exten => _70[12345],n,NoOP(Parking Lot State: ${DEVICE_STATE(park:${EXTEN}@parkedcalls)})
;end state debugging info
;IF YOU HAVE TWO DIGIT USER EXTENSIONS, THIS WILL NOT WORK FOR YOU!
;IF YOU USE 4 DIGIT EXTENSIONS, SET extLeng=4 !!!!!!!!!
exten => _70[12345],n,set(extLeng=3)
;If the line is not in use, we park it. Otherwise, we return the call to whomever transferred it
exten => _70[12345],n,GotoIf($[ ${DEVICE_STATE(park:${EXTEN}@parkedcalls)} =NOT_INUSE ] ?PARK,1)
;Start Busy/non-park debugging for non park scenario
exten => _70[12345],n,NoOP(Park is INUSE: ${EXTEN})
exten => _70[12345],n,NoOP(Failed park: ${EXTEN}@parkedcalls)
exten => _70[12345],n,NoOP(Transferer of Park: ${BLINDTRANSFER})
;Stop Busy/non-park debugging for non park scenario
exten => _70[12345],n,GotoIf($[ "${BLINDTRANSFER:4:${extLeng}}" = "" ] ?PICKUPPARK)
exten => _70[12345],n,NoOP(Transferred call, sending back to: ${BLINDTRANSFER:4:${extLeng}} )
exten => _70[12345],n,dial(local/${BLINDTRANSFER:4:${extLeng}}@from-internal,,tr)
exten => _70[12345],n,Hangup()
exten => _70[12345],n(PICKUPPARK),NoOP(This is an inside call, Pick up Park Extension: ${EXTEN})
exten => _70[12345],n(PICKUPPARK),ParkedCall(${EXTEN})
exten => _70[12345],n(PICKUPPARK),Hangup()
;Park The call
exten => PARK,1,Park(,from-internal,${BLINDTRANSFER:4:${extLeng}},,s)
exten => PARK,n,Hangup()
;This is for park retrieval - it is an additional option to dialing the number directly
;Best if use with a "prefix" DSS key bound to **.
exten => _**70[12345],1,NoOP(PICK UP PARKED CALL!!!!!!!!!: ${EXTEN})
exten => _**70[12345],n,ParkedCall(${EXTEN:2})
exten => _**70[12345],n,Hangup()
and optionally, if you are using FreePBX 2.8...
Code:
[park-dial]
include => park-dial-custom
exten => t,1,Noop(Parked Call Timed Out and Got Orphaned)
exten => t,n,Goto(ivr-3,s,1)
exten => _[0-9a-zA-Z*#].,1,Noop(Parked Call Timed Out and Got Orphaned)
exten => _[0-9a-zA-Z*#].,n,Goto(ivr-3,s,1)
That last section is something I stole from the FreePBX generated code. You will probably want to edit this very last section of the code if you choose to use it (you don't have to!). It most likely will not work the way you want it to. It is normally found in extensions_additional.conf, but I now have it tacked to the end of extensions_custom.conf. You can enable call parking in FreePBX, set the desired behavior, and then go search for [park-dial] in extensions_additional.conf. After you find it, cut and paste it to the end of extensions_custom.conf, and disable call parking in FreePBX.
Last edited: