Hey Sir!<div><br></div><div>Generally to place a call with asterisk, you want to specify the source and destination of the call, this is done with the asterisk manager interface (AGI) </div><div>(some interesting reading here:  <a href="http://www.voip-info.org/wiki/view/Asterisk+AGI+php">http://www.voip-info.org/wiki/view/Asterisk+AGI+php</a> )</div>
<div><br></div><div>Using the asterisk manager via PHP can either be done through a library,  or via raw &quot;fputs&quot; (the library will just wrap these calls to nice functions)</div><div><br></div><div>You&#39;ll have to come up with a way of setting the &quot;source&quot; of the call,  maybe a login script that stores the local user&#39;s extension number?  You can then pass the local extension to the manager as the source, and asterisk will call you first,  THEN place the outgoing leg of the call to the far side once you&#39;ve answered your side. </div>
<div><br></div><div>if you wanted to do a directory where you simply:</div><div><br></div><div>1. login (with even just a username,  though passwords would make me feel better inside)</div><div>2. are presented with a list of numbers,  (even dynamically generated ones)</div>
<div>3. click a number,</div><div>4. your phone rings</div><div>5. you answer the local leg</div><div>6. asterisk places an outgoing call to the number you clicked</div><div>7. the calls are connected</div><div><br></div>
<div>I MAY have a click-to-call style script laying around (those are somewhat the other way,  where a customer enters their phone number and clicks next,   it places a call to the local sales agents THEN calls the customer back when a live agent is able to answer the call. </div>
<div><br></div><div>Anything in particular you&#39;re stuck on?  Would you like a code sample (that works)?</div><div><br></div><div><br></div><div>-Justin</div><div><br></div><div><br><br><div class="gmail_quote">On 16 January 2013 16:53, Akash Deep Singh <span dir="ltr">&lt;<a href="mailto:akashdeepsingh@dsicanada.com" target="_blank">akashdeepsingh@dsicanada.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">How can we use asterisk to make a call from php based website. <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">For e.g. I have an asterisk based system and website or a php page showing list of people with their numbers.  So what I want to do is click the number and call goes through my asterisk system.  I could answer it using my deskphone or softphone. <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Can we use TAPI or some sort of script in php to pass the number to asterisk. <u></u><u></u></p></div></div><br>_______________________________________________<br>

Asterisk mailing list<br>
<a href="mailto:Asterisk@muug.mb.ca">Asterisk@muug.mb.ca</a><br>
<a href="http://www.muug.mb.ca/mailman/listinfo/asterisk" target="_blank">http://www.muug.mb.ca/mailman/listinfo/asterisk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br> - Justin Davidow<br>Unit #9 - 860 Westminster Ave<br>Winnipeg, MB, Canada<div>R3G1A9</div><div>Work# 204.272.2942<br>Home# 204.480.3896</div><div>MSNID: <a href="mailto:phyrexian@shaw.ca" target="_blank">phyrexian@shaw.ca</a></div>

</div>