Summary:ASTERISK-03917: Call Parking times out to the wrong extension
Reporter:ewieling (ewieling)Labels:
Date Opened:2005-04-14 18:07:07Date Closed:2005-04-24 11:30:15
Versions:Frequency of
Environment:Attachments:( 0) parkingtimeout.rev0.txt
Description:I'm able to call park just fine, I can pick up a call just fine.  but if nobody picks up the call and Asterisk tries to send the call back to te extension that parks it, it fails.


001  -- Executing NoOp("SIP/0004f201e463-a-7650", "EXTEN=3599 CONTEXT=toll-access") in new stack
002  -- Executing Dial("SIP/0004f201e463-a-7650", "SIP/0004f200cf85-a") in new stack
003  -- Called 0004f200cf85-a
004  -- SIP/0004f200cf85-a-de7a is ringing
005  -- SIP/0004f200cf85-a-de7a answered SIP/0004f201e463-a-7650
006  -- Attempting native bridge of SIP/0004f201e463-a-7650 and SIP/0004f200cf85-a-de7a
007  -- Started music on hold, class 'default', on SIP/0004f201e463-a-7650
008  -- Executing Park("SIP/0004f200cf85-a-bbca", "") in new stack
009  == Parked SIP/0004f200cf85-a-bbca on 3516. Will timeout back to toll-access,s,1 in 30 seconds
010  -- Playing 'digits/3' (language 'en')
011  -- Playing 'digits/5' (language 'en')
012  -- Playing 'digits/1' (language 'en')
013  -- Playing 'digits/6' (language 'en')
014  -- Added extension '3516' priority 1 to parkedcalls
015  -- Started music on hold, class 'default', on SIP/0004f200cf85-a-bbca
016  == Spawn extension (toll-access, s, 1) exited KEEPALIVE on 'SIP/0004f200cf85-a-bbca'
017  -- Stopped music on hold on SIP/0004f200cf85-a-bbca
018  -- Stopped music on hold on SIP/0004f201e463-a-7650
019  -- Started music on hold, class 'default', on SIP/0004f201e463-a-7650
020  == Spawn extension (toll-access, 3599, 2) exited non-zero on 'SIP/0004f200cf85-a-bbca<ZOMBIE>'
021  == Timeout for SIP/0004f201e463-a-7650 parked on 3516. Returning to toll-access,s,1
022  -- Stopped music on hold on SIP/0004f201e463-a-7650
023  == Starting SIP/0004f201e463-a-7650 at toll-access,s,1 failed so falling back to exten 's'
024  == Starting SIP/0004f201e463-a-7650 at toll-access,s,1 still failed so falling back to context 'default'
Comments:By: ewieling (ewieling) 2005-04-14 18:12:51

parkext => 3515
parkpos => 3516-3519
context => parkedcalls
parkingtime => 30

By: ewieling (ewieling) 2005-04-19 12:11:18

US$50 bounty for a fix before 3pm April 21.  Must be accepted into 1.0.x CVS.

By: Tilghman Lesher (tilghman) 2005-04-19 14:39:33

Might also want to post the relevant parts of your extensions.conf.

By: ewieling (ewieling) 2005-04-19 15:26:01

No special stuff for parking in extensions.conf since res_features creates the extensions for you, dynamicaly.

exten => 3599,1,Noop(EXTEN=${EXTEN} CONTEXT=${CONTEXT})
exten => 3599,2,Dial(SIP/0004f200cf85-a)

By: Tilghman Lesher (tilghman) 2005-04-19 16:03:28

Well, I'm wondering why it's starting at toll-access,s,1, if the original extension is 3599, not 's'.

By: Tilghman Lesher (tilghman) 2005-04-19 16:05:49

Well, it appears to be intentional:  park_call_exec() explicitly sets the extension to "s", priority to 1.  If you comment that out, I suspect this will work exactly the way you want, but I doubt it'll go into CVS, as this appears to be a conscious design decision.

By: ewieling (ewieling) 2005-04-19 16:08:16

Then that needs to be 1) fixed or 2) documented.

There's a lot of code in there to save the extension and context.

By: Russell Bryant (russell) 2005-04-19 16:56:41

This patch will probably make it work how you want it to.

However, this does change the behavior of parking in 1.0 ...

I'm not sure what the best way to handle this is.  If I do end up adding it to CVS, it will almost certainly be a new option.

This is one of those annoying issues that treads on that boundary of bug vs. feature.

By: Russell Bryant (russell) 2005-04-19 17:03:54

On second thought, this is almost certainly a new feature, unless someone can come up with a pretty convincing argument for calling it a bug.  :)

By: Kevin P. Fleming (kpfleming) 2005-04-20 11:47:03

People are reporting this does not behave this way in CVS HEAD; can we figure out what the difference is so that stable doesn't get a different fix?

By: Russell Bryant (russell) 2005-04-20 11:54:51

My patch basically makes the do_parking_thread have the same behavior of CVS HEAD.  I actually started by copying do_parking_thread from CVS HEAD to write the patch.

In CVS head, we timeout to the peer that parked the call.  In 1.0, we timeout to the 's' extension in the context from which the call came.  The change came in a commit by jim.  For the diff on the web cvs viewer, see http://asterisk.espia-net.net/horde/chora/diff.php/asterisk/res/res_features.c?login=2&r1=1.22&r2=1.23&ty=h

It may be a good idea to make this optional in CVS head, but for now, I was going to commit a note to UPGRADE.txt to note the change in behavior.

By: Kevin P. Fleming (kpfleming) 2005-04-20 12:48:28

Now I don't understand how this was ever supposed to work at all...

By: Russell Bryant (russell) 2005-04-23 01:41:20

... did this work for you?

I haven't heard anything since the time when you needed this.

By: Russell Bryant (russell) 2005-04-24 11:29:47

This is not being included in 1.0.

Personally, I think that the new behavior in CVS HEAD should be optional, since a lot of people probably prefer the "old" way.