Hi,
I’m trying to transfer a call to another agent.
Our system will call customers. When a customer answers, system will transfer the call to another agent.
For example system will start a call with using SIP/1000 ext.
When customer answers the call, system redirect the call to SIP/1001 ext.
How can I do that?
I tried AMI Action Redirect, but it didn’t work.
My code look like this:
ami.Action_Redirect(“SIP/1000”, “02124448546”, “outboundcontext”, “1”, “SIP/1001”, “1”);
Thanks in advance.
You need to use the channel, not the device, i.e. for a SIP channel, you need the instance ID that follows the hyphen, as well as the device part.
Also, you have used some library on top of AMI wthout identifying the library, so I cannot match up the parameters, however, I think you have too many channels.
Assuming the customer is on an outgoing SIP channel, it should look something like:
Action: Redirect
Channel: SIP/AAAAA-bbbbbbbbb
Context: inboundcontext
Exten: 1001
Priority: 1
However, I suspect you have over-engineered and should have been using call files.
Hi David,
I use very simple AMI code. I use SIP/1000 to start the calls.
AMI code creates an action like this:
Action: Redirect
Channel: SIP/outboundcontext-1asd23498sdf
Exten: 1001
Context: outboundcontext
Priority: 1
[outboundcontext]
exten => 1000,1,Dial(1000,20)
exten => 1001,1,Dial(1001,20)
exten => _X.,n,Dial(SIP/${EXTEN}@MyUMTH,30)
Is there anything wrong in my configuration?
Thanks
exten => _X.,n,Dial(SIP/${EXTEN}@MyUMTH,30)
should be priority 1
Channel: SIP/outboundcontext-1asd23498sdf
should be
Channel: SIP/9999999999@MyUMTH-1asd23498sdf
or, more precisely, whatever the actual name of the outbound channel.
Hello David
I still couldn’t figure out the problem.
I got the following error now.
“WARNING[31783]: app_dial.c:1214 dial_exec_full: Dial argument takes format (technology/[device:]number1)”
I can call local extension 1001 from 1000.
I’m sure I use the correct channel.
If MyUMTH is a peer, rather than a domain name, you probably need to use SIP/MyUMTH/${EXTEN}
That’s nothing to do with the call file, though; you should get the extension to work for a simple call, before using call files.
Finally I found the solution.
İn dialplan I added t parameter to allow transferring.
exten => 1000,1,Dial(SIP/1000,20,t)
Then in my AMI code;
Action: Redirect
Channel: SIP/outboundcontext-1asd23498sdf
Exten: 1001
Context: outboundcontext
Priority: 1
Thanks for your help.