[Asterisk-Users] Agents / ackcall

Greg Boehnlein damin at nacs.net
Sat Feb 21 07:17:14 MST 2004


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-users mailing list