[Home]

Summary:ASTERISK-00036: Audio is not passed to an agent who is logged in using the AgentCallbackLogin
Reporter:tclark (tclark)Labels:
Date Opened:2003-08-02 15:55:04Date Closed:2004-09-25 02:14:14
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:the agent line will ring but when i go off hook there is no audio passed   from the call in the q,
looks like from the console msg's some kinda issue with Masquerading ??

****** ADDITIONAL INFORMATION ******

queues.conf
[taxidispatchq]
music = acdispatch
context = adminincoming
timeout = 10
retry = 1
maxlen = 0
member => Agent/:1

[agents]
musiconhold=>none
group=1
agent => 100,,OrderEntryOp
agent => 101,,DispatchOP

console debug messages
 -- Starting simple switch on 'Zap/2-1'
DEBUG[155667]: File chan_zap.c, Line 3255 (zt_read): DTMF digit: 5 on Zap/2-1
DEBUG[155667]: File chan_zap.c, Line 3255 (zt_read): DTMF digit: 0 on Zap/2-1
DEBUG[155667]: File chan_zap.c, Line 3255 (zt_read): DTMF digit: 0 on Zap/2-1
DEBUG[155667]: File chan_zap.c, Line 3255 (zt_read): DTMF digit: 0 on Zap/2-1
DEBUG[155667]: File chan_zap.c, Line 933 (zt_enable_ec): Enabled echo cancellation on channel 2
  -- Executing Queue("Zap/2-1", "taxidispatchq|t") in new stack
queue: taxidispatchq, options: t, url: (null), announce: (null)
DEBUG[155667]: File channel.c, Line 1290 (ast_prod): Prodding channel 'Zap/2-1'
  -- Started music on hold, class 'acdispatch', on Zap/2-1
DEBUG[155667]: File app_queue.c, Line 691 (try_calling): Simple queue (no URL)
  -- outgoing agentcall, to agent '101', on 'Local/11@default-def3.1'
  -- Executing Macro("Local/11@default-def3,2", "stdexten|1|1Zap") in new stack
  -- Executing DBget("Local/11@default-def3,2", "DEVICE=CallFwd/1Zap") in new stack
  -- DBget: varname=DEVICE, family=CallFwd, key=1Zap
Got value of size 6
  -- DBget: set variable DEVICE to Zap/1
  -- Executing SetVar("Local/11@default-def3,2", "tmp=Zap/1") in new stack
Expression is '0'
  -- Executing GotoIf("Local/11@default-def3,2", "0?TimOfficeFXS|ap/1|1:s|4") in new stack
  -- Goto (macro-stdexten,s,4)
  -- Executing Dial("Local/11@default-def3,2", "Zap/1|20|TtHr") in new stack
DEBUG[163860]: File app_dial.c, Line 381 (dial_exec): SIMPLE DIAL (NO URL)
  -- Called 1
  -- Called :1
  -- Agent/101 is ringing
  -- Zap/1-1 is ringing
  -- Agent/101 is ringing
DEBUG[163860]: File chan_zap.c, Line 3031 (zt_exception): Exception on 20, channel 1
DEBUG[163860]: File chan_zap.c, Line 2487 (zt_handle_event): Got event Ring/Answered(2) on channel 1 (index 0)
DEBUG[163860]: File chan_zap.c, Line 933 (zt_enable_ec): Enabled echo cancellation on channel 1
DEBUG[163860]: File chan_zap.c, Line 2640 (zt_handle_event): channel 1 answered
  -- Zap/1-1 answered Local/11@default-def3,2
DEBUG[155667]: File app_queue.c, Line 538 (wait_for_answer): Dunno what to do with control type -1
DEBUG[163860]: File chan_zap.c, Line 1836 (zt_setoption): Set option TONE VERIFY, mode: MUTECONF/MAX(2) on Zap/1-1
DEBUG[163860]: File channel.c, Line 1808 (ast_channel_masquerade): Planning to masquerade Zap/1-1 into the structure of Local/11@default-def3.1
DEBUG[155667]: File channel.c, Line 1854 (ast_do_masquerade): Actually Masquerading Zap/1-1(6) into the structure of Local/11@default-def3.1(6)
DEBUG[163860]: File channel.c, Line 1826 (ast_channel_masquerade): Done planning to masquerade Zap/1-1 into the structure of Zap/1-1<MASQ>
DEBUG[163860]: File channel.c, Line 2098 (ast_channel_bridge): Bridge stops because we're zombie or need a soft hangup: c0=Local/11@default-def3,2, c1=Zap/1-1<MASQ>, flags: No,No,No,Yes
DEBUG[163860]: File channel.c, Line 2213 (ast_channel_bridge): Bridge stops bridging channels Local/11@default-def3,2 and Zap/1-1<MASQ>
DEBUG[155667]: File channel.c, Line 1985 (ast_do_masquerade): Putting channel Zap/1-1 in 4/4 formats
DEBUG[155667]: File chan_zap.c, Line 2264 (zt_fixup): New owner for channel 1 is Zap/1-1
DEBUG[155667]: File chan_zap.c, Line 908 (update_conf): Updated conferencing on 1, with 0 conference users
DEBUG[155667]: File chan_zap.c, Line 908 (update_conf): Updated conferencing on 1, with 0 conference users
== Spawn extension (macro-stdexten, s, 4) exited non-zero on 'Local/11@default-def3,2' in macro 'stdexten'
== Spawn extension (default, 11, 1) exited non-zero on 'Local/11@default-def3,2'

