[asterisk-users] bridge 2 calls

Dovid Bender asteriskusers at dovid.net
Wed Jan 14 17:44:34 CST 2009


I use post variables. I found this on the web. Forgot where I got it from 
(sorry that I can't give you credit).

<?php
//Connect to the Asterisk Manager
$socket = fsockopen("127.0.0.1","5038", $errno, $errstr);
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: username\r\n");
fputs($socket, "Secret: password\r\n");
fputs($socket, "Events: off\r\n\r\n");
fputs($socket, "\r\n\r\n");
fputs($socket, "Action: Originate\r\n");
fputs($socket, "Channel: SIP/".$_POST['first_call']."@my_peer\r\n");
fputs($socket, "Context: mycontext\r\n");
fputs($socket, "Exten: ".$_POST['local_exten']."\r\n");
fputs($socket, "Priority: 1\r\n");
fputs($socket, "Callerid: 5551212\r\n");
fputs($socket, "Timeout: 100000\r\n");
fputs($socket, "Variable: FOO=".$my_var."\r\n");
fputs($socket, "\r\n\r\n");
fputs($socket, "\r\n");
fputs($socket, "Action: Logoff\r\n\r\n");
fclose($socket);
?>

----- Original Message ----- 
From: "Nick Wolf" <newx22 at gmail.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
<asterisk-users at lists.digium.com>
Sent: Tuesday, January 06, 2009 12:18 PM
Subject: Re: [asterisk-users] bridge 2 calls


>I am also interested in establishing a three way conversation using a
> simple webpage.
> I wonder if anyone can provide some help on that.
>
> On Tue, Jan 6, 2009 at 7:29 AM, amit mehta <amit.magnate at gmail.com> wrote:
>> Hi Rilawich,
>>
>> I worked recently on it and that is why can give you the idea how i 
>> achived it.
>>
>> You can write an PHP script to get the number and name of the
>> customer.You can phpself to the script.Then you can use an API script
>> to use that number to orignate the call.The channel will be used to
>> call the asterisk internal agent and the other line will call the
>> number that was input by the customer and bridge the call.
>>
>> Hope this might help you.
>>
>> Regards,
>> Amit Mehta
>> Cell: +91 9898340962
>>
>> On Tue, Jan 6, 2009 at 11:41 AM, Rilawich Ango <maillisting at gmail.com> 
>> wrote:
>>> Hi all,
>>>
>>>  I want to build a web page for user to input a phone number.  Then,
>>> the number will input to asterisk and it will makes call.  At that
>>> moment, asterisk will make another call to a internal ext.  Finally
>>> asterisk will bridge 2 calls together for conversion.
>>>
>>> Does asterisk can do it?  How?
>>>
>>> Thanks, Ango
>>>
>>> _______________________________________________
>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>>
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>>
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
> 





More information about the asterisk-users mailing list