[Home]

Summary:ASTERISK-10797: Agent transfering cal via SIP transfer gets logged out
Reporter:A.R. Nasir Qureshi (nasirq)Labels:
Date Opened:2007-11-18 11:07:31.000-0600Date Closed:2008-02-20 14:45:09.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/Transfers
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Using Polycom 650 for Agent (SIP Protocol SIP/138)
Idefisk for Caller (IAX2 Protocol IAX2/nasir-lt-iax)
Cisco ATA 186 for new extension (SIP Protocol SIP/7777)

1. Agents logs in from Polycom phone using AgentLogin function
2. Caller from Idefisk gets into the Queue
3. Agents get the call
4. Agent transfers using the transfer button to extension 502 (I have tried both attended and blond transfer)
5. Cisco ATA get the call
6. When the agent completes the transfer, the call is transfered fine, (Idefisk and Cisco ATA can talk to each other) but the agent is logged of.

I have tried the same process by making the Idefisk the agent, and the transfer works fine. The agent remains logged in, meaning something is broken in SIP transfer.

Asterisk CLI output:

[Nov 18 21:58:16]     -- Executing [281002@extensions:1] AgentLogin("SIP/138-082340b0", "1002") in new stack
[Nov 18 21:58:16]     -- <SIP/138-082340b0> Playing 'agent-pass' (language 'en')
[Nov 18 21:58:18]     -- <SIP/138-082340b0> Playing 'agent-loginok' (language 'en')
[Nov 18 21:58:20]     -- Started music on hold, class 'default', on SIP/138-082340b0
[Nov 18 21:58:20]   == Agent '1002' logged in (format ulaw/ulaw)
[Nov 18 21:58:22]     -- Accepting AUTHENTICATED call from 192.168.0.199:
      > requested format = gsm,
      > requested prefs = (),
      > actual format = gsm,
      > host prefs = (g726),
      > priority = mine
[Nov 18 21:58:22]     -- Executing [2923232@extensions:1] Set("IAX2/nasir-lt-iax-2", "CALLERID(num)=23232") in new stack
[Nov 18 21:58:22]     -- Executing [2923232@extensions:2] Queue("IAX2/nasir-lt-iax-2", "support") in new stack
[Nov 18 21:58:22]     -- Started music on hold, class 'default', on IAX2/nasir-lt-iax-2
[Nov 18 21:58:22]     -- Stopped music on hold on SIP/138-082340b0
[Nov 18 21:58:22]     -- agent_call, call to agent '1002' call on 'SIP/138-082340b0'
[Nov 18 21:58:22]     -- <SIP/138-082340b0> Playing 'beep' (language 'en')
[Nov 18 21:58:23]     -- Agent/1002 answered IAX2/nasir-lt-iax-2
[Nov 18 21:58:23]     -- <Agent/1002> Playing 'CallAnnouncement' (language 'en')
[Nov 18 21:58:26]     -- Stopped music on hold on IAX2/nasir-lt-iax-2
[Nov 18 21:58:31]     -- Started music on hold, class 'default', on IAX2/nasir-lt-iax-2
[Nov 18 21:58:36]     -- Executing [502@extensions:1] Dial("SIP/138-08223910", "SIP/7777|40|whtWHT") in new stack
[Nov 18 21:58:36]     -- Called 7777
[Nov 18 21:58:36]  Extension Changed 4308 new state Ringing for Notify User 138
[Nov 18 21:58:38]     -- SIP/7777-082497a0 is ringing
[Nov 18 21:58:39]     -- Stopped music on hold on IAX2/nasir-lt-iax-2
[Nov 18 21:58:39]     -- Started music on hold, class 'default', on SIP/138-082340b0
[Nov 18 21:58:39]   == Spawn extension (extensions, 2923232, 2) exited non-zero on 'SIP/138-08223910<ZOMBIE>'
[Nov 18 21:58:39]     -- Stopped music on hold on SIP/138-082340b0
[Nov 18 21:58:39]   == Agent '1002' logged out
[Nov 18 21:58:39]   == Spawn extension (extensions, 281002, 1) exited non-zero on 'SIP/138-082340b0'
[Nov 18 21:58:43]     -- SIP/7777-082497a0 answered IAX2/nasir-lt-iax-2
[Nov 18 21:58:43]  Extension Changed 4308 new state Busy for Notify User 138
[Nov 18 21:58:47]   == Spawn extension (extensions, 502, 1) exited non-zero on 'IAX2/nasir-lt-iax-2'
[Nov 18 21:58:47]     -- Hungup 'IAX2/nasir-lt-iax-2'


queue_log :

1195405100|1195405096.496|NONE|Agent/1002|AGENTLOGIN|SIP/138-082340b0
1195405102|1195405102.497|support|NONE|ENTERQUEUE||23232
1195405106|1195405102.497|support|Agent/1002|CONNECT|4|1195405102.498
1195405119|1195405102.497|support|Agent/1002|COMPLETECALLER|4|13|1
1195405119|1195405096.496|NONE|Agent/1002|AGENTLOGOFF|SIP/138-082340b0|19

Comments:By: Olle Johansson (oej) 2007-11-19 01:32:52.000-0600

the SIP channel can't log off anything, so this must be a bug in the agent/queue system.

By: Joshua C. Colp (jcolp) 2007-11-19 07:58:13.000-0600

oej: If they are using AgentLogin it sure can, the SIP channel itself can queue a hangup which effectively logs off the agent. That is what is happening here and what I (personally) expect to happen when I use both a blind and attended transfer on a SIP phone. They both hang up once the transfer is complete.