Comments:By: Mark Spencer (markster) 2003-08-02 16:18:59

Update to latest CVS and post the output.

By: tclark (tclark) 2003-08-04 10:12:11

running
Asterisk CVS-08/03/03-16:39:22 built by tc@redhat.topcat on a i686 running Linux

this appears to work correctly, cli show ringing on both the agent channel and the device that the agent is logged into, the phone rings and the as soon as the '#' key is pressed the call is bridged

   -- outgoing agentcall, to agent '101', on 'Local/101@dispatchlogin-b71f.1'
   -- Called :1
   -- Executing Dial("Local/101@dispatchlogin-b71f,2", "Zap/1|20") in new stack
   -- Called 1
   -- Zap/1-1 is ringing
   -- Agent/101 is ringing
   -- Zap/1-1 answered Local/101@dispatchlogin-b71f,2
   -- Local/101@dispatchlogin-b71f.1 answered, waiting for '#' to acknowledge
   -- Zap/1-1 acknowledged
   -- Agent/101 answered Zap/2-1
   -- Stopped music on hold on Zap/2-1
   -- Hungup 'Zap/1-1'

By: oliver (oliver) 2003-08-04 10:56:57

Note that I'm seeing the same problem here, with several different channels.  I noticed that the first time the agent is called after login, audio will come through after the agent hits "#" to confirm answer.  For all next calls, that will no longer work and audio won't come through in both directions.  After the agent logs in again (even using the same extension), it will again work for only the first call after that.

By: Mark Spencer (markster) 2003-08-04 17:18:07

Oliver, I think i've fixed your problem, Tim, can you see if this makes any difference with yours?

By: Mark Spencer (markster) 2003-08-04 17:18:14

Oliver, I think i've fixed your problem, Tim, can you see if this makes any difference with yours?

By: tclark (tclark) 2003-08-04 18:04:03

I think we have a race condition here
current cvs chan_agent.c in agent_read
if i change line 244 to always set f = &answer_frame;
then audio is passed 100% on all calls,
but depending on the delay with hitting '#' to ack the call, then audio will randomly not pass after the FIRST call. The first call seems to always
pass audio no matter how long i delay in acking the call with the '#' key


***********
       if (f && (f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_ANSWER)) {
               if (option_verbose > 2)
                       ast_verbose(VERBOSE_PREFIX_3 "%s answered, waiting for '#' to acknowledge\n", p->chan->name);
               /* Don't pass answer along */
               ast_frfree(f);
              /* f = &null_frame; */
               p->acknowledged = 1;
               f = &answer_frame;

       }

******************

By: oliver (oliver) 2003-08-04 18:11:20

Hey Mark,

It works a little better now.  If the caller is the one hanging up first, the next call to the agent will be OK as well.  However, if it's the agent who hangs up first, subsequent calls will still have no audio.

PS: Answer-confirmation should really be optional, especially on callback-agents, but that's another ticket.  :-)

By: Mark Spencer (markster) 2003-08-14 15:02:29

It is configurable, again check latest CVS for this other behavior.  If it's still broken, might need ssh access to diagnose it.

By: oliver (oliver) 2003-08-14 16:15:41

Hey Mark,

All audio-problems with chan_agent seem to have been fixed for me.  Note that your changes broke answer-confirmation on non-callback agents.  Even when turned on in "agents.conf", it simply isn't used.  On callback-agents, it still works as expected.

By: tclark (tclark) 2003-08-18 13:52:25

this appears fix'd in cvs, pls 'mark' this as resolved :)

By: Mark Spencer (markster) 2003-08-18 15:56:52

fixed in cvs