[asterisk-users] Rejecting transfers to in-use parking spaces

Richard Mudgett rmudgett at digium.com
Thu Feb 23 15:32:32 CST 2012


> I'm trying to emulate the functionality of our existing phone system,
> which is somewhat different than what Asterisk provides with a
> trivial parking configuration. I'd like each user to have three park
> buttons, park 1, park 2, park 3. The snom 870s I'm using have a
> "Park+Orbit" button, which best I can determine, is a shortcut to
> transfer someone to an extension. So, I defined some extensions:
> 
> 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()
> 
> As you can see, I'm calling Busy() if someone is already parked in
> the space, but this doesn't do what I'd like. 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!". As it is, the transfer is successful, and
> the caller hears a busy tone. Is there an application that has the
> effect of "Pretend this extension doesn't exist", or can I somehow
> get the caller back to the person that tried to park them in this
> space that's in use?

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.  The device state check in this case is
also unnecessary because Park will continue executing dialplan if
the park fails.

You could try three parkinglots with one parking space each.  Each
phone park button would transfer the call to a different parkinglot.
Then all you need to do is include the parkinglot context(s) into your
dialplan context to have access to the generated parking extensions.

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.

Richard



More information about the asterisk-users mailing list