By: Olle Johansson (oej) 2007-11-19 09:30:55.000-0600

Ah. So the hangup causes the logoff. That's what I mean - chan_sip doesn't do anything specific to log the agent off. But as you say, we do hangup after transfers.

By: A.R. Nasir Qureshi (nasirq) 2007-11-19 11:58:01.000-0600

So, I have two questions.

1. Why does'nt the IAX2 hangup after a transfer ?
2. How are Agents using SIP phones suppose to transfer calls and remain logged in ?

By: Joshua C. Colp (jcolp) 2007-12-17 12:38:48.000-0600

1. If you can provide the console output with IAX2 then we can examine that and see what it does...
2. I would assume people are using the DTMF based transfers or using blind transfers.

By: A.R. Nasir Qureshi (nasirq) 2007-12-18 04:46:57.000-0600

I can provide the IAX2 output, but my question is in response to your "That is what is happening here and what I (personally) expect to happen". I mean if the hangup is what should happen when the call is transfered, and IAX does not do it, then it means that there is some thing wrong in IAX.

I think that what IAX does is OK. SIP should make a distinction when transferring calls and if the call being transfered came to a logged in agent, then the agent should remain logged in (this is what IAX does).

I have tried using blind transfer on SIP, and the agent still logs off.



By: Joshua C. Colp (jcolp) 2007-12-18 08:04:38.000-0600

IAX doesn't do anything special for agents, and I need to see the console output for it. Mostly because I've never seen an IAX call do an attended transfer. If we do go down the road of trying to make this work as you expect... it's going to be extremely difficult.

By: A.R. Nasir Qureshi (nasirq) 2007-12-18 11:49:12.000-0600

I tried to do an attended transfer, but I do not know how to do it.

The output for a blind transfer is:

[Dec 18 22:38:46]   == Spawn extension (extensions, 302, 31) exited non-zero on 'IAX2/nasir-lt-iax-17'
[Dec 18 22:38:46]     -- Hungup 'IAX2/nasir-lt-iax-17'
[Dec 18 22:38:46]     -- Executing [408@extensions:1] Dial("SIP/138-08222430", "SIP/7777|20|whtWHTdj") in new stack
[Dec 18 22:38:46]     -- Called 7777
[Dec 18 22:38:48]     -- SIP/7777-082291f8 is ringing
[Dec 18 22:38:56]     -- SIP/7777-082291f8 answered SIP/138-08222430

However I have started experiencing another problem. The transfers work fine when transferring normal calls, but when I use the IAX phone to login as an agent, and then transfer the call, my system goes down real fast, with load average increasing to more than 100. Killing asterisk restores everything.

[Dec 18 22:47:58]     -- Executing [296656@extensions:7] Queue("SIP/138-08238a90", "tollfree") in new stack
[Dec 18 22:47:58] WARNING[3767]: translate.c:163 framein: no samples for ulawtolin
[Dec 18 22:47:58]     -- Started music on hold, class 'tollfree', on SIP/138-08238a90
[Dec 18 22:47:58]     -- Stopped music on hold on IAX2/nasir-lt-iax-7
[Dec 18 22:47:58]     -- agent_call, call to agent '1001' call on 'IAX2/nasir-lt-iax-7'
[Dec 18 22:47:58]     -- <IAX2/nasir-lt-iax-7> Playing 'beep' (language 'en')
[Dec 18 22:47:59]     -- Agent/1001 answered SIP/138-08238a90
[Dec 18 22:47:59]     -- Stopped music on hold on SIP/138-08238a90
mit2*CLI>
mit2*CLI>
mit2*CLI>
mit2*CLI>
mit2*CLI>
mit2*CLI>
mit2*CLI>
[Dec 18 22:48:25]     -- Started music on hold, class 'agent', on IAX2/nasir-lt-iax-7
[Dec 18 22:48:25]   == Spawn extension (extensions, 408, 0) exited non-zero on 'SIP/138-08238a90'
[Dec 18 22:48:25]     -- Executing [408@extensions:1] Dial("SIP/138-08238a90", "SIP/7777|20|whtWHTdj") in new stack
[Dec 18 22:48:25]     -- Called 7777
[Dec 18 22:48:25]  Extension Changed 4308 new state Ringing for Notify User 138
[Dec 18 22:48:25] WARNING[3761]: interface.c:215 decodeMP3: Junk at the beginning of frame 49443303
[Dec 18 22:48:26]     -- SIP/7777-0823dcf0 is ringing
[Dec 18 22:48:37]  Extension Changed 4308 new state Busy for Notify User 138
[Dec 18 22:48:37]     -- SIP/7777-0823dcf0 answered SIP/138-08238a90

Sometimes the transfer goes ok, and when that happens, the agent on the IAX phone remains logged in, ready to take another call.

By: Joshua C. Colp (jcolp) 2008-02-14 14:11:35.000-0600

After examining this further there is nothing we can do to stop this. Once the SIP phone completes the transfer it terminates the call.

By: A.R. Nasir Qureshi (nasirq) 2008-02-17 10:11:59.000-0600

Then how come IAX does not terminated the call after transferring ? Why cannot the SIP be programmed to handle the transfer same as IAX ?

By: Joshua C. Colp (jcolp) 2008-02-20 14:45:09.000-0600

The IAX2 implementation in question isn't terminating the call once transferred, unlike the SIP device which is. It sends a BYE saying to end the call.