[Home]

Summary:ASTERISK-17864: Called channel stays in app_dial_gosub_virtual_context and can't transfer call properly.
Reporter:Vadim Mikhnevych (vmikhnevych)Labels:
Date Opened:2011-05-16 06:38:56Date Closed:2015-03-13 18:24:58
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:1.8.4 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Upon calling Dial() with U() parameter, called channel seems to stay in app_dial_gosub_virtual_context , because if called person tries to make a transfer (using codes from features.conf , like #1), and is asked to enter number to transfer call to, only one digit is read, as Asterisk immediately looks for the extension to transfer to in app_dial_gosub_virtual_context.
If there is no U() used in Dial(), transfer works great.
So, it's impossible for called party to perform attended or blind transfer in this way, because transfer number can't be entered.

Dialplan for called subroutine:
[SET_MOH_VOLUME]
exten => s,1,GotoIf($["${ARG1}" = ""]?not_moh)
same => n,Set(CHANNEL(musicclass)=${ARG1})
same => n(not_moh),Set(VOLUME(TX)=${ARG2})
same => n,Set(VOLUME(RX)=${ARG3})
same => n,Return

Asterisk log:
-- AGI Script Executing Application: (Dial) Options: (SIP/2051,60,U(SET_MOH_VOLUME^^2^)tTkd)
-- Called 2051
-- SIP/2051-00000002 answered SIP/1997-00000001
   -- Executing [s@SET_MOH_VOLUME:1] GotoIf("SIP/2051-00000002", "1?not_moh") in new stack
   -- Goto (SET_MOH_VOLUME,s,3)
   -- Executing [s@SET_MOH_VOLUME:3] Set("SIP/2051-00000002", "VOLUME(TX)=2") in new stack
   -- Executing [s@SET_MOH_VOLUME:4] Set("SIP/2051-00000002", "VOLUME(RX)=") in new stack
   -- Executing [s@SET_MOH_VOLUME:5] Return("SIP/2051-00000002", "") in new stack
   -- Executing [s@app_dial_gosub_virtual_context:1] NoOp("SIP/2051-00000002", "") in new stack
   -- Auto fallthrough, channel 'SIP/2051-00000002' status is 'UNKNOWN'
   -- Started music on hold, class 'default', on SIP/1997-00000001
   -- <SIP/2051-00000002> Playing 'pbx-transfer.gsm' (language 'en')
[May 16 14:20:49] WARNING[3079]: features.c:1626 builtin_atxfer: Extension '2' does not exist in context 'app_dial_gosub_virtual_context'
   -- <SIP/2051-00000002> Playing 'pbx-invalid.gsm' (language 'en')
   -- Stopped music on hold on SIP/1997-00000001

Comments:By: Vadim Mikhnevych (vmikhnevych) 2011-05-16 06:52:09

Oh, almost forgot - it affects 1.6.18 as well.

By: Leif Madsen (lmadsen) 2011-05-17 07:28:44

This will only be fixed on 1.8+.

~~~~~

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch.

For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

By: Tilghman Lesher (tilghman) 2011-05-17 11:33:27

I have no idea why you're using the U() option in this way.  The stated purpose of the U() option is to allow interaction with the called user BEFORE the two channels are bridged, mainly for the point of letting the called user decide whether or not to accept the call.  It is NOT for setting options.  You should do all of that PRIOR to the Dial.

By: Vadim Mikhnevych (vmikhnevych) 2011-05-18 03:06:00

2 tilghman:
We use it this way because that variables have to be set on called channel, not caller's (caller channel can have another values for them, for example different music-on-hold, which is set in dialplan prior to calling Dial()). Is there some other way to do this?

By: Joshua C. Colp (jcolp) 2015-03-13 18:24:58.885-0500

This functionality can be accomplished in 11 and above using pre-dial handlers[1]. They should not suffer the same problem.

[1] https://wiki.asterisk.org/wiki/display/AST/Pre-dial+handlers