[Home]

Summary:ASTERISK-07251: Asterisk hangs up on parked calls when using applicationmap
Reporter:Alistair Cunningham (acunningham)Labels:
Date Opened:2006-06-29 08:50:25Date Closed:2011-06-07 14:08:28
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_features
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) hangup_full.txt
( 1) hangup.txt
Description:This is probably related to bug 7090, which I previously reported, was fixed, and which I am re-testing on the customer's system. The system is now running 1.2.9.1.

If you have the following in features.conf:

[applicationmap]
park_caller => **,callee,Park
park_called => **,caller,Park

When someone calls you and you press **, you hear "701", then hear MOH until you hang up (should the person doing the transfering hear MOH?). At the same time Asterisk hangs up on the caller, rather than playing MOH.

Asterisk console output with "set verbose 9", "set debug 9", and "sip debug" from just before pressing ** to after Asterisk has hung up on the caller is attached. More debugs are available on request.
Comments:By: Serge Vecher (serge-v) 2006-06-29 09:07:00

ugh, you should convert all those mp3s to ulaw/alaw files -- this has been found to be incompatible with "production use"

Please capture a complete transaction, you can't see an original INVITE initiating transfer.

By: Alistair Cunningham (acunningham) 2006-06-29 09:36:36

Attached is a full trace from /var/log/asterisk/full from the start of the call.

By: Alistair Cunningham (acunningham) 2006-06-29 09:37:37

The full trace is of me calling out, then parking the called party. It gives the same result.

By: Russell Bryant (russell) 2006-07-23 01:01:50

This "bug" is actually very interesting.  Let me explain what is happening here ...

First of all, you have defined two features with the same key sequence of "**" and you have them both enabled at the same time.  This really isn't a good idea.

park_caller => **,callee,Park

This one says if one of the parties on the call presses "**", execute the Park application on the person this party is talking to.

park_called => **,caller,Park

This one says if one of the parties on the call presses "**", execute the Park application on the person who pressed this key sequence.

Now, in a call, which one do you think would actually be in effect when someone presses "**"?  It turns out that the last one listed in the config file will be the one that is actually executed.  This means that any time someone presses "**", they are executing the Park application on themselves.

Now, what does "Park" actually do?

*CLI> show application Park
 -= Info about application 'Park' =-

[Synopsis]
Park yourself

[Description]
Park():Used to park yourself (typically in combination with a supervised
transfer to know the parking space).
<snip>

That's right, the caller is literally parking themselves!  So, the behavior you are seeing is exactly what is expected.

I hope this makes sense ...



By: Russell Bryant (russell) 2006-07-23 02:05:10

I remember that we discussed something related to this at the Asterisk developer conference this Summer.  I thought I remembered what it was, but now I don't think I remember the conversation correctly.  I'd like to leave this open at least as a reminder for me to go back and find out what it was we decided needed to be implemented ...



By: Alistair Cunningham (acunningham) 2006-07-23 15:22:10

Russell,

Thank you for clarifying. It seems I misunderstood the purpose of the caller/callee field. We'll go back to using the normal park method. From our point of view, this ticket can be closed whenever is convenient for you. Thank you for your help.



By: Russell Bryant (russell) 2006-07-23 15:38:34

If you leave only "park_caller => **,callee,Park" in your applicationmap, then it will ... kind of work.  However, I still don't think it's going to work the way you would like it to work.  If someone presses "**", the other party will get parked, but the person doing the parking will not hear the parked extension.  The caller getting parked will hear it, instead, which isn't so useful.

I agree that being able to define a feature code for parking would be useful, it will just have to be implemented in a special way.

By: Alistair Cunningham (acunningham) 2006-07-23 15:51:38

Actually, what would be perfect from our point of view would be for the call park code (and perhaps extension to use) to be set in variables at the start of the call from extensions.conf or an AGI program.

By: Russell Bryant (russell) 2006-08-05 03:52:55

I have started a discussion on the asterisk-dev mailing list regarding what to do to fix up the applicationmap.  I should have it fixed up by the time 1.4 is released.  I will also write some decent documentation that explains how it works, and what it is intended to be used for.  Thanks