[Home]

Summary:ASTERISK-15127: [patch] Call parking via AMI causes announcment and ringback to caller channel
Reporter:Yeshua Watson (yeshuawatso)Labels:
Date Opened:2009-11-12 13:44:28.000-0600Date Closed:2009-12-21 11:11:49.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Features/Parking
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20091210__issue16234.diff.txt
( 1) 20091221__issue16234__1.4.diff.txt
Description:As described in this previous report, https://issues.asterisk.org/view.php?id=15695 , the same symptoms occur.

For some strange reason, when I park a call that comes in from an IAX2 DID to the call queue, parking via the AMI gets the extension that parked the call mixed up.

Here's the call flow:
IAX2 DID-->Queue-->Agent-->Parking Lot (via AMI)

The call parks fine, but the parking lot number is not spoken back to the channel specified, and asterisk assumes that the ringback is the incoming channel.

Here's my features.conf
   parkext => 700
   ; What extension to dial to park
   parkpos => 701-720
   ; What extensions to park calls on. These needs to be
   ; numeric, as Asterisk starts from the start position
   ; and increments with one for the next parked call.
   context => parkedcalls
   [featuremap]
   blindxfer  =>  #1
   parkcall => ASTERISK-68
   atxfer => *2

And the incoming context from extensions.conf. The DID extension has been truncated for privacy.
   [answer_cust]
   exten => _20207,1,Answer()
   exten => _20207,n,Queue(3242|||||variables_q.php,${CDR(uniqueid)},${CDR(dstchannel)})

The AMI Input for parking a call:
   Action: Park
   Channel: IAX2/jnctn-744
   Channel2: SIP/3011-09a89f40
   Timeout: 180000
   ActionID: g4grayyar5t6qb215o

   Response: Success
   ActionID: g4grayyar5t6qb215o
   Message: Park successful


AMI Input for checking parked calls:
   Action: ParkedCalls

   Response: Success
   Message: Parked calls will follow

   Event: ParkedCall
   Exten: 701
   Channel: IAX2/jnctn-744
   From: IAX2/jnctn-744
   Timeout: 164
   CallerID: 15555555555
   CallerIDName: 15555555555

   Event: ParkedCallsComplete

