Call Transfer issues in Asterisk 16

In Asterisk 16.2.1 when I transfer a queue call from one agent eg extn 32866 to exten 32583 the agent 32866 remains inuse and can’t take anohter call.

I’m thinking its how my users are setup, the numbers woudl be like local/exten@stations where as the channels are actually SIP/First-Name or SIP/FLastName

Here is call data

  • Called SIP/Russ-Clark
    – SIP/Russ-Clark-0000001d is ringing
    – Local/rcclark@agents-00000009;1 is ringing
    > 0x7f1a04033f80 – Strict RTP learning after remote address set to: 10.119.220.220:2268
    – SIP/Russ-Clark-0000001d answered Local/rcclark@agents-00000009;2
    – Channel SIP/Russ-Clark-0000001d joined ‘simple_bridge’ basic-bridge <32b8ff09-0003-47fb-8994-37b3bb14ac31>
    – Local/rcclark@agents-00000009;1 answered SIP/ec2-tel36-0000001c
    == Begin MixMonitor Recording SIP/ec2-tel36-0000001c
    – Channel Local/rcclark@agents-00000009;2 joined ‘simple_bridge’ basic-bridge <32b8ff09-0003-47fb-8994-37b3bb14ac31>
    – Executing [s@macro-agentconnect:1] Set(“Local/rcclark@agents-00000009;1”, “agentdevice=Custom:agent-Russ-Clark”) in new stack
    – Executing [s@macro-agentconnect:2] Set(“Local/rcclark@agents-00000009;1”, “DEVICE_STATE(Custom:agent-Russ-Clark)=INUSE”) in new stack
    – Channel Local/rcclark@agents-00000009;1 joined ‘simple_bridge’ basic-bridge
    – Channel SIP/ec2-tel36-0000001c joined ‘simple_bridge’ basic-bridge
    > 0x7f1a04033f80 – Strict RTP switching to RTP target address 10.119.220.220:2268 as source
    > Move-swap optimizing Local/rcclark@agents-00000009;1 <-- SIP/Russ-Clark-0000001d.
    – Channel SIP/Russ-Clark-0000001d left ‘simple_bridge’ basic-bridge <32b8ff09-0003-47fb-8994-37b3bb14ac31>
    – Channel Local/rcclark@agents-00000009;1 left ‘simple_bridge’ basic-bridge
    – Channel SIP/Russ-Clark-0000001d swapped with Local/rcclark@agents-00000009;1 into ‘simple_bridge’ basic-bridge
    – Channel Local/rcclark@agents-00000009;2 left ‘simple_bridge’ basic-bridge <32b8ff09-0003-47fb-8994-37b3bb14ac31>
    == Spawn extension (agents, rcclark, 9) exited non-zero on ‘Local/rcclark@agents-00000009;2’
    – Executing [h@agents:1] GotoIf(“Local/rcclark@agents-00000009;2”, “0?finish:check”) in new stack
    – Goto (agents,h,2)
    – Executing [h@agents:2] GotoIf(“Local/rcclark@agents-00000009;2”, “1?finish:update”) in new stack
    – Goto (agents,h,4)
    – Executing [h@agents:4] NoOp(“Local/rcclark@agents-00000009;2”, “1557501972.2456”) in new stack
    > 0x7f1a04033f80 – Strict RTP learning complete - Locking on source address 10.119.220.220:2268
    – Channel SIP/Russ-Clark-0000001d: Started DTMF blind transfer.
    – <SIP/Russ-Clark-0000001d> Playing ‘pbx-transfer.ulaw’ (language ‘en’)
    – Music class default requested but no musiconhold loaded.
    – Channel SIP/Russ-Clark-0000001d: Dialed ‘832583@stations’ does not exist.
    – <SIP/Russ-Clark-0000001d> Playing ‘pbx-invalid.ulaw’ (language ‘en’)
    – Channel SIP/Russ-Clark-0000001d left ‘simple_bridge’ basic-bridge
    – Executing [h@agents:3] Set(“SIP/Russ-Clark-0000001d”, “DEVICE_STATE()=NOT_INUSE”) in new stack
    [2019-05-10 10:26:41.250] WARNING[35479][C-0000000d]: func_devstate.c:115 devstate_write: The DEVICE_STATE function can only be used to set ‘Custom:’ device state!
    – Channel SIP/ec2-tel36-0000001c left ‘simple_bridge’ basic-bridge
    – Executing [h@agents:4] NoOp(“SIP/Russ-Clark-0000001d”, “1557501973.2459”) in new stack
    – Auto fallthrough, channel ‘SIP/Russ-Clark-0000001d’ status is ‘UNKNOWN’
    – Executing [h@agents:1] GotoIf(“SIP/Russ-Clark-0000001d”, “1?finish:check”) in new stack
    – Goto (agents,h,4)
    – Executing [h@agents:4] NoOp(“SIP/Russ-Clark-0000001d”, “1557501973.2459”) in new stack
    – Executing [32897@stations:1] Set(“SIP/ec2-tel36-0000001c”, “HASH(station,context)=stations”) in new stack
    – Executing [32897@stations:2] Set(“SIP/ec2-tel36-0000001c”, “HASH(station,localexten)=32897”) in new stack
    – Executing [32897@stations:3] Set(“SIP/ec2-tel36-0000001c”, “HASH(station,extstate)=NOT_INUSE”) in new stack
    – Executing [32897@stations:4] Set(“SIP/ec2-tel36-0000001c”, “HASH(station,hasmailbox)=1”) in new stack
    – Executing [32897@stations:5] Set(“SIP/ec2-tel36-0000001c”, “extinfo=SIP/Daniel-Siemens&SIP/dwsiemens~20~NONE”) in new stack
    – Executing [32897@stations:6] Set(“SIP/ec2-tel36-0000001c”, “HASH(station,devicestring)=SIP/Daniel-Siemens&SIP/dwsiemens”) in new stack
    – Executing [32897@stations:7] Set(“SIP/ec2-tel36-0000001c”, “HASH(station,timeout)=20”) in new stack
    – Executing [32897@stations:8] Set(“SIP/ec2-tel36-0000001c”, “HASH(station,mobile)=NONE”) in new stack
    – Executing [32897@stations:9] GotoIf(“SIP/ec2-tel36-0000001c”, “1?entry:setcid”) in new stack
    – Goto (stations,32897,11)
    – Executing [32897@stations:11] GotoIf(“SIP/ec2-tel36-0000001c”, “0?mailboxonly:valid”) in new stack
    – Goto (stations,32897,16)
    – Executing [32897@stations:16] GotoIf(“SIP/ec2-tel36-0000001c”, “1?exten-route:exten-oper”) in new stack
    – Goto (stations,32897,17)
    – Executing [32897@stations:17] GotoIf(“SIP/ec2-tel36-0000001c”, “1?exten-vmail:exten-mobile”) in new stack
    – Goto (stations,32897,18)
    – Executing [32897@stations:18] Dial(“SIP/ec2-tel36-0000001c”, “SIP/Daniel-Siemens&SIP/dwsiemens,20,kKtT”) in new stack
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    == Using SIP RTP TOS bits 184
    == Using SIP RTP CoS mark 5
    – Called SIP/Daniel-Siemens
    – Called SIP/dwsiemens
    – SIP/dwsiemens-0000001f connected line has changed. Saving it until answer for SIP/ec2-tel36-0000001c
    – SIP/Daniel-Siemens-0000001e connected line has changed. Saving it until answer for SIP/ec2-tel36-0000001c
    – SIP/Daniel-Siemens-0000001e is ringing
    – SIP/dwsiemens-0000001f is ringing
    > 0x7f1a14045ed0 – Strict RTP learning after remote address set to: 10.119.220.166:10036
    – SIP/Daniel-Siemens-0000001e connected line has changed. Saving it until answer for SIP/ec2-tel36-0000001c
    – SIP/Daniel-Siemens-0000001e answered SIP/ec2-tel36-0000001c
    – Channel SIP/Daniel-Siemens-0000001e joined ‘simple_bridge’ basic-bridge <9b869133-fe4f-4e64-9ab4-5477c6d71804>
    – Channel SIP/ec2-tel36-0000001c joined ‘simple_bridge’ basic-bridge <9b869133-fe4f-4e64-9ab4-5477c6d71804>
    > 0x7f1a14045ed0 – Strict RTP switching to RTP target address 10.119.220.166:10036 as source
    > 0x7f1a14045ed0 – Strict RTP learning complete - Locking on source address 10.119.220.166:10036
    vmctel22*CLI> queue show Marine-Support
    Marine-Support has 0 calls (max unlimited) in ‘leastrecent’ strategy (25s holdtime, 78s talktime), W:5, C:9, A:0, SL:88.9%, SL2:88.9% within 60s
    Members:
    Kimberly Rooks (Local/klrooks@agents from Custom:agent-Kimberly-Rooks) with penalty 1 (ringinuse disabled) (realtime) (paused was 91937 secs ago) (Not in use) has taken no calls yet
    Russ Clark (Local/rcclark@agents from Custom:agent-Russ-Clark) with penalty 1 (ringinuse disabled) (realtime) (In use) has taken 2 calls (last was 16 secs ago)
    Kory Lorenz (Local/klorenz@agents from Custom:agent-Kory-Lorenz) with penalty 1 (ringinuse disabled) (realtime) (Not in use) has taken 7 calls (last was 728 secs ago)
    No Callers

    – Channel SIP/ec2-tel36-0000001c left ‘simple_bridge’ basic-bridge <9b869133-fe4f-4e64-9ab4-5477c6d71804>
    == Spawn extension (stations, 32897, 18) exited non-zero on ‘SIP/ec2-tel36-0000001c’
    – Channel SIP/Daniel-Siemens-0000001e left ‘simple_bridge’ basic-bridge <9b869133-fe4f-4e64-9ab4-5477c6d71804>
    == MixMonitor close filestream (mixed)
    == End MixMonitor Recording SIP/ec2-tel36-0000001c
    vmctel22*CLI> queue show Marine-Support
    Marine-Support has 0 calls (max unlimited) in ‘leastrecent’ strategy (25s holdtime, 78s talktime), W:5, C:9, A:0, SL:88.9%, SL2:88.9% within 60s
    Members:
    Kimberly Rooks (Local/klrooks@agents from Custom:agent-Kimberly-Rooks) with penalty 1 (ringinuse disabled) (realtime) (paused was 91946 secs ago) (Not in use) has taken no calls yet
    Russ Clark (Local/rcclark@agents from Custom:agent-Russ-Clark) with penalty 1 (ringinuse disabled) (realtime) (In use) has taken 2 calls (last was 25 secs ago)
    Kory Lorenz (Local/klorenz@agents from Custom:agent-Kory-Lorenz) with penalty 1 (ringinuse disabled) (realtime) (Not in use) has taken 7 calls (last was 737 secs ago)
    No Callers

