Call File to Local to connect waiting agent

Here’s the gist of what I’m looking for. RDD sample is selected from a secondary linux system and I need to be able to dial that record using asterisk and connect the sample to a waiting call center agent.


  1. Call center agent must hear dialing progress.
  2. Call center agent should stay logged in. (no on-hook/off-hook action)
  3. Only the call bridge should be recorded.
  4. Call center agent should hear hold music while no dial in progress.

My thoughts, call part 1, the agent: Have the call center agent soft phone auto dial extension to be automatically logged into individual conference bridge (sip phone intv1002 would auto dial *88 and be entered into ConfBridge 1002). So that’s easy. One side done. Now the tricky part.

My thoughts, call part 2: Have my secondary linux system (the call center agent is logged in to this system to generate the call script) create a call file using local extension (which we’ll call 998877), with variable information including their extension (1002) included. Upon local dial I answer and bridge current call with the waiting call center agent, sitting in their individual ConfBridge.

My sip.conf and conf_bridge.conf seem to be fine. The first call also seems fine. When the second call for intv1002 is generated, I seem to be bridging that call to itself. (Is that possible?)

My call file:
Channel: local/998877@outgoing
Context: outgoing
Extension: 998877
Priority: 1
SetVar: agent_num=1002
SetVar: filename=201309051202511002
SetVar: numtodial=1xxxyyyzzzz
setVar: studycode=x999

exten => *88,1,NoOp()
same => n,NoCDR()
same => n,Set(__agent_num=${SIPURI:8:4})
same => n,ConfBridge(${agent_num})
same => n,Hangup()

exten => 998877,1,NoOp()
same => n,Set(__numtodial=${numtodial})
same => n,Set(__studycode=${studycode})
same => n,Set(__agent_num=${agent_num})
same => n,Set(__filename=${filename})
same => n,ResetCDR()
same => n,StopMixMonitor()
same => n,Answer()
same => n,Bridge(SIP/intv${agent_num})
same => n,Verbose(1,dialnum is ${numtodial})
same => n,Set(CALLERID(num)=1112223333)
same => n,Set(name2=${STRFTIME(${EPOCH},%Y%m%d%H%M%S)}${agent_num})
same => n,MixMonitor(/storage/monitor/${studycode}/${filename}${name2}.wav,b)
same => n,Verbose(1,filename is ${filename}
same => n,Dial(SIP/gateway/${numtodial},36,gF(killem))
same => n,StopMixMonitor()
same => n,ConfBridge(${agent_num})
same => n(killem),Hangup()[/i]

I’m running asterisk 11 currently, but have also tried this on 1.8. Same results. It seems that every second call has half duplex communication, but in reality I think it is full, just intv1002 bridged to itself. There is no NAT, all within the internal network. (which is why I’ve not included sip.conf). Sometimes a second immediate call is sent to xxxyyyzzzz as well. Sometimes the hold music starts upon re-entry to the ConfBridge, sometimes it does not. When the music does not restart, the CLI actually says the music on hold is stopping, as though I am the second user to join the ConfBridge. (per my conf_bridge.conf settings hold music when one person in ConfBridge.)

I’d be happy to include more, but am getting lengthy at this point. I am by no means an asterisk expert, so it could be something simple. I’ve changed my call file and extensions.conf many times and get very similar results. Any direction would be appreciated.


Your call file will try and connnect an extension to itself.

Some of the other things you are asking for should be handled by AgentLogin.