ASTERISK+LINUX+PHP 的WebCall, 网页回拨源码
801 响起再拨打到 1000
$strChannel = "SIP/801";
$strExten =1000;
<?
#------------------------------------------------------------------------------------------
#edit the below variable values to reflect your system/information
#------------------------------------------------------------------------------------------
#specify the name/ip address of your asterisk box
#if your are hosting this page on your asterisk box, then you can use
#127.0.0.1 as the host IP. Otherwise, you will need to edit the following
#line in manager.conf, under the Admin user section:
#permit=127.0.0.1/255.255.255.0
#change to:
#permit=127.0.0.1/255.255.255.0,xxx.xxx.xxx.xxx ;(the ip address of the server this page is running on)
$strHost = "127.0.0.1";
#specify the username you want to login with (these users are defined in /etc/asterisk/manager.conf)
#this user is the default AAH AMP user; you shouldn't need to change, if you're using AAH.
$strUser = "admin";
#specify the password for the above user
$strSecret = "amp111";
#specify the channel (extension) you want to receive the call requests with
#e.g. SIP/XXX, IAX2/XXXX, ZAP/XXXX, etc
$strChannel = "SIP/801";
#specify the context to make the outgoing call from. By default, AAH uses from-internal
#Using from-internal will make you outgoing dialing rules apply
$strContext = "from-internal";
#specify the amount of time you want to try calling the specified channel before hangin up
$strWaitTime = "30";
#specify the priority you wish to place on making this call
$strPriority = "1";
#specify the maximum amount of retries
$strMaxRetry = "2";
#--------------------------------------------------------------------------------------------
#Shouldn't need to edit anything below this point to make this script work
#--------------------------------------------------------------------------------------------
#get the phone number from the posted form
$strExten =1000;
#specify the caller id for the call
$strCallerId = "Web Call Test <$strExten>";
$oSocket = fsockopen($strHost, 5038, $errnum, $errdesc) or die("Connection to host failed");
fputs($oSocket, "Action: login\r\n");
fputs($oSocket, "Events: off\r\n");
fputs($oSocket, "Username: $strUser\r\n");
fputs($oSocket, "Secret: $strSecret\r\n\r\n");
fputs($oSocket, "Action: originate\r\n");
fputs($oSocket, "Channel: $strChannel\r\n");
fputs($oSocket, "WaitTime: $strWaitTime\r\n");
fputs($oSocket, "CallerId: $strCallerId\r\n");
fputs($oSocket, "Exten: $strExten\r\n");
fputs($oSocket, "Context: $strContext\r\n");
fputs($oSocket, "Priority: $strPriority\r\n\r\n");
fputs($oSocket, "Action: Logoff\r\n\r\n");
fclose($oSocket);
echo 'Call ...';
?>
转载于:https://www.cnblogs.com/galaxystrategy/archive/2010/08/14/1799773.html
ASTERISK+LINUX+PHP 的WebCall, 网页回拨源码相关推荐
- 详解linux下auto工具制作Makefile源码包(制作篇)
2019独角兽企业重金招聘Python工程师标准>>> 详解linux下auto工具制作Makefile源码包(制作篇) 水木杨 一. 概述 为了更好的制作configure ...
- 获取含跨域网址的框架网页的源码
前面介绍过的获取框架网页的源码的方法在针对框架中每个文档的URL都是和主网页在同一个域名(同一个网站)的情况下是不会出什么问题的,但如果框架包含的网页是别的域的话,例如以下网页:该网页含左右两个框架, ...
- webbrowser抓取php网页源码,获取webbrowser控件 网页的源码(收藏)
获取webbrowser控件 网页的源码(收藏) 翻译|其它|编辑:郝浩|2005-04-28 09:45:00.000|阅读 3152 次 概述: 我在网上找到使用rft控件保存webbrowse文 ...
- (转)Linux设备驱动之HID驱动 源码分析
//Linux设备驱动之HID驱动 源码分析 http://blog.chinaunix.net/uid-20543183-id-1930836.html HID是Human Interface De ...
- linux epoll 开发指南-【ffrpc源码解析】
linux epoll 开发指南-[ffrpc源码解析] 摘要 关于epoll的问题很早就像写文章讲讲自己的看法,但是由于ffrpc一直没有完工,所以也就拖下来了.Epoll主要在服务器编程中使用,本 ...
- linux下 如何调试php,linux下使用gdb对php源码调试
title: linux下使用gdb对php源码调试 date: 2018-02-11 17:59:08 tags: --- linux下使用gdb进行php调试 调试了一些php的漏洞,记录一下大概 ...
- Linux内存管理 brk(),mmap()系统调用源码分析2:brk()的内存释放流程
Linux brk(),mmap()系统调用源码分析 brk()的内存释放流程 荣涛 2021年4月30日 内核版本:linux-5.10.13 注释版代码:https://github.com/Rt ...
- Linux Zero-copy零拷贝技术:源码示例
<Linux Zero-copy零拷贝技术:源码示例> <Linux Zero-copy零拷贝技术全面揭秘> <什么是mmap?零拷贝?DMA?> <Linu ...
- HTML5期末大作业:漫画网站设计——海贼王我当定了(6页) web前端期末大作业 html+css+javascript网页设计实例 企业网站制作 计算机毕设网页设计源码
HTML5期末大作业:漫画网站设计--海贼王我当定了(6页) web前端期末大作业 html+css+javascript网页设计实例 企业网站制作 计算机毕设网页设计源码 常见网页设计作业题材有 个 ...
最新文章
- 用python打造一款文件搜索工具,所有功能自己定义!
- Data Structure_Sort Algorithm
- mysql 插入加锁_MySQL 是怎么死锁的?
- Matconvnet安装:win7+VS2015(pro)+Matlab 2017a+cuda8.0+cudnn 5.1
- WEB前端学习笔记01利用纯CSS书写二级水平导航菜单
- 距离矢量路由算法_简单聊聊路由协议
- HandlerThread
- 在一头扎进机器学习前应该知道的那些事儿
- 安卓如何调出软键盘_智能汽车到底如何交互?小鹏用全场景语音给出了答案
- 《Visual Studio.NET Tips and Tricks》第一章的翻译
- JavaScript遭嫌弃,“反JS”主义者兴起
- css补充、JavaScript、Dom
- 请教问题:ckeditor脚本错误“Error:例外被抛出且未被接住”[已解决]
- ElasticSearch教程——倒排索引及其数据结构以及优缺点
- Git commit message规范
- 个人搭建独立博客,哪个程序比较好用
- DataTable 列转行
- 原生APP和封装APP区别详解
- 000 我和网安的故事.doc
- 海贼王热血航线服务器维护,航海王热血航线维护中是怎么回事 无法登录解决方法...