CLI Output as follow:

   -- Accepting AUTHENTICATED call from 66.44.0.1:
      > requested format = ulaw,
      > requested prefs = (ulaw|alaw|gsm|g726|g729|g723),
      > actual format = gsm,
      > host prefs = (),
      > priority = caller
   -- Executing [20207@main:1] Answer("IAX2/jnctn-1011", "") in new stack
   -- Executing [20207@main:2] Set("IAX2/jnctn-1011", "CDR(accountcode)=1258036308.35") in new stack
   -- Executing [20207@main:3] Queue("IAX2/jnctn-1011", "3242|||||variables_q.php|1258036308.35|") in new stack
   -- Started music on hold, class 'default', on IAX2/jnctn-1011
   -- Executing [3011@default:1] Macro("Local/3011@default-777c,2", "stdexten|3
   -- Executing [s@macro-stdexten:1] Set("Local/3011@default-777c,2", "__DYNAMI
   -- Executing [s@macro-stdexten:2] GotoIf("Local/3011@default-777c,2", "0?5:3
   -- Goto (macro-stdexten,s,3)
   -- Executing [s@macro-stdexten:3] Dial("Local/3011@default-777c,2", "SIP/301
   -- Called 3011
[Nov 12 09:31:48] WARNING[31699]: app_dial.c:1275 dial_exec_full: Unable to crea
   -- SIP/3011-0892f8b0 is ringing
   -- Local/3011@default-777c,1 is ringing
   -- SIP/3011-0892f8b0 answered Local/3011@default-777c,2
   -- Local/3011@default-777c,1 answered IAX2/jnctn-1011
   -- <Local/3011@default-777c,1> Playing 'queue-reporthold' (language 'en')
[Nov 12 09:31:53] WARNING[31698]: file.c:1273 waitstream_core: Unexpected contro
 == Spawn extension (macro-stdexten, s, 3) exited non-zero on 'Local/3011@defau
 == Spawn extension (default, 3011, 1) exited non-zero on 'Local/3011@default-7
   -- <SIP/3011-0892f8b0> Playing 'queue-less-than' (language 'en')
   -- <SIP/3011-0892f8b0> Playing 'digits/2' (language 'en')
   -- <SIP/3011-0892f8b0> Playing 'queue-minutes' (language 'en')
   -- Stopped music on hold on IAX2/jnctn-1011
   -- Launched AGI Script /var/lib/asterisk/agi-bin/variables_q.php
   -- AGI Script variables_q.php completed, returning 0
[Nov 12 09:31:57] WARNING[31698]: app_queue.c:3243 try_calling: The device state
 == Parsing '/etc/asterisk/manager.conf': Found
 == Manager 'answercc' logged on from 192.168.2.2
   -- Started music on hold, class 'default', on IAX2/jnctn-1011
 == Parked IAX2/jnctn-1011 on 701@parkedcalls. Will timeout back to extension [main] 20207, 3 in 1 seconds
   -- Added extension '701' priority 1 to parkedcalls
 == Spawn extension (main, 20207, 3) exited non-zero on 'Parked/IAX2/jnctn-1011<ZOMBIE>'
   -- Stopped music on hold on IAX2/jnctn-1011
   -- Added extension 'IAX2/jnctn' priority 1 to park-dial
 == Timeout for IAX2/jnctn-1011 parked on 701. Returning to park-dial,IAX2/jnctn,1
   -- Executing [IAX2/jnctn@park-dial:1] Dial("IAX2/jnctn-1011", "IAX2/jnctn|30|") in new stack
[Nov 12 09:34:23] WARNING[31716]: chan_iax2.c:3909 create_addr: No such host: jnctn
[Nov 12 09:34:23] WARNING[31716]: app_dial.c:1275 dial_exec_full: Unable to create channel of type 'IAX2' (cause 20 - Unknown)
 == Everyone is busy/congested at this time (1:0/0/1)
 == Auto fallthrough, channel 'IAX2/jnctn-1011' status is 'CHANUNAVAIL'
   -- Hungup 'IAX2/jnctn-1011'
------------------------

Parking the call using redirect to the park extension causes the same problem. Using transfer functions built into the phone, or using DTMF attended transfer for callee works fine. This problem only occurs when parking via the AMI.
Comments:By: Tilghman Lesher (tilghman) 2009-12-10 14:10:39.000-0600

Testing is required.

By: Tilghman Lesher (tilghman) 2009-12-15 09:53:24.000-0600

yeshuawatso: ping

By: Yeshua Watson (yeshuawatso) 2009-12-19 23:48:08.000-0600

Test patch with svn trunk Revision 235773. Patch corrects the problem.

Any chance on back porting the patch for 1.4?

By: Tilghman Lesher (tilghman) 2009-12-21 09:46:48.000-0600

Backport to 1.4 has been uploaded and will be committed to the branch presently.

By: Digium Subversion (svnbot) 2009-12-21 10:45:04.000-0600

Repository: asterisk
Revision: 235821

U   branches/1.4/res/res_features.c

------------------------------------------------------------------------
r235821 | tilghman | 2009-12-21 10:45:04 -0600 (Mon, 21 Dec 2009) | 8 lines

Send parking lot announcement to the channel which parked the call, not the park-ee.
(closes issue ASTERISK-15127)
Reported by: yeshuawatso
Patches:
      20091210__issue16234.diff.txt uploaded by tilghman (license 14)
      20091221__issue16234__1.4.diff.txt uploaded by tilghman (license 14)
Tested by: yeshuawatso

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235821

By: Digium Subversion (svnbot) 2009-12-21 11:00:47.000-0600

Repository: asterisk
Revision: 235822

_U  trunk/
U   trunk/main/features.c

------------------------------------------------------------------------
r235822 | tilghman | 2009-12-21 11:00:46 -0600 (Mon, 21 Dec 2009) | 15 lines

Merged revisions 235821 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r235821 | tilghman | 2009-12-21 10:45:03 -0600 (Mon, 21 Dec 2009) | 8 lines
 
 Send parking lot announcement to the channel which parked the call, not the park-ee.
 (closes issue ASTERISK-15127)
  Reported by: yeshuawatso
  Patches:
        20091210__issue16234.diff.txt uploaded by tilghman (license 14)
        20091221__issue16234__1.4.diff.txt uploaded by tilghman (license 14)
  Tested by: yeshuawatso
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235822

By: Digium Subversion (svnbot) 2009-12-21 11:11:04.000-0600

Repository: asterisk
Revision: 235824

_U  branches/1.6.0/
U   branches/1.6.0/main/features.c

------------------------------------------------------------------------
r235824 | tilghman | 2009-12-21 11:11:03 -0600 (Mon, 21 Dec 2009) | 22 lines

Merged revisions 235822 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r235822 | tilghman | 2009-12-21 11:00:46 -0600 (Mon, 21 Dec 2009) | 15 lines
 
 Merged revisions 235821 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r235821 | tilghman | 2009-12-21 10:45:03 -0600 (Mon, 21 Dec 2009) | 8 lines
   
   Send parking lot announcement to the channel which parked the call, not the park-ee.
   (closes issue ASTERISK-15127)
    Reported by: yeshuawatso
    Patches:
          20091210__issue16234.diff.txt uploaded by tilghman (license 14)
          20091221__issue16234__1.4.diff.txt uploaded by tilghman (license 14)
    Tested by: yeshuawatso
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235824

By: Digium Subversion (svnbot) 2009-12-21 11:11:20.000-0600

Repository: asterisk
Revision: 235825

_U  branches/1.6.1/
U   branches/1.6.1/main/features.c

------------------------------------------------------------------------
r235825 | tilghman | 2009-12-21 11:11:19 -0600 (Mon, 21 Dec 2009) | 22 lines

Merged revisions 235822 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r235822 | tilghman | 2009-12-21 11:00:46 -0600 (Mon, 21 Dec 2009) | 15 lines
 
 Merged revisions 235821 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r235821 | tilghman | 2009-12-21 10:45:03 -0600 (Mon, 21 Dec 2009) | 8 lines
   
   Send parking lot announcement to the channel which parked the call, not the park-ee.
   (closes issue ASTERISK-15127)
    Reported by: yeshuawatso
    Patches:
          20091210__issue16234.diff.txt uploaded by tilghman (license 14)
          20091221__issue16234__1.4.diff.txt uploaded by tilghman (license 14)
    Tested by: yeshuawatso
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235825

By: Digium Subversion (svnbot) 2009-12-21 11:11:47.000-0600

Repository: asterisk
Revision: 235826

_U  branches/1.6.2/
U   branches/1.6.2/main/features.c

------------------------------------------------------------------------
r235826 | tilghman | 2009-12-21 11:11:47 -0600 (Mon, 21 Dec 2009) | 22 lines

Merged revisions 235822 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r235822 | tilghman | 2009-12-21 11:00:46 -0600 (Mon, 21 Dec 2009) | 15 lines
 
 Merged revisions 235821 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r235821 | tilghman | 2009-12-21 10:45:03 -0600 (Mon, 21 Dec 2009) | 8 lines
   
   Send parking lot announcement to the channel which parked the call, not the park-ee.
   (closes issue ASTERISK-15127)
    Reported by: yeshuawatso
    Patches:
          20091210__issue16234.diff.txt uploaded by tilghman (license 14)
          20091221__issue16234__1.4.diff.txt uploaded by tilghman (license 14)
    Tested by: yeshuawatso
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=235826