---------------------------------------- From: "Phil Frost" <p...@macprofessionals.com> Sent: Thursday, February 23, 2012 4:39 PM To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users@lists.digium.com> Subject: Re: [asterisk-users] Rejecting transfers to in-use parking spaces
On Feb 23, 2012, at 16:32 , Richard Mudgett wrote: >> exten => _*70[123],1,NoOp(parking in ${EXTEN:1}) >> same => n,Set(PARKINGEXTEN=${EXTEN:1}) >> same => >> n,GotoIf(${DEVICE_STATE(park:${PARKINGEXTEN}@parkedcalls)}=INUSE?busy) >> same => n,Park() >> same => n(busy),Busy() >> >> What I'm hoping to >> accomplish is have Asterisk respond to the Sip REFER to *701 with a >> 404 or similar response; if Asterisk can do this, then the Snom will >> say "transfer failed!". > The dialplan device state check above is not always going to work > because another call could park in that space between the check > and the actual park. [...] > > Please note that for Asterisk to detect an extension as a parking > extension, the first priority of the extension must be the park > application. If the park application is not the first priority of > the extension, then the transfer is treated as a normal transfer. Hmm. Well, I could live with that race condition. Our call volume is low enough that the odds of hitting it acceptably low. I'm not entirely sure what it means for Asterisk to detect an extension as a parking extension. Can you please explain how a parking transfer is different than a normal transfer? -- _____________________________________________________________________ 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. [DoPark-Pickup-BlindPark] exten => s,1,NoOp(Dynamic Parking Pickup) exten => s,n,NoOp(Return Parked Call) exten => s,n,GoToIf($[${LEN(${BLINDTRANSFER})} > 0]?doParkAttempt,1) exten => s,n,ParkedCall( PLACE DIALED EXTENSION VARIABLE HERE) exten => doParkAttempt,1,NoOp(Attempt To Park) Place logic to parse the ${BLINDTRANSFER} to get the return to extension exten => doParkAttempt,n,Set(PARKINGLOT="Your Lot or var to handle the lot") exten => doParkAttempt,n,Set(PARKINGEXTEN=( PLACE DIALED EXTENSION VARIABLE HERE)) exten => doParkAttempt,n,Park(time out, return_context, return_ext, return priority, s) If park fails return the call back to your return context, exten, priotiry exten => doParkAttempt,n,Goto(return_context,return,ext, return priority) Good luck Bryant exten => doParkAttempt,n,Goto(return_context,return,ext, return priority) Good luckBryant
-- _____________________________________________________________________ -- 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