On Feb 23, 2012, at 18:44 , Bryant Zimmerman wrote:
> 
> I was working on this today. I have it figured out but I don't have simple 
> dialplan code I can share as we are doing a lot of external db and script 
> calls to make ours work with our realtime stuff. We also are using the 
> Dynamic Parking stuff as well I pulled that out to simplify things. [dialplan 
> example follows]

Thanks, that was very helpful. I tweaked a bit, and ended up with this working 
code:

exten => _70[123],1,NoOp(Dynamic Parking Pickup from ${BLINDTRANSFER})
    ; if this was a blind transfer, attempt to park the call. Otherwise, unpark
    ; the call.
    same => n,GoToIf($[${LEN(${BLINDTRANSFER})} > 0]?attemptpark)
    same => n,ParkedCall(${EXTEN})

    same => 100(attemptpark),NoOp(Attempt To Park)
    same => n,Set(PARKRETURNTO=${CUT(BLINDTRANSFER,-,1)})
    same => n,Set(PARKINGEXTEN=${EXTEN})
    same => n,Park(,${CONTEXT},${EXTEN},200,s)  ; return priority here must be 
a number, not a label.
    same => n,Goto(200)

    ; send the call back to the sender. Either the park timed out, or the
    ; parking space was in use, or otherwise failed to park.
    same => 200(backtosender),Dial(${PARKRETURNTO},300)

I'm a bit unsure if grabbing the channel name from BLINDTRANFSER, cutting off 
the bit after "-", and passing that to Dial() is the Right Thing. It appears to 
work, though I'm quite inexperienced. I guess my concern is that the channel 
names might not necessarily be a dial()able thing. Of course, it would be 
better if I could just reject the transfer, but that doesn't sound like it's 
possible. Anyone have pointers on how to make this more robust? Is there any 
way I can get more information about the channel referenced by BLINDTRANSFER? 
Maybe I'll also dial the front desk after dialing PARKRETURNTO, just in case.

On the phone side, I configured three BLFs for 701-703. This does require that 
to park a caller, the receptionist hits "transfer", then the BLF. However, this 
is more explicit, and avoids a weird case where someone else parks a call just 
before the receptionist hits the park button, so she ends up putting the caller 
on hold and unparking someone else, rather than parking the caller as she 
intended. I think I'll teach users to not depend so heavily on park, and they 
will adapt.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to