Any ideas how to make this work?

Here is an example of the end result
Above I failed on a first attempt in the transfer so the stack has some extra uglyness.

Marine-Support has 0 calls (max unlimited) in ‘leastrecent’ strategy (19s holdtime, 69s talktime), W:5, C:10, A:0, SL:90.0%, SL2:90.0% within 60s
Members:
Kimberly Rooks (Local/klrooks@agents from Custom:agent-Kimberly-Rooks) with penalty 1 (ringinuse disabled) (realtime) (paused was 92738 secs ago) (Not in use) has taken no calls yet
Russ Clark (Local/rcclark@agents from Custom:agent-Russ-Clark) with penalty 1 (ringinuse disabled) (realtime) (Not in use) has taken 2 calls (last was 817 secs ago)
Kory Lorenz (Local/klorenz@agents from Custom:agent-Kory-Lorenz) with penalty 1 (ringinuse disabled) (realtime) (In use) has taken 8 calls (last was 29 secs ago)
No Callers

vmctel22*CLI> core show calls
0 active calls

You appear to be using custom device state to manage your device state, your problem would be in your for what manipulates and sets it.

Is there a way for me not to use custom states?

That’s up to you and how things are configured. What to use for device state is set for each member.

I’m trying to unwind the crazy stuff that was done. or can I add (easly) somehow to the transfer feature a way to set the device state?

