<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=290502617-17022006><FONT face=Arial color=#0000ff size=2>Same
as before but instead of SIP as the origination channel you pass
ZAP/g0/XXXXXXXXXXX (the DID of the agent) to your .call file. In fact, this is
exactly how the <A href="http://www.landmarkhomes.ca">www.landmarkhomes.ca</A>
script works (it calls the guy who entered his phone number in the website, when
he picks up, it calls the salesperson's cell number and the two are bridged
together)</FONT></SPAN></DIV>
<DIV><SPAN class=290502617-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=290502617-17022006><FONT face=Arial color=#0000ff size=2>The
drawback is, of course, that it uses 2 ZAP channels to bridge the call together,
but this isn't a problem I guess for you since you seem to have ZAP channels
coming out of your yinyang. </FONT></SPAN></DIV>
<DIV><SPAN class=290502617-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=290502617-17022006><FONT face=Arial color=#0000ff size=2>I have
an implementation in Active Server Pages (we are a MS shop) that I can send you
- it's suprisingly simple - but it could be easily modified for PHP or what
have you. </FONT></SPAN></DIV>
<DIV><SPAN class=290502617-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Aloi, Christopher
[mailto:caloi@usadatanet.com]<BR><B>Sent:</B> Friday, February 17, 2006 9:56
AM<BR><B>To:</B> Asterisk Users Mailing List - Non-Commercial
Discussion<BR><B>Subject:</B> RE: [Asterisk-Users] A unique 'click to call'
project - Could usesome advice<BR><BR></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006>Colin,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006>Thanks for your assistance.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006>Reading over your advice I seem to still be a bit
confused.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006>My agents are not on the Asterisk server; it appears
in your advice that my the call will travel this path:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006>WWW interface --> agent enters their DID, platform
to use, and termination DID --> AST calls agent --> Agent calls
termination DID</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006>If my agents are not on the Asterisk server (believe
me, I wish there were) :) how will this work?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006>I need a way to pass both the desired termination DID
and the origination DID.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006>Maybe I missed something....</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006>Thanks,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=180514416-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><I><SPAN lang=en-us><FONT face=Arial size=2>--
-- --</FONT> </SPAN></I><BR><I><SPAN lang=en-us><FONT face=Arial
size=2> Christopher T. Aloi</FONT></SPAN></I> <BR><I><SPAN
lang=en-us><FONT face=Arial size=2> USA Datanet - Technical Support
Engineer</FONT></SPAN></I> <BR><I><SPAN lang=en-us><FONT face=Arial
size=2> 318 South Clinton Street</FONT></SPAN></I> <BR><I><SPAN
lang=en-us><FONT face=Arial size=2> Syracuse, NY 13202</FONT></SPAN></I>
<BR><I><SPAN lang=en-us><FONT face=Arial size=2> C: (315) 569
4033</FONT></SPAN></I> <BR><I><SPAN lang=en-us><FONT face=Arial
size=2> O: (315) 579 7074</FONT></SPAN></I> <BR><I><SPAN lang=en-us><FONT
face=Arial size=2> E: </FONT></SPAN></I><A
href="mailto:caloi@usadatanet.com"><I><SPAN lang=en-us><U><FONT face=Arial
color=#0000ff size=2>caloi@usadatanet.com</FONT></U></SPAN></I></A><I><SPAN
lang=en-us></SPAN></I> <BR><I><SPAN lang=en-us><FONT face=Arial size=2>-- --
--</FONT></SPAN></I><SPAN lang=en-us> </SPAN></DIV>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Colin Anderson
[mailto:ColinA@landmarkmasterbuilder.com] <BR><B>Sent:</B> Friday, February
17, 2006 10:42 AM<BR><B>To:</B> 'Asterisk Users Mailing List - Non-Commercial
Discussion'<BR><B>Subject:</B> RE: [Asterisk-Users] A unique 'click to call'
project - Could usesome advice<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff size=2>You
create a context in your dialplan that accepts the DID to call as a variable
using the SetVar: syntax in your .call file. You then set up the context to
call your agent, and when they pick up, the context takes the variable you set
in your .call file as the dialstring argument for a subsequent Dial().
Once the DID picks up, the calls are bridged together. Whatever web scripting
language you use writes the .call file, and you use POSTed arguments or
querystrings:</FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff size=2><A
href="http://foo.com/call?context=MyContext&Agent=SIP/5555&DID=15555551212">http://foo.com/call?context=MyContext&Agent=SIP/5555&DID=15555551212</A></FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff size=2>You
can see this in action at <A
href="http://www.landmarkhomes.ca">www.landmarkhomes.ca</A> - click on any of
the pretty buttons that say "Call us now" </FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2>However, I have noticed that * 1.2.x will not wait for the caller to
pick up before executing the rest of the directives in the context - it
keeps executing regardless of the calling party's pickup status. Using * 1.0.x
the context will wait for the caller to pick up before placing the call to the
callee (i.e. executing the rest of the directives in the
context) </FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2>.call file (shortened to relevant)</FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2>Channel: SIP/XXXX (if you are using SIP
phones)</FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2>SetVar: DID=XXXXXXXXXXX </FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2>Context: MyContext</FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2>[MyContext]</FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2>exten => s,1,Dial(ZAP/g0/${DID})</FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2>hth</FONT></SPAN></DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=115402715-17022006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Aloi, Christopher
[mailto:caloi@usadatanet.com]<BR><B>Sent:</B> Friday, February 17, 2006 8:07
AM<BR><B>To:</B> Asterisk Users Mailing List - Non-Commercial
Discussion<BR><B>Subject:</B> [Asterisk-Users] A unique 'click to call'
project - Could use some advice<BR><BR></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>Hello List,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>I work for an IP communication provider in upstate
NY as the engineer assisting our technical support team.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>We provide a number of different Telco systems to
residential subscribers; and in an effort to more effectively trouble shoot
termination problems I came up with the idea of creating a click to call
system that will allow our agents to effortlessly place test
calls.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>On a daily basis we place numerous (50-100) 'test'
calls to various locations in the US; these 'test' calls are routed using
one of three different phone systems:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>1) The PSTN</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>2) Broadband phone platform one</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>3) Broadband phone platform two</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>I have an Asterisk server configured that can
terminate out three platforms listed above.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>Our support agents are behind a Televantage ACD
using D-TermSeries E NEC phones. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>Each agent has a DID and are permitted to receive
inbound calls on that DID.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>Here is my goal:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>Create a web application that will allow the agent
to enter the following information into a form:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>1) The agents DID</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>2) The platform the agent wishes to terminate a
test call through (either 1,2,3 above)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>3) The number the agent wishes to terminate to
</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>My thought is this form will generate a .call file
in /var/spool/asterisk/outgoing that will then ring the agents station,
pause, and terminate to the selected DID using the selected platform.
I also thought about interacting directly with the AGI.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>I can successfully generate the .call files, and
ring a station on the Asterisk server - the problem is the agents are not on
the Asterisk server.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>Is there a way to use Asterisk to initiate these
test calls?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>Is it possible to create a forwarding context to
handle this?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>Any thoughts?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>Thanks for the help!</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006>Cheers,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=391494214-17022006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><I><SPAN lang=en-us><FONT face=Arial size=2>--
-- --</FONT> </SPAN></I><BR><I><SPAN lang=en-us><FONT face=Arial
size=2> Christopher T. Aloi</FONT></SPAN></I> <BR><I><SPAN
lang=en-us><FONT face=Arial size=2> USA Datanet - Technical Support
Engineer</FONT></SPAN></I> <BR><I><SPAN lang=en-us><FONT face=Arial
size=2> 318 South Clinton Street</FONT></SPAN></I> <BR><I><SPAN
lang=en-us><FONT face=Arial size=2> Syracuse, NY
13202</FONT></SPAN></I> <BR><I><SPAN lang=en-us><FONT face=Arial
size=2> C: (315) 569 4033</FONT></SPAN></I> <BR><I><SPAN
lang=en-us><FONT face=Arial size=2> O: (315) 579 7074</FONT></SPAN></I>
<BR><I><SPAN lang=en-us><FONT face=Arial size=2> E:
</FONT></SPAN></I><A href="mailto:caloi@usadatanet.com"><I><SPAN
lang=en-us><U><FONT face=Arial color=#0000ff
size=2>caloi@usadatanet.com</FONT></U></SPAN></I></A><I><SPAN
lang=en-us></SPAN></I> <BR><I><SPAN lang=en-us><FONT face=Arial size=2>-- --
--</FONT></SPAN></I><SPAN lang=en-us>
</SPAN></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>