Parked call time out

Hello,

Is it possible to change the default behavior when a parked call times out?

I have noticed that if a parked call times out, it will try to contact the original extension again.

If this fails for any reason (e.g. the extension is busy), then the asterisk hangs up the connection:


== Timeout for SIP/brian2-f8ba parked on 701. Returning to park-dial,SIP/brian,1
Aug 3 14:22:34 WARNING[8858]: pbx.c:1798 ast_pbx_run: SIP/brian2-f8ba already has a call record??
Aug 3 14:22:34 WARNING[8858]: cdr.c:143 ast_cdr_start: CDR on channel ‘SIP/brian-28b4’ already started
Aug 3 14:22:34 WARNING[8858]: cdr.c:143 ast_cdr_start: CDR on channel ‘SIP/brian-a61f’ already started
Aug 3 14:22:34 WARNING[8858]: cdr.c:143 ast_cdr_start: CDR on channel ‘SIP/brian-6841’ already started
– Executing Dial(“SIP/brian2-f8ba”, “SIP/brian||t”) in new stack
– Called brian
– Got SIP response 486 “Busy” back from 10.0.1.137
– SIP/brian-36b4 is busy
== Everyone is busy/congested at this time
Aug 3 14:22:44 WARNING[8858]: pbx.c:1952 ast_pbx_run: Timeout, but no rule ‘t’ in context ‘park-dial’
— cut —

(sidenote: where does that t option to Dial come from? I don’t use this option anywhere is my extensions.conf)

Is it possible to change this so asterisk won’t automatically hangup parked calls?

I tried definining a “t” rule in park-dial, but it doesn’t seem to be used,
despite the error.

Several options I can think of:

  1. have all phones ring.
  2. park call again for another xx seconds (needs to be using
    the same parked call extension).

Is anything like this possible?

Have you tried putting the “t” rule in the context that the original extension’s in? As it’s trying that original extension again before hanging up, it seems like the logical place for it.

I considered that, but it appered to be the wrong solution entirely.

The t rule executes after a timeout occurs waiting for the user to enter an extension; however in this case I don’t want the use to enter an extension in the first place.

I want to redefine the behaviour when the parked call times out. This is completely different.

asterisk appears to automatically create a “park-dial” context for the purpose (as seen by the output of “show dialplan park-dial”, however, it only creates one rule, in this case:

snoopy*CLI> show dialplan park-dial
[ Conect ‘park-dial’ created by ‘res_features’ ]
‘zap/1’ => 1. Dial(Zap/1||t)

Hence if the dial command fails for any reason (i.e. the line is busy), it waits for an extension. If it doesn’t get this extension, it executes the “t” rule in this context (as per error message).

I would like to override this behaviour. I don’t want it to wait for an extension. This is confusing for the caller. So far my changes I have tried do not seem to have any effect.

I’ve been searchign around some forums for the answer to this exact question.

I’m currently using Asterisk @ Home 2.5, and I’ve used AMP to create a ring-group that will ring all phones (defined in /etc/asterisk/extensions_additional.conf: exten => 199 in context [ext-group]).

When a parked call times out, I’d like it to go to this ring-group, instead of ringing back on the channel that parked it.

AAH 2.5 has a context in /etc/asterisk/extensions.conf labeld [default], and a comment identifies it as the location that parked calls go to when they time-out, but I believe that this is incorrect, since the context contains steps that play a goodbye message before hanging up on the parked caller. This doesn’t happen for me.

Can anyone think of a way to redirect a timed-out parked call?

Thanks

Jared Liebl
MIS Manager
Climatic Control Company

other examples exist in an A@H install like 7777 which basically does exten => 7777,1,Goto(from-pstn,s,1)

if this doesn’t suffice, maybe [default] exten => s,1,Goto(ext-group,100,1) will, where 100 is the ring group number

[quote]if this doesn’t suffice, maybe

[default] exten => s,1,Goto(ext-group,100,1)
will, where 100 is the ring group number[/quote]

This is almost exactly what I tried (199, though, instead of 100). It doesn’t work. Asterisk doesn’t appear to actually use the ‘[default]’ context for this purpose, even though the comments in extensions.conf suggest that it does.

I believe (at least if I’m following his description correctly) that bam suggests above that Asterisk creates its own context dynamically when a parked call times out.

Really, my question boils down to: “what context do parked calls end up in when they reach their time-out”. A follow up question would be “Can we make modifications to that context”.

This is really causing me some trouble. We’re actully losing customer’s calls because the channel that parks them is on another call when the park time limit is reached.

If anyone has any experience, suggestions or ideas I’d love to hear them.

I think that I figured out a solution, at least for my circumstances. I don’t know if it will help with bam’s problem.

You can actually specify the [park-dial] context, and add extensions to it. I added the following to /etc/asterisk/extensions_additional.conf:

[park-dial] exten => t,1,Goto(ext-group,199,1)

Here’s what actually happens:

1.) the park-time expires, and the call rings back on the channel that parked it (I haven’t found a way around this yet).
2.) If the channel that parked the call is busy, or doesn’t answer, the call moves on to the ‘t’ extension, which passes the parked call on to the ring-group 199 in context [ext-group] (which was specified in AMP).

If bam wants to skip the step where it rings back on the channel that parked the call, I have a feeling that he’s going to have to override some of the settings in /etc/asterisk/features.conf by creating some extensions with the ParkAndAnnounce() application.

The above solution didn’t work for me, have you been able to get rid of this Bam ?

I was able to use that solution for my setup, but, what if no one else answers? The call gets hung up at this stage instead. I could use the Park application to park the call again, but how do I send the original parking extension so that I can park the call back in the same spot? And, how do I send the originally dialed extension so that I can have the parked call try to dial it again?

If a parked call times out, I want to call everyone, which I can do. If that times out, I want to park the call again back to where it came from. Any ideas on how to send the park extension to a variable?

Also, I"m having trouble getting music to play in park using MusicOnHold. Watching the Asterisk console, it starts and stops MusicOnHold about four times and doesn’t actually play anything. Any ideas how to set that up?

The code below will serve as a starting point to help you accomplish the things you’ve mentioned above.
It will ring the extension that parked the call (again) for 30 seconds after no one picks up the first time. If no one picks up again, it will send the parked caller to the voicemail box of the person who parked the call. We use priority 2 as the starting point because Asterisk automatically creates priority 1. This works for 3 digit extensions but can be easily changed to work with extensions of any length.

[park-dial]
exten => _.,2,Dial(${EXTEN}|30|t)
exten => _.,3,Voicemail(u${EXTEN:-3})

Ethan Lee
Consultant
VoipClear Communications
asteriskconsultant@gmail.com