[Asterisk-Dev] $50 BOUNTY RE: [Asterisk-Users] Agents / ackcall

Greg Boehnlein damin at nacs.net
Sat Feb 21 08:50:43 MST 2004


Hey there.. I hate cross posting, but can someone point out why this is 
not working, and/or/why it is such a bad idea? All I am trying to 
accomplish is getting a GSM file to be announced to an agent via 
AgentCallbackLogin BEFORE they press the "#" key.

$50 via PayPal to the first person that makes this work and adds an option 
to "queues.conf" to configure the file that is played! ;)

-- 
    Vice President of N2Net, a New Age Consulting Service, Inc. Company
         http://www.n2net.net Where everything clicks into place!
                             KP-216-121-ST



---------- Forwarded message ----------
Date: Sat, 21 Feb 2004 09:17:14 -0500 (EST)
From: Greg Boehnlein <damin at nacs.net>
To: asterisk-users at lists.digium.com
Subject: RE: [Asterisk-Users] Agents / ackcall

On Sat, 21 Feb 2004, Greg Boehnlein wrote:

> On Sat, 21 Feb 2004, Matthew B Marlowe wrote:
> 
> > This has been discussed a lot.
> 
> In what context? In the context that I'm totally wrong and it can do it, 
> so I should check the Wiki and Documentation kind of discussed alot?
> 
> Or, the chan_agent.c should be updated cause this is a good idea kind and 
> no one has gotten around to doing it kind of context?
> 
> Hehehe.. ;)

In any case, I got impatient.. After all I have the source, so I should 
just fix (ahem more like break) it myself, right? :)

I added the following patch in an effort to get something to work, but 
it isn't quite working the way I expected;

--- ./channels/chan_agent.c.gjb 2004-02-21 09:07:32.000000000 -0500
+++ ./channels/chan_agent.c     2004-02-21 08:59:41.000000000 -0500
@@ -307,10 +307,13 @@
                        p->acknowledged = 0;
                }
        }
+   
        if (f && (f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_ANSWER)) {
 /* TC */
                if (p->ackcall) {
-                       if (option_verbose > 2)
+                       ast_verbose(VERBOSE_PREFIX_3 "Playing pre-login announcement\n", p->chan->name);
+                       ast_streamfile(p->chan, "all-your-base", p->chan->language);
+                       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);

The result of this is the following on the console;

    -- outgoing agentcall, to agent '216410xxxx', on 'Local/216410xxxx at default-b639,1'
    -- Executing Dial("Local/216410xxxx at default-b639,2", "Zap/g1/216410xxxx") in new stack
    -- Called 216410xxxx
    -- Called g1/216410xxxx
    -- Zap/1-1 is ringing
    -- Agent/216410xxxx is ringing
    -- Zap/1-1 answered Local/216410xxxx at default-b639,2
  == Spawn extension (default, 216410xxxx, 1) exited non-zero on 'Local/216410xxxx at default-b639,2'
    -- Playing pre-login announcement
    -- Playing 'all-your-base' (language 'en')
    -- Zap/1-1 answered, waiting for '#' to acknowledge
Feb 21 09:11:39 NOTICE[393235]: channel.c:1097 ast_read: Dropping 
incompatible voice frame on Zap/1-1 of format GSM since our native format has changed to UNKN
Feb 21 09:11:39 WARNING[393235]: chan_zap.c:3750 zt_write: Cannot handle frames in 2 format
Feb 21 09:11:39 WARNING[393235]: file.c:521 ast_readaudio_callback: Failed to write frame
    -- Hungup 'Zap/1-1' -- 

The agent gets the call, and hears a click and then the channel drops. Any 
suggestions?

--
    Vice President of N2Net, a New Age Consulting Service, Inc. Company
         http://www.n2net.net Where everything clicks into place!
                             KP-216-121-ST







More information about the asterisk-dev mailing list