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, 网页回拨源码相关推荐

  1. 详解linux下auto工具制作Makefile源码包(制作篇)

    2019独角兽企业重金招聘Python工程师标准>>> 详解linux下auto工具制作Makefile源码包(制作篇) 水木杨 一.     概述 为了更好的制作configure ...

  2. 获取含跨域网址的框架网页的源码

    前面介绍过的获取框架网页的源码的方法在针对框架中每个文档的URL都是和主网页在同一个域名(同一个网站)的情况下是不会出什么问题的,但如果框架包含的网页是别的域的话,例如以下网页:该网页含左右两个框架, ...

  3. webbrowser抓取php网页源码,获取webbrowser控件 网页的源码(收藏)

    获取webbrowser控件 网页的源码(收藏) 翻译|其它|编辑:郝浩|2005-04-28 09:45:00.000|阅读 3152 次 概述: 我在网上找到使用rft控件保存webbrowse文 ...

  4. (转)Linux设备驱动之HID驱动 源码分析

    //Linux设备驱动之HID驱动 源码分析 http://blog.chinaunix.net/uid-20543183-id-1930836.html HID是Human Interface De ...

  5. linux epoll 开发指南-【ffrpc源码解析】

    linux epoll 开发指南-[ffrpc源码解析] 摘要 关于epoll的问题很早就像写文章讲讲自己的看法,但是由于ffrpc一直没有完工,所以也就拖下来了.Epoll主要在服务器编程中使用,本 ...

  6. linux下 如何调试php,linux下使用gdb对php源码调试

    title: linux下使用gdb对php源码调试 date: 2018-02-11 17:59:08 tags: --- linux下使用gdb进行php调试 调试了一些php的漏洞,记录一下大概 ...

  7. Linux内存管理 brk(),mmap()系统调用源码分析2:brk()的内存释放流程

    Linux brk(),mmap()系统调用源码分析 brk()的内存释放流程 荣涛 2021年4月30日 内核版本:linux-5.10.13 注释版代码:https://github.com/Rt ...

  8. Linux Zero-copy零拷贝技术:源码示例

    <Linux Zero-copy零拷贝技术:源码示例> <Linux Zero-copy零拷贝技术全面揭秘> <什么是mmap?零拷贝?DMA?> <Linu ...

  9. HTML5期末大作业:漫画网站设计——海贼王我当定了(6页) web前端期末大作业 html+css+javascript网页设计实例 企业网站制作 计算机毕设网页设计源码

    HTML5期末大作业:漫画网站设计--海贼王我当定了(6页) web前端期末大作业 html+css+javascript网页设计实例 企业网站制作 计算机毕设网页设计源码 常见网页设计作业题材有 个 ...

最新文章

  1. 用python打造一款文件搜索工具,所有功能自己定义!
  2. Data Structure_Sort Algorithm
  3. mysql 插入加锁_MySQL 是怎么死锁的?
  4. Matconvnet安装:win7+VS2015(pro)+Matlab 2017a+cuda8.0+cudnn 5.1
  5. WEB前端学习笔记01利用纯CSS书写二级水平导航菜单
  6. 距离矢量路由算法_简单聊聊路由协议
  7. HandlerThread
  8. 在一头扎进机器学习前应该知道的那些事儿
  9. 安卓如何调出软键盘_智能汽车到底如何交互?小鹏用全场景语音给出了答案
  10. 《Visual Studio.NET Tips and Tricks》第一章的翻译
  11. JavaScript遭嫌弃,“反JS”主义者兴起
  12. css补充、JavaScript、Dom
  13. 请教问题:ckeditor脚本错误“Error:例外被抛出且未被接住”[已解决]
  14. ElasticSearch教程——倒排索引及其数据结构以及优缺点
  15. Git commit message规范
  16. 个人搭建独立博客,哪个程序比较好用
  17. DataTable 列转行
  18. 原生APP和封装APP区别详解
  19. 000 我和网安的故事.doc
  20. 海贼王热血航线服务器维护,航海王热血航线维护中是怎么回事 无法登录解决方法...

热门文章

  1. FTP客户端设计与实现
  2. SpringCloud个人小总结
  3. 什么是开源网络情报(OSINT)及其使用方式
  4. 关于软件研发生产力的误区与思考
  5. realtek是什么意思_realtek bluetooth是什么意思
  6. FIFO页面置换算法详解
  7. 安卓下的c语言ide,C语言编译器IDEapp-C语言编译器IDE安卓版下载v2.4.0-飞飞世界
  8. android 中获取所有有效网卡和对应的IP地址
  9. Vue 中echarts的数据参数使用、X轴Y轴
  10. Python之建模数值逼近篇–最小二乘拟合