I'm using AMI to initiate a call, first calling the agent and when he picks
up, the call is placed to the customer. The prob is if the user rejects the call
(or they don't have cw...), the call is still placed to the customer...
I havn't found a variable that tells me that the first leg is still up.
Anybody with an idea?
This is what i send to AMI:
Action: Originate
Channel: Local/8542@from-internal
Context: from-turbo
Async: yes
Variable: ext_turbo=8542
Exten: 0703123456
Priority: 1
Timeout: 30000
Callerid: "Turbo" <06012345678>
And this is the extension.conf:
[from-turbo]
exten => _x.,1,Set(CALLERID(name)=${DB(AMPUSER/${ext_turbo}/cidname)})
exten => _x.,n,Set(CALLERID(num)=${DB(AMPUSER/${ext_turbo}/outboundcid)})
exten => _x.,n,NoOp(CID: ${CALLERID(all)} ext_turbo ${ext_turbo} nr ${EXTEN})
exten => _x.,n,Dial(Local/${EXTEN}@from-internal)
exten => _x.,t,Hangup
exten => _x.,i,Hangup
<html><head><meta name="Generator" content="PSI
HTML/CSS Generator"/>
<style type="text/css"><!--
body{font-family:'Courier
New';font-size:10pt;font-color:'#000000';}
LI{display:list-item;margin:0.00in;}
p{display:block;margin:0.00in;}
body{}
--></style>
</head><BODY BGCOLOR="#E9E9E9" ><div><SPAN
style="font-size:10pt;">On Tue, 22 Aug 2006 16:55:37 +0200, Niklas
Larsson wrote:</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">> I'm
using AMI to initiate a call, first calling the agent and
when</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">> he
picks up, the call is placed to the customer. The prob is if
the</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">> user
rejects the call (or they don't have cw...), the call is
still</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">> placed
to the customer...</SPAN></div>
<div><SPAN
style="font-size:10pt;color:navy;">></SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">> I
havn't found a variable that tells me that the first leg is
still</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">>
up.</SPAN></div>
<div> </div>
<div class="body"><SPAN
style="font-size:10pt;">I removed the Local part and called the
extension directly, and the problem went away...</SPAN></div>
<div class="body"> </div>
<div><SPAN style="font-size:10pt;color:navy;">> This is
what i send to AMI:</SPAN></div>
<div><SPAN
style="font-size:10pt;color:navy;">></SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">> Action:
Originate</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">>
Channel: Local/8542@from-internal</SPAN></div>
<div class="body"><SPAN
style="font-size:10pt;">Channel: Sip/8542</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">>
Context: from-turbo</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">> Async:
yes</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">>
Variable: ext_turbo=8542</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">> Exten:
0703123456</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">>
Priority: 1</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">>
Timeout: 30000</SPAN></div>
<div><SPAN style="font-size:10pt;color:navy;">>
Callerid: "Turbo"</SPAN></div>
<div> </div>
<div><SPAN style="font-size:10pt;">/Niklas<br
/><br /></span></div>
</body></html>