[asterisk-users] Callpickup works for outside calls but not inside calls

John A. Sullivan III jsullivan at opensourcedevel.com
Thu Oct 15 20:21:58 CDT 2009


On Wed, 2009-10-14 at 22:56 -0400, John A. Sullivan III wrote:
> Hello, all.  I've got a problem where we set up call pickup for a
> customer.  If the Bob's extension rings and Bob is in Jim's office, Bob
> can press the button on his Snom 320 that says "Bob" and pick up his
> line.  It works great for calls coming in from the outside but does not
> work for internal calls.  Internal calls generate a
> app_directed_pickup.c:204 pickup_exec: No target channel found for 617
> error.
> 
> I see an old bug about this where the contexts were not consistent but
> ours appear to be consistent.  Here are examples of pertinent parts of
> the dialplan:
> 
> [a10base]
> exten => 911,1,Macro(emergency-US,xxxxxxxxxx)
> exten => 9911,1,Macro(emergency-US,xxxxxxxxxx)
> 
> ; Terry Keeley
> ; We put these in a10base rather than a10 or a10pub
> ;so that the spare stations can access them but public cannot
> exten => 612,hint,SIP/tkeeley
> 
> ; Joe Intrabartola
> exten => 613,hint,SIP/jintrabartola
> 
> ; Maryann Lapolla
> exten => 614,hint,SIP/mlapolla
> 
> ; Michael Intrabartola
> exten => 616,hint,SIP/mintrabartola
> 
> ; Vinny De Marco
> exten => 617,hint,SIP/vdemarco
> 
> ; Reception - the Reception desk may ring when someone dials zero
> exten => 621,hint,SIP/reception-a10
> 
> ; Steve McClain
> exten => 624,hint,SIP/smcclain
> 
> ; Amityville Intercom
> ;exten => 686,1,Dial(SIP/avilleextdoor-a10,60)
> ;exten => 686,n,Hangup()
> 
> exten => _*8XXX,1,Pickup(${EXTEN:2}@a10pub) ; Enable call pickup for hinted stations
> 
> exten => 7998,1,VoiceMailMain(${CALLERID(num)}@a10) ; Direct mail retrieval
> exten => 7998,n,Hangup()
> 
> include => a10pub
> include => a10utils
> include => a10conf
> include => a10parking
> 
> [a10in] ; direct inbound SIP dialing
> exten => conference,1,Goto(a10pub,6000,1)
> exten => joe,1,Goto(a10pub,613,1)
> exten => maryann,1,Goto(a10pub,614,1)
> exten => michael,1,Goto(a10pub,616,1)
> exten => terry,1,Goto(a10pub,612,1)
> exten => tommyvan,1,Goto(a10pub,615,1)
> exten => vinny,1,Goto(a10pub,617,1)
> exten => ebc,1,Goto(a10pub,99999,ringall)
> exten => vmail,1,Goto(a10pub,7999,1)
> 
> [a10pub]
> ; Public access - BE SURE there is no outbound access from here, e.g.,
> ; Background() functions will jump to any valid extension entered
> ; whether or not it is listed in the menu
> 
> ; Terry Keeley
> exten => 612,1,Set(__VM=612) ; VoiceMail ID
> exten => 612,n,Gosub(a10ringtones,internal,1)
> exten => 612,n,Macro(common,SIP/tkeeley,1,a10)
> ; 1 for VM, a10 VM context, no followme, ring for default seconds
> exten => 8612,1,VoiceMail(612 at a10,u)
> exten => 7612,1,VoiceMailMain(612 at a10)
> exten => 7612,n,Hangup()
> 
> ; Joe Intrabartola
> exten => 613,1,Set(__VM=613)
> exten => 613,n,Gosub(a10ringtones,internal,1)
> exten => 613,n,Macro(common,SIP/jintrabartola,1,a10)
> exten => 8613,1,VoiceMail(613 at a10,u)
> exten => 7613,1,VoiceMailMain(613 at a10)
> 
> ; Vinny De Marco
> exten => 617,1,Set(__VM=617)
> exten => 617,n,Gosub(a10ringtones,internal,1)
> exten => 617,n,Macro(common,SIP/vdemarco,1,a10)
> exten => 8617,1,VoiceMail(617 at a10,u)
> exten => 7617,1,VoiceMailMain(617 at a10)
> 
> ; Floral Park Spare
> exten => 618,1,Gosub(a10ringtones,internal,1)
> exten => 618,n,Dial(SIP/sparef1-a10,120,o) ; Ring the phone for up to 2 minutes
> exten => 618,n,Hangup()
> 
> 
> If I make a SIP call across the Internet to Vinny, for example, we issue
> a goto to Vinny's internal extension.  Terry can press the call pickup
> and it all works.  The same if I dial in from the PSTN.  Here is the
> call sequence:
> 
>     -- Executing [vinny at a10in:1] Goto("SIP/jasiii-ad0e1048", "a10pub,617,1") in new stack
>     -- Goto (a10pub,617,1)
>     -- Executing [617 at a10pub:1] Set("SIP/jasiii-ad0e1048", "__VM=617") in new stack
>     -- Executing [617 at a10pub:2] Gosub("SIP/jasiii-ad0e1048", "a10ringtones,internal,1") in new stack
>     -- Executing [internal at a10ringtones:1] SIPAddHeader("SIP/jasiii-ad0e1048", ""Alert-Info: <http://www.notused.com>\;info=alert-internal\;x-line-id=0"") in new stack
>     -- Executing [internal at a10ringtones:2] Return("SIP/jasiii-ad0e1048", "") in new stack
>     -- Executing [617 at a10pub:3] Macro("SIP/jasiii-ad0e1048", "common,SIP/vdemarco,1,a10") in new stack
>     -- Executing [s at macro-common:1] Set("SIP/jasiii-ad0e1048", "TM=24") in new stack
>     -- Executing [s at macro-common:2] Dial("SIP/jasiii-ad0e1048", "SIP/vdemarco,24,o") in new stack
>   == Using SIP RTP TOS bits 176
>   == Using SIP RTP CoS mark 5
>     -- Called vdemarco                                                                                                                                     
>     -- SIP/vdemarco-d4012df8 is ringing
>     -- SIP/vdemarco-d4012df8 is ringing
>     -- SIP/vdemarco-d4012df8 is ringing
>     -- SIP/vdemarco-d4012df8 is ringing
>   == Using SIP RTP TOS bits 176
>   == Using SIP RTP CoS mark 5
>   == Extension Changed 612[a10base] new state InUse for Notify User jintrabartola
>   == Extension Changed 612[a10base] new state InUse for Notify User reception-a10
>     -- Executing [*8617 at a10f:1] Pickup("SIP/tkeeley-acc9aaf8", "617 at a10pub") in new stack
>   == Extension Changed 612[a10base] new state InUse for Notify User mintrabartola
>   == Extension Changed 612[a10base] new state InUse for Notify User mlapolla
>   == Extension Changed 612[a10base] new state InUse for Notify User sparea1-a10
>   == Extension Changed 612[a10base] new state InUse for Notify User clerical-a10
>   == Extension Changed 612[a10base] new state InUse for Notify User confroom-a10
>   == Extension Changed 612[a10base] new state InUse for Notify User smcclain
>   == Extension Changed 612[a10base] new state InUse for Notify User vdemarco
>     -- Executing [*8617 at a10f:2] Playback("SIP/tkeeley-acc9aaf8", "im-sorry") in new stack
>     -- <SIP/tkeeley-acc9aaf8> Playing 'im-sorry.ulaw' (language 'en') NOTE PICKUP APPEARS TO FAIL (I'm sorry message) BUT THEN SUCCEEDS
>     -- SIP/tkeeley-acc9aaf8 answered SIP/jasiii-ad0e1048
>   == Extension Changed 617[a10base] new state Idle for Notify User jintrabartola
>   == Extension Changed 617[a10base] new state Idle for Notify User confroom-a10
>     -- Packet2Packet bridging SIP/jasiii-ad0e1048 and SIP/tkeeley-acc9aaf8
>   == Spawn extension (a10f, *8617, 2) exited non-zero on 'SIP/vdemarco-d4012df8<ZOMBIE>'
>   == Extension Changed 617[a10base] new state Idle for Notify User sparea1-a10
>     -- Executing [h at a10f:1] Hangup("SIP/vdemarco-d4012df8<ZOMBIE>", "") in new stack                                                                       
> 
> If we dial Vinny's extension from an internal phone, say sparef1-a10,
> and Terry tries to pick it up, it fails but the call sequence looks
> identical except the pickup never bridges the call and generates an
> error.  Here is the nearly identical sequence:
> 
>     -- Executing [617 at a10f:1] Set("SIP/sparef1-a10-ad0b12f8", "__VM=617") in new stack
>     -- Executing [617 at a10f:2] Gosub("SIP/sparef1-a10-ad0b12f8", "a10ringtones,internal,1") in new stack
>     -- Executing [internal at a10ringtones:1] SIPAddHeader("SIP/sparef1-a10-ad0b12f8", ""Alert-Info: <http://www.notused.com>\;info=alert-internal\;x-line-id=0"") in new stack
>     -- Executing [internal at a10ringtones:2] Return("SIP/sparef1-a10-ad0b12f8", "") in new stack
>     -- Executing [617 at a10f:3] Macro("SIP/sparef1-a10-ad0b12f8", "common,SIP/vdemarco,1,a10") in new stack
>     -- Executing [s at macro-common:1] Set("SIP/sparef1-a10-ad0b12f8", "TM=24") in new stack
>     -- Executing [s at macro-common:2] Dial("SIP/sparef1-a10-ad0b12f8", "SIP/vdemarco,24,o") in new stack
>   == Using SIP RTP TOS bits 176
>   == Using SIP RTP CoS mark 5
>     -- Called vdemarco                                                                                                                                     
>     -- SIP/vdemarco-1c41fc38 is ringing
>     -- SIP/vdemarco-1c41fc38 is ringing
>     -- SIP/vdemarco-1c41fc38 is ringing
>     -- SIP/vdemarco-1c41fc38 is ringing
>     -- SIP/vdemarco-1c41fc38 is ringing
>   == Using SIP RTP TOS bits 176
>   == Using SIP RTP CoS mark 5
>   == Extension Changed 612[a10base] new state InUse for Notify User jintrabartola
>     -- Executing [*8617 at a10f:1] Pickup("SIP/tkeeley-acc4df68", "617 at a10pub") in new stack
>   == Extension Changed 612[a10base] new state InUse for Notify User reception-a10
> [Oct 14 22:14:41] NOTICE[2778]: app_directed_pickup.c:204 pickup_exec: No target channel found for 617.
>     -- Executing [*8617 at a10f:2] Playback("SIP/tkeeley-acc4df68", "im-sorry") in new stack
>   == Extension Changed 612[a10base] new state InUse for Notify User mintrabartola
>   == Extension Changed 612[a10base] new state InUse for Notify User mlapolla
>   == Extension Changed 612[a10base] new state InUse for Notify User sparea1-a10
>   == Extension Changed 612[a10base] new state InUse for Notify User clerical-a10
>   == Extension Changed 612[a10base] new state InUse for Notify User confroom-a10
>   == Extension Changed 612[a10base] new state InUse for Notify User smcclain
>   == Extension Changed 612[a10base] new state InUse for Notify User vdemarco
>     -- <SIP/tkeeley-acc4df68> Playing 'im-sorry.ulaw' (language 'en')
>     -- Executing [*8617 at a10f:3] Wait("SIP/tkeeley-acc4df68", "0.0.5") in new stack
>     -- Executing [*8617 at a10f:4] Playback("SIP/tkeeley-acc4df68", "you-dialed-wrong-number") in new stack
>     -- <SIP/tkeeley-acc4df68> Playing 'you-dialed-wrong-number.ulaw' (language 'en')
>     -- Executing [*8617 at a10f:5] Wait("SIP/tkeeley-acc4df68", "0.4") in new stack
>     -- Executing [*8617 at a10f:6] Playback("SIP/tkeeley-acc4df68", "vm-goodbye") in new stack
>     -- <SIP/tkeeley-acc4df68> Playing 'vm-goodbye.ulaw' (language 'en')
>     -- Executing [*8617 at a10f:7] Hangup("SIP/tkeeley-acc4df68", "") in new stack
>   == Spawn extension (a10f, *8617, 7) exited non-zero on 'SIP/tkeeley-acc4df68'
>     -- Executing [h at a10f:1] Hangup("SIP/tkeeley-acc4df68", "") in new stack
>   == Spawn extension (a10f, h, 1) exited non-zero on 'SIP/tkeeley-acc4df68'
> 
> They look identical to me! Except one works and one doesn't.  What did I
> do wrong? How do I configure this so call pickup works for both external
> and internal calls? Thanks - John

Found it! I must have a slight misunderstanding about contexts.  I
assumed if contextA was included in contextB and, if a user in contextB
dials a number in contextA, the call context is contextA.  It appears it
is contextB - at least for peers.  It appears to be different for users.
In any event, I needed to add the contexts for all the possible internal
calls to the call pickup command:

exten => _*8XXX,1,Pickup(${EXTEN:2}@a10pub&${EXTEN:2}@a10a&${EXTEN:2}@a10f)

It appears to be working now - John
-- 
John A. Sullivan III
Open Source Development Corporation

Street Preacher: Are you SAVED?????!!!!!!
Educated Skeptic: Saved from WHAT?????!!!!!!
Educated Believer: From our selfishness that hurts the ones we love
                   and condemns us to an eternity of hurting each other.
http://www.spiritualoutreach.com
Christianity that makes sense




More information about the asterisk-users mailing list