[Asterisk-Users] chan_agent and SIP UA transfers fail

Kevin Blackham blackham at gmail.com
Fri Sep 10 17:39:13 MST 2004


I am beating my head against a problem where queue calls offered by
Agent channel to a SIP UA cannot be REFER transferred if the target
UA/extension hasn't accepted the call.  If the members of the queue
are SIP channels, this is not a problem.  I suspect chan_agent isn't
flagging the bridge from Zap/n -> SIP/n properly, or this is by
design.  The following line is what is spoken before * hangs up on the
caller:

Sep 10 17:41:55 NOTICE[1087896496]: chan_sip.c:6817 attempt_transfer:
Transfer attempted with no bridged calls to transfer

The SIP UA logged in as the agent is a Polycom IP 500, it is
attempting the REFER transfer.  The target of the transfer is either
another SIP UA (kphone in this testing case) or an * extension (ie:
call parking 700).  If the Polycom stays in the media path until the
target answers, then * builds a native bridge and has no issue.  The
Zap channel is a T100P doing a mix of E&M and Loop Start FXS (for
ridiculous reasons related to our old Inter-Tel PBX).

Transfers by dialing '#<ext>' are fine, and once they're no longer
attached to the Agent channel, future REFER transfers in the same
dialog work without incident.

Am I doing something wrong, or should I kick this over to asterisk-dev
and mantis and try to tear apart chan_agent?

Config follows.  Event log first...

****[broken]****

Goto (queues,tech,1)
    -- Started music on hold, class 'default', on Zap/12-1
    -- Stopped music on hold on Zap/12-1
    -- Playing 'queue-youarenext' (language 'en')
    -- Told Zap/12-1 in tech their queue position (which was 1)
    -- Started music on hold, class 'default', on Zap/12-1
    -- outgoing agentcall, to agent '139', on 'Local/5939 at intra-office-4df7,1'
 outgoing agentcall, to agent '139', on 'Local/5939 at intra-office-44f6,1'
    -- Called Agent/@4
    -- Called 5939
    -- SIP/5939-a1c8 is ringing
    -- Agent/139 is ringing
    -- SIP/5939-a1c8 answered Local/5939 at intra-office-44f6,2
    -- Agent/139 answered Zap/24-1
    -- Stopped music on hold on Zap/24-1
**[this is where I attempt to blind transfer]
    -- Called 5916
    -- SIP/5916-0f97 is ringing
Sep 10 17:41:55 NOTICE[1087896496]: chan_sip.c:6817 attempt_transfer:
Transfer attempted with no bridged calls to transfer
    -- Hungup 'Zap/24-1'
**[the caller is now rather pissed off and calls back to threaten my children]

****[if I allow the target UA to accept the call, all is well]****

    -- Told Zap/23-1 in tech their queue position (which was 1)
    -- Started music on hold, class 'default', on Zap/23-1
    -- Called SIP/5939
    -- SIP/5939-0e14 is ringing
    -- SIP/5939-0e14 answered Zap/23-1
    -- Stopped music on hold on Zap/23-
**[call is placed on hold as Polycom transfer softkey is pressed]
    -- Started music on hold, class 'default', on Zap/23-1
    -- Called 5916
    -- SIP/5916-a3c6 is ringing
    -- SIP/5916-a3c6 answered SIP/5939-c70d
**[I notice it's bridging the two SIP channels, and not Zap/23-1 or
Agent/139 -> SIP/5916]
**[I guess it would be bad to bridge an Agent channel, I'd get no more
calls! :-) ]
    -- Attempting native bridge of SIP/5939-c70d and SIP/5916-a3c6
    -- Attempting native bridge of SIP/5939-c70d and SIP/5916-a3c6
    -- Stopped music on hold on Zap/23-1
**[worked, hanging up]
    -- Hungup 'Zap/23-1'

****[Here's an attempt where I transfer by dialing #5916.]****

    -- Goto (submenu-tech,s,1)
    -- Playing 'computer-friend1' (language 'en')
    -- Goto (queues,tech,1)
    -- Playing 'silence/1' (language 'en')
    -- Started music on hold, class 'default', on Zap/24-1
    -- Stopped music on hold on Zap/24-1
    -- Playing 'queue-youarenext' (language 'en')
    -- Told Zap/24-1 in tech their queue position (which was 1)
    -- Started music on hold, class 'default', on Zap/24-1
    -- Called SIP/5939
    -- SIP/5939-9686 is ringing
    -- SIP/5939-9686 answered Zap/24-1
**[dialed #]
    -- Stopped music on hold on Zap/24-1
    -- Started music on hold, class 'default', on Zap/24-1
    -- Playing 'pbx-transfer' (language 'en')
**[dialed 5916]
    -- Stopped music on hold on Zap/24-1
    -- Called 5916
    -- SIP/5916-5212 is ringing
**[I notice * managed to detach the caller from the Agent channel
using old-school transfer]
    -- SIP/5916-5212 answered Zap/24-1
    -- Hungup 'Zap/24-1'

[relevant configs; too big to include all, trimmed for efficiency]

****[extensions.conf]****

[intra-office]  ;extensions go here, agent dials this context
include => parkedcalls
exten => _59XX,1,Dial(SIP/${EXTEN},60)

[from-sip]
exten => 338,1,AgentCallbackLogin(|${CALLERIDNUM}@intra-office)

****[queues.conf]****
[general]
[default]
[tech]
...irrelevant stuff snipped...
joinempty = yes
member => Agent/@4  ;(broken)
;member => SIP/5939  ;(works)

****[agents.conf]****
[agents]
...irrelevant junk snipped...
group=1,4
agent => 139,,Kevin Blackham

****[sip.conf]****
[general]
realm=xmission.com
context=default
port=5061
bindaddr=<snip>
srvlookup=yes
tos=0x18
maxexpirey=3600
defaultexpirey=120
canreinvite=yes
relaxdtmf=yes

;my UAs register to a SER proxy, which forwards most non-REGISTER
methods to asterisk
;asterisk talks back to the UAs through SER, and there's love in
ser.cfg to prevent loops

[5939] ;polycom
type=friend
host=sip.xmission.com
username=5939
mailbox=5939 at default
context=from-office

[5916] ;kphone
type=friend
host=sip.xmission.com
username=5916
mailbox=5916 at default
context=from-office
dtmfmode=inband
deny=all
allow=ulaw



More information about the asterisk-users mailing list