odannyc/sipit
Composer 安装命令:
composer require odannyc/sipit
包简介
A SIP library to send OPTION pings to publicly open SIP devices out in the wild.
README 文档
README
A SIP library to send OPTION pings to publicly open SIP devices out in the wild. SIP (Session Initiation Protocol) is a protocol used in VoIP communications allowing users to make voice and video calls.
use Sipit\SipitFactory as Sipit; $destination_ip = '192.168.1.100'; $destination_port = 5060; Sipit::ping($destination_ip, $destination_port);
Summary
Sipit is a simple pinging library for SIP devices. When you call the Sipit::ping() method it'll return an array of information including the request and response. It's good for knowing if a SIP server is alive. A good example is if you're displaying the status of a SIP server, you can use this one method to check that. If an endpoint doesn't respond, it'll return an empty array for the response section.
Installation
The best way to install this library is with Composer.
composer require odannyc/sipit
Or
{
"require": {
"odannyc/sipit": "*"
}
}
Usage
Right now Sipit only has one method, and that is to ping SIP devices, in the future I am planning to add more to it. A simple way to use Sipit is the ping method:
use sipit\SipitFactory as Sipit; Sipit::ping('192.168.1.10', 5060);
The response will look like this:
Array ( [request_full] => Array ( [OPTIONS sip] => OPTIONS sip:192.168.1.10:5060 SIP/2.0 [Via] => Via: SIP/2.0/UDP 192.168.1.121:5090;rport;branch=z9hG4bK572601 [From] => From: <sip:ping@sipit.com>;tag=10877 [To] => To: <sip:192.168.1.10:5060> [Call-ID] => Call-ID: callid:1d6a6668d796af55d63b1c712602c34b;@192.168.1.121 [CSeq] => CSeq: 20 OPTIONS [Contact] => Contact: <sip:ping@192.168.1.121:5090> [Max-Forwards] => Max-Forwards: 70 [User-Agent] => User-Agent: SIPIT [Content-Length] => Content-Length: 0 ) [response_code] => 403 [response_message] => Forbidden [response_concat] => 403 Forbidden [response_full] => Array ( [SIP/2.0 403 Forbidden] => SIP/2.0 403 Forbidden [Via] => Via: SIP/2.0/UDP 192.168.1.121:5090;received=192.168.1.121;branch=z9hG4bK572601;rport=5090 [From] => From: <sip:ping@sipit.com>;tag=10877 [To] => To: <sip:192.168.1.10:5060>;tag=aprqngfrt-qra2n33000081 [Call-ID] => Call-ID: callid:1d6a6668d796af55d63b1c712602c34b;@192.168.1.121 [CSeq] => CSeq: 20 OPTIONS ) )
odannyc/sipit 适用场景与选型建议
odannyc/sipit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 48 次下载、GitHub Stars 达 5, 最近一次更新时间为 2016 年 06 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 odannyc/sipit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 odannyc/sipit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 48
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-06-08