Summary: | ASTERISK-14499: [patch] Multi-tenant parking broken in 1.6.1.1 - does not allocate to designated parking spaces | ||
Reporter: | John A. Sullivan III (gracedman) | Labels: | |
Date Opened: | 2009-07-20 10:30:52 | Date Closed: | 2009-11-23 20:23:17.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Features/Parking |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 2009090100_sipnewparkinglot-161.diff.txt ( 1) 2009090200_sipnewparkinglot-161-part2.diff.txt | |
Description: | We are using 1.6.1.1 from the source tarball downloaded from http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.1.1.tar.gz and running on fully patched CentOS 5.3. We are a multi-tenant environment and would like to implement call parking and would like a separate parking lot for each tenant. We defined the parking lots in features.conf with appropriate changes to sip.conf and extensions.conf (more specifically, included files) but call parking allocates spaces from the default parking lot no matter what we do. Perhaps we have configured it incorrectly. Here is the pertinent section from features.conf: [parkinglot_a10] ; EBC context => a10parking parkpos => 101-110 ;parkext => 100 findslot => next [parkinglot_a100] ; SSI context => a100parking ;parkext => 1000 parkpos => 1001-1020 findslot => next If I understand this correctly, the parkinglog_a100 would be the channel variable and a100parking the context into which parking extensions are placed. We set the channel parameter in sip.conf: [a100](!,common) context=a100 vmext=999 parkinglot=parkinglot_a100 subscribecontext=a100 accountcode=a0000-0100 fromdomain=ssiservices.biz [userx](a100) mailbox=yyy@a100,xxx@a100 secret=something callerid=John A. Sullivan III <xxx> fromuser=userid and we included the context in extensions.conf: [a100] ; SSI exten => 911,1,Macro(emergency-US,xxxxxxxxxx) exten => 9911,1,Macro(emergency-US,xxxxxxxxxx) exten => 9999,1,VoiceMailMain(${CALLERID(num)}@a100) ; Direct mail retrieval include => a100pub include => a100conf include => a100parking include => US-international include => dial-uri We also tried Set(CHANNEL(parkinglot)=parkinglot_a100). We also tried creating our own parking which yielded interesting data but no solution. Here is the console output using the regular setup described: Call comes in and is answered: -- SIP/gss-cc01c918 answered SIP/localhost-cc002cf8 -- Native bridging SIP/localhost-cc002cf8 and SIP/gss-cc01c918 -- Started music on hold, class 'default', on SIP/localhost-cc002cf8 == Using SIP RTP TOS bits 176 == Using SIP RTP CoS mark 5 Call is parked: -- Executing [700@a100:1] Park("SIP/gss-cc05ceb8", "") in new stack == Parked SIP/gss-cc05ceb8 on 701 (lot default). Will timeout back to extension [a100] s, 1 in 60 seconds -- Added extension '701' priority 1 to parkedcalls (0x2aaaacca3f70) -- <SIP/gss-cc05ceb8> Playing 'digits/7.ulaw' (language 'en') -- <SIP/gss-cc05ceb8> Playing 'digits/0.ulaw' (language 'en') -- <SIP/gss-cc05ceb8> Playing 'digits/1.ulaw' (language 'en') -- Started music on hold, class 'default', on SIP/gss-cc05ceb8 I'm not sure what is happening here but I think this is the original callee releasing the call. I don't know what the ZOMBIE extension is about: == Spawn extension (a100, s, 1) exited non-zero on 'Parked/SIP/gss-cc05ceb8<ZOMBIE>' -- Auto fallthrough, channel 'Parked/SIP/gss-cc05ceb8<ZOMBIE>' status is 'UNKNOWN' -- Executing [h@a100:1] Answer("Parked/SIP/gss-cc05ceb8<ZOMBIE>", "0.5") in new stack == Spawn extension (a100, h, 1) exited non-zero on 'Parked/SIP/gss-cc05ceb8<ZOMBIE>' -- Stopped music on hold on SIP/gss-cc05ceb8 -- Stopped music on hold on SIP/localhost-cc002cf8 -- Started music on hold, class 'default', on SIP/localhost-cc002cf8 == Spawn extension (macro-common, s, 1) exited non-zero on 'SIP/gss-cc05ceb8<ZOMBIE>' in macro 'common' == Spawn extension (a100pub, 314, 2) exited non-zero on 'SIP/gss-cc05ceb8<ZOMBIE>' == Using SIP RTP TOS bits 176 == Using SIP RTP CoS mark 5 Then we see the destination callee attempting to pick up the call and is the output of our routine to catch misdialed/unknown extensions: -- Executing [701@a100:1] GotoIf("SIP/jasiii-cc05ceb8", "0?:_.,1") in new stack -- Goto (a100,_.,1) -- Executing [_.@a100:1] Answer("SIP/jasiii-cc05ceb8", "0.5") in new stack -- Executing [_.@a100:2] Playback("SIP/jasiii-cc05ceb8", "im-sorry") in new stack -- <SIP/jasiii-cc05ceb8> Playing 'im-sorry.ulaw' (language 'en') -- Executing [_.@a100:3] Wait("SIP/jasiii-cc05ceb8", "0.0.5") in new stack -- Executing [_.@a100:4] Playback("SIP/jasiii-cc05ceb8", "you-dialed-wrong-number") in new stack -- <SIP/jasiii-cc05ceb8> Playing 'you-dialed-wrong-number.ulaw' (language 'en') -- Executing [_.@a100:5] Wait("SIP/jasiii-cc05ceb8", "0.4") in new stack -- Executing [_.@a100:6] Playback("SIP/jasiii-cc05ceb8", "vm-goodbye") in new stack -- <SIP/jasiii-cc05ceb8> Playing 'vm-goodbye.ulaw' (language 'en') -- Executing [_.@a100:7] Hangup("SIP/jasiii-cc05ceb8", "") in new stack == Spawn extension (a100, _., 7) exited non-zero on 'SIP/jasiii-cc05ceb8' -- Executing [h@a100:1] Answer("SIP/jasiii-cc05ceb8", "0.5") in new stack == Spawn extension (a100, h, 1) exited non-zero on 'SIP/jasiii-cc05ceb8' We then see the park timeout and fail to return to the original callee: -- Stopped music on hold on SIP/localhost-cc002cf8 -- Added extension 'SIP0gss' priority 1 to park-dial (0x2aaaacca2050) == Timeout for SIP/localhost-cc002cf8 parked on 701 (default). Returning to park-dial,SIP0gss,1 -- Executing [SIP0gss@park-dial:1] Dial("SIP/localhost-cc002cf8", "SIP/gss|30|") in new stack [Jul 1 01:54:56] WARNING[6401]: pbx.c:953 pbx_exec: The application delimiter is now the comma, not the pipe. Did you forget to convert your dialplan? (Dial(SIP/gss|30|)) == Using SIP RTP TOS bits 176 == Using SIP RTP CoS mark 5 [Jul 1 01:54:57] WARNING[6401]: chan_sip.c:4526 create_addr: No such host: gss|30| [Jul 1 01:54:57] WARNING[6401]: app_dial.c:1518 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown) == Everyone is busy/congested at this time (1:0/0/1) -- Auto fallthrough, channel 'SIP/localhost-cc002cf8' status is 'CHANUNAVAIL' Have I misconfigured anything or have I stumbled into a bug? We next tried to create our own park channel. We did this by adding the following to extensions.conf: [a100parking] exten => 1000,1,Set(CHANNEL(parkinglot)=parkinglot_a100) exten => 1000,n,Park() This gives us interestingly different results. First we see the call come in: -- SIP/gss-1a513628 answered SIP/localhost-cc002cc8 -- Native bridging SIP/localhost-cc002cc8 and SIP/gss-1a513628 -- Started music on hold, class 'default', on SIP/localhost-cc002cc8 == Using SIP RTP TOS bits 176 == Using SIP RTP CoS mark 5 We next see the call parked but this time using extensions from the parkinglot_a100 parking lot: -- Executing [1000@a100:1] Set("SIP/gss-1a56d498", "CHANNEL(parkinglot)=parkinglot_a100") in new stack -- Executing [1000@a100:2] Park("SIP/gss-1a56d498", "") in new stack == Parked SIP/gss-1a56d498 on 1001 (lot parkinglot_a100). Will timeout back to extension [a100] s, 1 in 45 seconds -- Added extension '1001' priority 1 to a100parking (0x1a512180) -- <SIP/gss-1a56d498> Playing 'digits/1.ulaw' (language 'en') -- <SIP/gss-1a56d498> Playing 'digits/0.ulaw' (language 'en') -- <SIP/gss-1a56d498> Playing 'digits/0.ulaw' (language 'en') -- <SIP/gss-1a56d498> Playing 'digits/1.ulaw' (language 'en') -- Started music on hold, class 'default', on SIP/gss-1a56d498 We next see that section I don't understand with the ZOMBIE and s extensions: == Spawn extension (a100, s, 1) exited non-zero on 'Parked/SIP/gss-1a56d498<ZOMBIE>' -- Auto fallthrough, channel 'Parked/SIP/gss-1a56d498<ZOMBIE>' status is 'UNKNOWN' -- Executing [h@a100:1] Answer("Parked/SIP/gss-1a56d498<ZOMBIE>", "0.5") in new stack == Spawn extension (a100, h, 1) exited non-zero on 'Parked/SIP/gss-1a56d498<ZOMBIE>' -- Stopped music on hold on SIP/gss-1a56d498 -- Stopped music on hold on SIP/localhost-cc002cc8 -- Started music on hold, class 'default', on SIP/localhost-cc002cc8 == Spawn extension (macro-common, s, 1) exited non-zero on 'SIP/gss-1a56d498<ZOMBIE>' in macro 'common' == Spawn extension (a100pub, 314, 2) exited non-zero on 'SIP/gss-1a56d498<ZOMBIE>' == Using SIP RTP TOS bits 176 == Using SIP RTP CoS mark 5 Now we see the destination callee try to pickup the parked call only to be told there is no call parked on extension 1001: -- Executing [1001@a100:1] ParkedCall("SIP/jasiii-1a56d498", "1001") in new stack -- <SIP/jasiii-1a56d498> Playing 'pbx-invalidpark.ulaw' (language 'en') -- Channel SIP/jasiii-1a56d498 tried to talk to nonexistent parked call 1001 == Spawn extension (a100, 1001, 1) exited non-zero on 'SIP/jasiii-1a56d498' -- Executing [h@a100:1] Answer("SIP/jasiii-1a56d498", "0.5") in new stack == Spawn extension (a100, h, 1) exited non-zero on 'SIP/jasiii-1a56d498' Unfortunately, we do not have the development skills to step into the code but are certainly willing to test and do whatever else we can to help resolve the issue. Thanks - John | ||
Comments: | By: John A. Sullivan III (gracedman) 2009-08-27 23:20:06 Our first client needing this feature is scheduled to go live on September 9. If there are patches available before then, we can subject them to reasonably heavy testing. Thanks - John By: Michael Cramer (micc) 2009-08-28 19:00:59 I have been trying to get multiple parking lots working for months as well. I'm currently using 1.6.1.4 and it is having the same problem. I've tried many things but it always uses default parking lot. We have about 30 clients we have promised this feature to for many months but have not been able to get it working for more than one customer. I am a programmer and can do some digging in the code when I get some time. By: Michiel van Baak (mvanbaak) 2009-08-30 12:44:31 Workaround (code in AEL) context incoming_customer_a { 31123456789 => { Set(_PARKINGLOT=parkinglot_a); Dial(SIP/customera_1000) }; }; now if customera_1000 picks up an incoming call and parks it, it will be parked in the parkinglot_a parking context. For some reason the 'parkinglot=parkinglot_a' line in a sip peer section is not used when this peer gets a call. I'm still looking where that goes wrong but for now you can use this workaround. By: John A. Sullivan III (gracedman) 2009-08-31 11:04:19 I'm afraid this workaround doesn't work :-( It gives us the same results as when we tried to build our own parking lot (documented in the original report). The call is indeed parked in the proper parking lot but then cannot be retrieved. Even if the same caller who parked the call tries to retrieve it from the parking lot, they are told there is no such parked call. Here is the console output: == Spawn extension (a100pub, h, 1) exited non-zero on 'SIP/vitel-inbound-ac08bec8' -- Started music on hold, class 'default', on SIP/vitel-inbound-ac08bec8 == Parked SIP/vitel-inbound-ac08bec8 on 1001 (lot parkinglot_a100). Will timeout back to extension [macro-common] s, 2 in 45 seconds -- Added extension '1001' priority 1 to a100parking (0x2aaad0033240) -- <SIP/jasiii-13d9f1a8> Playing 'digits/1.ulaw' (language 'en') -- <SIP/jasiii-13d9f1a8> Playing 'digits/0.ulaw' (language 'en') -- <SIP/jasiii-13d9f1a8> Playing 'digits/0.ulaw' (language 'en') -- <SIP/jasiii-13d9f1a8> Playing 'digits/1.ulaw' (language 'en') == Using SIP RTP TOS bits 176 == Using SIP RTP CoS mark 5 -- Executing [1001@a100:1] ParkedCall("SIP/jasiii-d002e988", "1001") in new stack -- <SIP/jasiii-d002e988> Playing 'pbx-invalidpark.ulaw' (language 'en') -- Channel SIP/jasiii-d002e988 tried to talk to nonexistent parked call 1001 == Spawn extension (a100, 1001, 1) exited non-zero on 'SIP/jasiii-d002e988' We tried this several different ways, e.g.: exten => 312,n,Set(__PARKINGLOT=parkinglot_a100) exten => 99999,n,Set(_PARKINGLOT=parkinglot_a100) exten => 99999,n,Set(CHANNEL(parkinglot)=parkinglot_a100) In 1.6.1.2, we also still have the problem where returning the call after 60 seconds fails because it uses the old "|" syntax instead of the "," syntax. We are certainly eager to have this fixed before our first client deployment next Wednesday and are willing to test extensively to assist in resolving the problem. Thanks - John By: Michiel van Baak (mvanbaak) 2009-08-31 22:50:37 John: Ok, so the parking is working. Good. If you want to retrieve the call, set the 'parkinglot=foo' option in sip.conf for peer jasiii. That way you can retrieve it. The problem with returning back after 60 seconds has been fixed in the 1.6.1 svn branch. The fix is available in 1.6.1.4 and later. (committed by russell at 04-22-2009) If you want to continue using 1.6.1.2 let me know and I can create a patch for you. Let me know if this works for you. If the pickup still is not working I might have a patch for you. By: John A. Sullivan III (gracedman) 2009-09-01 06:38:27 Alas, that doesn't work. That's pretty much the scenario when we tried to create our own parking lot as described above. Unless I've misconfigured them, we've already had those settings: [a100](!,common) context=a100 vmext=xxxx parkinglot=parkinglot_a100 subscribecontext=a100 accountcode=a0000-0100 fromdomain=ssiservices.biz ;realm=pbx01.ssiservices.biz [jasiii](a100) We'll be upgrading to 1.6.1.5 shortly so need for a separate patch. Thanks for the offer. We've been holding off in case there was a patch available for this which we could apply to our 1.6.1.5 build. If you have a patch for the pickup, we'll give it a try. Thanks - John By: Michiel van Baak (mvanbaak) 2009-09-01 07:14:37 John: Ok, then the changes I made to my local tree were the fix for the pickup. See attached patch. By: John A. Sullivan III (gracedman) 2009-09-01 23:54:18 I am able to retrieve calls now. Thank you very much - John By: Digium Subversion (svnbot) 2009-09-02 10:57:33 Repository: asterisk Revision: 215462 U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r215462 | mvanbaak | 2009-09-02 10:57:32 -0500 (Wed, 02 Sep 2009) | 12 lines Honor configured parkinglot when parking and retrieving parked calls Thank oej for pointing out the fact that sip_new did not copy parkinglot from the peer into the newly created channel. (closes issue ASTERISK-14499) Reported by: gracedman Patches: 2009090100_sipnewparkinglot-161.diff.txt uploaded by mvanbaak (license 7) With mod by me to also fix callparking as well (this uploaded patch only fixed retrieving a parked call) Tested by: gracedman, mvanbaak ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=215462 By: Digium Subversion (svnbot) 2009-09-02 10:59:02 Repository: asterisk Revision: 215463 _U branches/1.6.0/ ------------------------------------------------------------------------ r215463 | mvanbaak | 2009-09-02 10:59:02 -0500 (Wed, 02 Sep 2009) | 18 lines Blocked revisions 215462 via svnmerge ........ r215462 | mvanbaak | 2009-09-02 17:56:46 +0200 (Wed, 02 Sep 2009) | 12 lines Honor configured parkinglot when parking and retrieving parked calls Thank oej for pointing out the fact that sip_new did not copy parkinglot from the peer into the newly created channel. (closes issue ASTERISK-14499) Reported by: gracedman Patches: 2009090100_sipnewparkinglot-161.diff.txt uploaded by mvanbaak (license 7) With mod by me to also fix callparking as well (this uploaded patch only fixed retrieving a parked call) Tested by: gracedman, mvanbaak ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=215463 By: Digium Subversion (svnbot) 2009-09-02 11:02:05 Repository: asterisk Revision: 215464 _U branches/1.6.1/ U branches/1.6.1/channels/chan_sip.c ------------------------------------------------------------------------ r215464 | mvanbaak | 2009-09-02 11:02:04 -0500 (Wed, 02 Sep 2009) | 19 lines Merged revisions 215462 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r215462 | mvanbaak | 2009-09-02 17:56:46 +0200 (Wed, 02 Sep 2009) | 12 lines Honor configured parkinglot when parking and retrieving parked calls Thank oej for pointing out the fact that sip_new did not copy parkinglot from the peer into the newly created channel. (closes issue ASTERISK-14499) Reported by: gracedman Patches: 2009090100_sipnewparkinglot-161.diff.txt uploaded by mvanbaak (license 7) With mod by me to also fix callparking as well (this uploaded patch only fixed retrieving a parked call) Tested by: gracedman, mvanbaak ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=215464 By: Digium Subversion (svnbot) 2009-09-02 11:08:40 Repository: asterisk Revision: 215465 _U branches/1.6.2/ U branches/1.6.2/channels/chan_sip.c ------------------------------------------------------------------------ r215465 | mvanbaak | 2009-09-02 11:08:39 -0500 (Wed, 02 Sep 2009) | 19 lines Merged revisions 215462 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r215462 | mvanbaak | 2009-09-02 17:56:46 +0200 (Wed, 02 Sep 2009) | 12 lines Honor configured parkinglot when parking and retrieving parked calls Thank oej for pointing out the fact that sip_new did not copy parkinglot from the peer into the newly created channel. (closes issue ASTERISK-14499) Reported by: gracedman Patches: 2009090100_sipnewparkinglot-161.diff.txt uploaded by mvanbaak (license 7) With mod by me to also fix callparking as well (this uploaded patch only fixed retrieving a parked call) Tested by: gracedman, mvanbaak ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=215465 By: John A. Sullivan III (gracedman) 2009-09-02 11:28:43 Sorry, I'm a little confused and it is probably my confusion about the way Asterisk development works. The patch I applied and tested fixes call retrieval when we manually set the parking lot but multi-tenant parking still does not work without this kludge. If we configure it with the parking lot set in sip.conf, it always goes to the default parking lot. I assume that's what was meant by "With mod by me to also fix callparking as well (this uploaded patch only fixed retrieving a parked call)". Since we are running in production, I would not upgrade to the latest SVN. Is there a patch available to fix this issue beyond what I have applied so we do not need to manually set the parking lot in the dial plan? Thanks - John By: Michiel van Baak (mvanbaak) 2009-09-02 11:40:29 John: Hang on, creating one for you. By: Michiel van Baak (mvanbaak) 2009-09-02 11:43:11 uploaded 2009090200_sipnewparkinglot-161-part2.diff.txt If you already applied the patch for the call retrieval you need to apply only this new patch. For a clean 1.6.1.X install you have to apply both patches By: John A. Sullivan III (gracedman) 2009-09-02 12:23:50 It works! Perfetto! Ausgezeichnet! Muito obrigado. I'm very happy considering we are rolling into production exactly one week from now. Thanks very much - John By: Michiel van Baak (mvanbaak) 2009-09-02 13:10:15 John: have fun and thanks for testing! By: John A. Sullivan III (gracedman) 2009-09-09 21:51:44 I see the note that this bug is fixed in 1.6.1.6. We just upgraded to 1.6.1.6 and the issue is still present. We needed to apply the patch to have it work properly in 1.6.1.6. Thanks - John By: Michiel van Baak (mvanbaak) 2009-09-10 00:58:50 1.6.1.6 has been released to address a security issue in chan_iax2 That's why this patch is not there. It will however be in 1.6.1.7 (unless that will be a security update as well) |