Rajkumar S
2006-Oct-31 00:37 UTC
[asterisk-users] S(x) - Hang up the call after 'x' seconds - Not working from queue
Hi,
I have a requirement to limit the calls to our agents via a queue to 5
minutes. I had posted this to a previous thread by name "Maximum
talktime in a queue?" One work around that was suggested was to use
the S(x) in the dial command to the agents, so that all calls to that
extension would be terminated after x seconds.
So I modified the dial command to the agent as:
exten => 1001,1,Dial(SIP/1001,,tS(30))
Now when I call 1001 from another sip phone in the same context it
get's disconnected after 30 seconds.
-- Executing Dial("SIP/1002-b119", "SIP/1001||tS(30)")
in new stack
-- Setting call duration limit to 30 seconds.
-- Called 1001
-- SIP/1001-b605 is ringing
-- SIP/1001-b605 answered SIP/1002-b119
-- Attempting native bridge of SIP/1002-b119 and SIP/1001-b605
== Spawn extension (from-sip, 1001, 1) exited non-zero on
'SIP/1002-b119'
All is fine so far and it works as advertised. Now I am attempting a
call via queue:
-- Executing Queue("SIP/1002-74e9", "Auth-Enq|t") in new
stack
-- Started music on hold, class 'default', on channel
'SIP/1002-74e9'
-- outgoing agentcall, to agent '1001', on
'Local/1001@from-sip-de56,1'
-- Executing Dial("Local/1001@from-sip-de56,2",
"SIP/1001||tS(30)") in new stack
-- Setting call duration limit to 30 seconds.
-- Called 1001
-- Called Agent/1001
-- SIP/1001-d43c is ringing
-- Agent/1001 is ringing
-- SIP/1001-d43c answered Local/1001@from-sip-de56,2
-- Agent/1001 answered SIP/1002-74e9
-- Stopped music on hold on SIP/1002-74e9
== Spawn extension (from-sip, 1001, 1) exited non-zero on
'Local/1001@from-sip-de56,2'
== Spawn extension (from-sip, 99, 1) exited non-zero on
'SIP/1002-74e9'
This call does not terminate after 30 seconds. I hope I have currently
followed the tip from Lenz in my previous tip.
with warm regards,
raj
Leo Ann Boon
2006-Oct-31 04:52 UTC
[asterisk-users] S(x) - Hang up the call after 'x' seconds - Not working from queue
Rajkumar S wrote:> > -- Executing Queue("SIP/1002-74e9", "Auth-Enq|t") in new stack > -- Started music on hold, class 'default', on channel 'SIP/1002-74e9' > -- outgoing agentcall, to agent '1001', on > 'Local/1001@from-sip-de56,1' > -- Executing Dial("Local/1001@from-sip-de56,2", > "SIP/1001||tS(30)") in new stack > -- Setting call duration limit to 30 seconds. > -- Called 1001 > -- Called Agent/1001 > -- SIP/1001-d43c is ringing > -- Agent/1001 is ringing > -- SIP/1001-d43c answered Local/1001@from-sip-de56,2 > -- Agent/1001 answered SIP/1002-74e9 > -- Stopped music on hold on SIP/1002-74e9 > == Spawn extension (from-sip, 1001, 1) exited non-zero on > 'Local/1001@from-sip-de56,2' > == Spawn extension (from-sip, 99, 1) exited non-zero on 'SIP/1002-74e9' >Someone correct me if I'm wrong: The Dial string is missing a '/n' parameter for the Local channel. Without /n, Asterisk will do a native transfer to SIP/1001 and lose the timeout value defined earlier. Leo.