我应该如何开发用于记录 VoIP 电话呼叫的系统?
我刚刚签订了一份合同,为网吧开发一种计费应用程序,以监控其 VoIP 电话上的呼叫。这是应用程序应该如何工作的主要想法。
假设我向某人借了一部#2 电话,他向不同的地方拨打了 10 个电话,通话费率可能不同,例如拨打不同的国家/地区。他把手机还给我后,我需要根据他拨打的所有电话的资费,看看他总共需要支付多少钱。
问题是,我从未使用过 VoIP,因此我无法估计开发这样的系统有多困难。 从我的角度来看,一个有问题的部分是以某种方式获取有关所有拨打电话的数据。一旦我知道每个电话的传入/传出号码、长度和其他信息,就应该是以正确的格式处理和显示数据相对简单。
我想,为了开发这样的应用程序,我必须设置 VoIP 网关(Asterisk?)才能测试该应用程序。
我担心的一件事是某种隐藏的问题,例如,如果我要为所有调用创建某种代理,可能会有非常高的性能要求等。
什么类型的问题可以我希望在开发这样的系统时出现? 如果可能的话,我更喜欢任何与 Java 相关的解决方案或建议。
I've just got a contract to develop a kind of billing application for internet cafe to monitor calls on their VoIP phones. Here's the main idea how the app should work.
Say that I borrow someone a phone #2, and he makes 10 calls to different places, with possibly different call rates, e.g. calling to different country. After he gives me the phone back, I need to see how much money does he need to pay in total, based on all the rates of all the calls he made.
The problem is, that I've never worked with VoIP, so I'm unable to estimate how difficult it would be to develop a system like that. From my point of view, the one problematic part is somehow getting to the data about all the calls that were made. Once I know incoming/outgoing number, length and other stuff for each call, it should be relatively simple to process and display the data in correct format.
I guess that for developing such an application, I'm going to have to set up VoIP gateway (Asterisk?) to just be able to test the application.
One thing I'm afraid of are some kind of hidden problems, like for example if I was to create some kind of proxy for all the calls, there would be probably very high performance requirements, etc.
What kind of problems can I expect to come up while developing such a system? I'd prefer any Java related solutions or suggestions if possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在寻找的称为 CDR,即呼叫数据记录。
每个 VoIP 系统都有自己的记录存储方式。许多系统可以将它们发布到网络服务器(您自己的服务器)。
您还应该知道,还有许多开源计费系统已经准备好使用带星号的集成。
What you are looking for is called CDRs, Call Data Records.
Each voip system has their own way of storing the records. Many systems can post them to a webserver (your own server).
You should also know that there are many open source billing systems too which has ready to use integrations whith asterisk.
我完全同意jgauffin的观点。
但是,如果您找不到符合您规范的现有实现,您可以使用 asterisk-java 编写自己的实现图书馆。
I totally agree with jgauffin.
But if you cannot find an already existed implementation that match your specifications, you can write your own using the asterisk-java library.