The transfer feature has nothing to do with the custom device state, that seems to be set from the dialplan. WIthout understanding why it was done and how it’s expected to be managed, there’s no real clear/specific answers of how to fix it.

Its all over in the agent login / logout to a queue,

“31803,1,Answer({answerwait})" "31803,n,Set(agentname={ODBC_AGENTNAME({CALLERID(num)})})" "31803,n,Set(interface=Local/{agentname}@agents)”
“31803,n,Set(agentstatus={ODBC_AGENTSTATUS({interface})})”
“31803,n,Set(agentdevice={ODBC_AGENTDEVICEBYNAME({agentname})})”
“31803,n,GotoIf([{ISNULL({agentstatus})}]?unknown)" "31803,n,GotoIf([{agentstatus}=PAUSED]?unpause)" "31803,n,GotoIf([{agentstatus}=UNPAUSED]?pause)" "31803,n(unknown),Playback(invalid)" "31803,n,Goto(finish)" "31803,n(pause),PauseQueueMember(,{interface},{FILTER(0-9,{EXTEN})}|{CALLERID(all)})" "31803,n,NoOp({PQMSTATUS})”
“31803,n,Set(DEVICE_STATE({agentdevice})=UNAVAILABLE)" "31803,n,Playback(agent-loggedoff)" "31803,n,Goto(finish)" "31803,n(unpause),UnpauseQueueMember(,{interface},{FILTER(0-9,{EXTEN})}|{CALLERID(all)})" "31803,n,NoOp({UPQMSTATUS})”
“31803,n,Set(DEVICE_STATE(${agentdevice})=NOT_INUSE)”
“31803,n,Playback(agent-loginok)”
“31803,n,Goto(finish)”
“31803,n(finish),Hangup()”

I’ve ripped out the custom device state that was put in.

Most items work but aborting a call transfer doesn’t.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.