[Asterisk-Users] Zap and call pickup -- it don't work.

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Tue Jun 1 12:33:09 MST 2004


The problem:   T100P connected to an Adit600.  Channel 1-16 are FXS, 17-24 
FXO.  I have Zap/24 in callgroup 3 and Zap/1-16 in pickupgroup 3.  When a 
call comes in on Zap/24 I cannot pick it up with *8 from Zap/1-16.

*CLI> show version
Asterisk CVS-04/27/04-23:48:08 built by root at tuck on a i686 running Linux

The zapata.conf and extensions.conf are located here:
http://lists.digium.com/pipermail/asterisk-users/2004-May/048527.html

(I've since changed channel 1-16's pickupgroup to just 3, it didn't help.)

What I see in *'s debug log:

Jun  1 15:21:13 DEBUG[213006]: SIMPLE DIAL (NO URL)
Jun  1 15:21:13 DEBUG[213006]: Received AST_CONTROL_PROGRESS on Zap/24-1
Jun  1 15:21:16 DEBUG[229391]: DTMF digit: * on Zap/2-1
Jun  1 15:21:16 DEBUG[229391]: DTMF digit: 8 on Zap/2-1
Jun  1 15:21:16 DEBUG[229391]: Enabled echo cancellation on channel 2
Jun  1 15:21:16 DEBUG[229391]: No call pickup possible...
Jun  1 15:21:16 DEBUG[229391]: No call pickup possible...
Jun  1 15:21:17 DEBUG[213006]: Exception on 35, channel 24
Jun  1 15:21:17 DEBUG[213006]: Got event Ring/Answered(2) on channel 24 (index 
0)
Jun  1 15:21:23 DEBUG[213006]: Exception on 35, channel 24
Jun  1 15:21:23 DEBUG[213006]: Got event Ring/Answered(2) on channel 24 (index 
0)
Jun  1 15:21:29 DEBUG[213006]: Exception on 35, channel 24
Jun  1 15:21:29 DEBUG[213006]: Got event Ring/Answered(2) on channel 24 (index 
0)
Jun  1 15:21:29 DEBUG[229391]: Hangup: channel: 2 index = 0, normal = 13, 
callwait = -1, thirdcall = -1
Jun  1 15:21:29 DEBUG[229391]: disabled echo cancellation on channel 2
Jun  1 15:21:29 DEBUG[229391]: Set option TDD MODE, value: OFF(0) on Zap/2-1
Jun  1 15:21:29 DEBUG[229391]: Updated conferencing on 2, with 0 conference 
users
Jun  1 15:21:34 DEBUG[213006]: We're hanging up IAX2[ak_home]/4 now...
Jun  1 15:21:37 DEBUG[213006]: Hangup: channel: 24 index = 0, normal = 35, 
callwait = -1, thirdcall = -1
Jun  1 15:21:37 DEBUG[213006]: disabled echo cancellation on channel 24
Jun  1 15:21:37 DEBUG[213006]: Set option TDD MODE, value: OFF(0) on Zap/24-1
Jun  1 15:21:37 DEBUG[213006]: Updated conferencing on 24, with 0 conference 
users

Now you'll see the "No call pickup possible" -- that comes from both 
res_parking's ast_call_pickup() and also from chan_zap.  Basically you get 
that if the channel you're trying to pick up is NOT in AST_STATE_RING or 
AST_STATE_RINGING.

I modified chan_zap.c so that "zap show channels" gives me the state of the 
channel as well.

On to the main event: the CLI log when run as "asterisk -vvvvgc":

Asterisk Ready.
    -- Starting simple switch on 'Zap/24-1'
    -- Executing NoOp("Zap/24-1", "01062004-15:21:12 "BENSHAW CAN CON" 
<2915794>") in new stack
    -- Executing System("Zap/24-1", 
"/usr/bin/perl /usr/local/scripts/astbot.pl '"BENSHAW CAN CON" <2915794>'") 
in new stack
    -- Executing Dial("Zap/24-1", "IAX2/benshaw at ak_home/s|20|Ttr") in new 
stack
    -- Called benshaw at ak_home/s
    -- Call accepted by 209.47.196.34 (format ILBC)
    -- Format for call is ILBC
    -- IAX2[ak_home]/4 is ringing
    -- Starting simple switch on 'Zap/2-1'

zap show channel 24
Channel: 24
State: 4 (AST_STATE_RING)
File Descriptor: 35
Span: 1
Extension:
Context: in_2914574
Caller ID string:
Destroy: 0
Signalling Type: FXS Kewlstart
Owner: Zap/24-1
Real: Zap/24-1
Callwait: <None>
Threeway: <None>
Confno: -1
Propagated Conference: -1
Real in conference: 0
DSP: yes
Relax DTMF: no
Dialing/CallwaitCAS: 0/0
Default law: ulaw
Fax Handled: no
Pulse phone: no
Echo Cancellation: 128 taps, currently OFF
Actual Confinfo: Num/0, Mode/0x0000
Actual Confmute: No
Actual Hookstate: Offhook


*CLI> zap show channel 2
Channel: 2
State: 1 (AST_STATE_RESERVED)
File Descriptor: 13
Span: 1
Extension:
Context: fxs
Caller ID string: "Benshaw VOIP" <(519) 291-5112>
Destroy: 0
Signalling Type: FXO Kewlstart
Owner: Zap/2-1
Real: Zap/2-1
Callwait: <None>
Threeway: <None>
Confno: -1
Propagated Conference: -1
Real in conference: 0
DSP: yes
Relax DTMF: no
Dialing/CallwaitCAS: 0/0
Default law: ulaw
Fax Handled: no
Pulse phone: no
Echo Cancellation: 32 taps unless TDM bridged, currently ON
Actual Confinfo: Num/0, Mode/0x0000
Actual Confmute: No
Actual Hookstate: Offhook
    
    -- Hungup 'Zap/2-1'
    -- Nobody picked up in 20000 ms
    -- Hungup 'IAX2[ak_home]/4'
    -- Executing Hangup("Zap/24-1", "") in new stack
  == Spawn extension (in_2914574, h, 1) exited non-zero on 'Zap/24-1'
    -- Hungup 'Zap/24-1'

As you can see, Zap/24-1 is *clearly* in AST_STATE_RING.  The only weirdness I 
see is that the hookstate is "off hook" -- I did NOT Answer() the call, and 
my * box at home did not answer the call.  My extensions.conf file looks like 
this:

[in_1234567]
exten => s,1,NoOp(${DATETIME} ${CALLERID})
exten => s,2,System(/usr/bin/perl /usr/local/scripts/astbot.pl '${CALLERID}')
exten => s,3,Dial(IAX2/benshaw at ak_home/s,20,Ttr)
;exten => s,4,Dial(${FXOTRUNK}/${CELL},,Ttr)
exten => s,5,Hangup
exten => h,1,Hangup
exten => t,1,Hangup

I Dial() my home box, and it rings the FXS interfaces connected to it.  Since 
there's nobody home, there's nobody to answer.  My cat isn't that well 
trained yet.  :-)

Can anyone *please* help?  I'm tearing out my hair here, this *should* work!

Regards,
Andrew



More information about the asterisk-users mailing list