Here's some advice to myself. Why don't I check out the documentation before I post. I think I'll bear that in mind in the future. Thanks me.

http://www.voip-info.org/wiki-Asterisk+auto-dial+out+deliver+message


----- Original Message ----- From: "Gary Ruddock (Swift Drinks)" <[EMAIL PROTECTED]>
To: "Asterisk Users Mailing List - Non-Commercial Discussion" <[email protected]>
Sent: Wednesday, December 29, 2004 2:47 PM
Subject: [Asterisk-Users] RINGBACK then HANGUP



I am using the manager API to sucessfully ORIGINATE a call. I am using PHP. I connect to asterisk and then connect an internal SIP phone to an external phone.

<?php
$timeout = 7500;
$login_extension = "SIP/6001"; // agent extension
$call_telephone = "97077777"; // customer's telephone
$socket = fsockopen("10.0.0.3","5038", $errno, $errstr, $timeout);
if ($socket)
{
$call_person = "Exten: " . $call_telephone . "\r\n";
$call_extension = "Channel: " . $login_extension . "\r\n";
fputs($socket, "Action: Login\r\n");
fputs($socket, "UserName: user\r\n");
fputs($socket, "Secret: password\r\n\r\n");
fputs($socket, "Action: Originate\r\n");
fputs($socket, $call_extension);
fputs($socket, "Context: local\r\n");
fputs($socket, $call_person);
fputs($socket, "Priority: 1\r\n");
fputs($socket, "Callerid: \r\n\r\n");
}
?>


The above code is used when I need to ringback a customer to tell them their driver is outside. Problem is the call centre agent initiates the call. The agent's SIP phone (SIP/6001) rings then he answers the call from asterisk, asterisk then dials the customer.

I want asterisk to dial the customer, ring twice and then hangup. This will save the agent's time and reduce our call costs. I don't want the agent to be involved. I have tried messing around with the code above but no result.

So my problem in summary is: I would like dial an external line, let it ring twice and then hangup all via PHP.

Thanks for your help.

Gary Ruddock
swiftdrinks


_______________________________________________ Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to