Custom ringtones
using ALERT_INFO
This is a little script that will you let personalize
ringwave on a Snom phone and every phone that supports ALERT_INFO
field ( i.e. Cisco phones ).
You must place this script before the DIAL or QUEUE statement and
it will choose the best ringwave for the type of call specified.
It bases is search on a mysql table that contains a prefix for the callerid,
a prefix for the called extension and the filename of the ringtone.
when a call comes in this script matches the callerid and the called extension
with the database. Keep in mind that it gives precedence basing on the maximum
length of the best matching pattern but caller pattern has a 10x multiplier so
it is 10 time more important the caller than the called extension.
Let us see some examples:
the table contains
cid_from |
cid_to |
ringwave |
external.wav |
8 |
internal.wav |
0 |
805 |
myexternal.wav |
8 |
805 |
myinternal.wav |
supposed that the local dialplan states that 8XX are local
number everyone will have "external.wav" as ringtone for external
calls and "internal.wav" BUT the 805 extension will have "myexternal.wav"
for external calls and "myinternal.wav" for internal calls.
you can be more and more precise adding more prefix for calls local to
you city, your country and so on.
the ringwaves must reside on a web server so that phones can download
them as they need them.
here is the script:
exten=>s-sound,1,MYSQL(Connectconnidmyhostnameloginpassworddatabasename)
exten=>s-sound,2,MySQL(Queryresultid${connid}SELECT/ringwave/,CASEWHENISNULL(cid_from)/then/0/ELSE/LENGTH(cid_from)*10/END+CASE/WHEN/ISNULL(cid_to)/then/0/ELSE/LENGTH(cid_to)/END/from/ringer/where/(cid_from/is/NULL/OR/LEFT(/"${CALLERIDNUM}/"/,LENGTH(cid_from))=cid_from)/AND/(cid_to/is/NULL/OR/LEFT(/"${ARG1}/"/,LENGTH(cid_to))=cid_to)/order/by/2/desc)
exten=>s-sound,3,Noop(result1${resultid})
exten=>s-sound,4,GotoIf($[empty${resultid}=empty]?30:5)
exten=>s-sound,5,MYSQL(Fetchfoundrow${resultid}selectedringwave)
exten=>s-sound,6,Noop(foundrow${foundrow})
exten=>s-sound,7,GotoIf($["${foundrow}"="1"]?100:30)
exten=>s-sound,30,SetVar(ALERT_INFO=${DEFAULT_SOUND))
exten=>s-sound,31,Goto(s-sound,110)
exten=>s-sound,100,SetVar(ALERT_INFO=http://webserver/${selectedtingwave))
exten=>s-sound,101,Goto(s-sound,110)
exten=>s-sound,110,MYSQL(Clear${resultid})
exten=>s-sound,111,MYSQL(Disconnect${connid})
exten=>s-sound,112,Goto(gotoDIALstatement)
Here is the MySQL table needed:
CREATETABLEringer(
cid_fromchar(20)defaultNULL,
cid_tochar(20)defaultNULL,
ringwavechar(20)defaultNULL
);
have a nice ring.
Eugenio
See also
分享到:
相关推荐
nokia n900 ringtones
Classic Old Phone Ringtones 1.4详细信息 您是否正在寻找一些经典的旧手机铃声?你是否厌倦了新时代的铃声和想要的东西,老而经典的?你可以停止寻找!你已经找到了!经典手机铃声的应用程序完美的选择为您服务!...
软件名称:在线铃声壁纸:Zedge Ringtones & Wallpapers APK名称:net.zedge.android 最新版本:4.6.0 支持ROM:2.3及更高版本 界面语言:英文软件 软件大小:5.58 M 开发者:Zedge
Google-Pixel-6-Ringtones.apk
Ringtones波点音乐-《Lightning Moment》.mp3
NOTE: This project has not been released due to some issues with playing custom ringtones dynamically. Until a work around is found, this app will not be released to the public. This will allow you to...
sasosa123456789olkjhuytered
【iPhone铃声制作教程】 制作个性化的iPhone铃声可以让你的手机更加个性化,而这个过程并不复杂,只需要几个简单的步骤。下面将详细讲解如何使用iTunes制作和同步iPhone铃声。 1. **打开iTunes与设置** ...
【标题】"ringtones:尝试不必要的事情"指的是一个项目或者资源包,它可能是一个关于创建或修改手机铃声的教程、工具集或是资源库。在这个项目中,“尝试不必要的事情”可能暗示着开发者或创作者在探索创新的方式,...
《Ringtones Download - Free Mp3 Tones-crx插件详解》 在信息化时代,个性化已经成为了一种生活态度,尤其体现在手机铃声的选择上。"Ringtones Download - Free Mp3 Tones"是一款专为追求个性化铃声的用户设计的...
Kgf Ringtones Download mp3 for mobile-crx插件应运而生,为KGF电影的粉丝们提供了一个便捷的平台,让他们可以轻松下载和设置喜爱的电影主题曲作为自己的手机铃声。 KGF(KGF: Chapter 1)是一部印度动作剧情片,...
语言:English 我们在这里提供的所有类型的铃声集合,例如kgf,iPhone,mahakal和乐器铃声。 获取最佳的手机mp3铃声。 我们在这里提供的llf铃声集合的所有类型,例如kgf,iPhone,mahakal和乐器铃声。...
$ cordova plugin add cordova-plugin-native-ringtones 或安装特定版本: $ cordova plugin add cordova-plugin-native-ringtones@VERSION 或安装最新的head版本: $ cordova plugin add ...
应用 一个新的Flutter项目。 入门 该项目是Flutter应用程序的起点。 如果这是您的第一个Flutter项目,那么有一些资源可以帮助您入门: 要获得Flutter入门方面的帮助,请查看我们的,其中提供了教程,示例,有关移动...
语言:English 最佳铃声网-手机铃声下载免费MP3 附加信息如前所述,“铃声下载工具”是我们允许用户轻松访问铃声,铃音和铃声的一种方法。 通常,使用这种工具会带来一些不利影响或风险。 我们在这里告诉您–事实并非...
语言:English 为您提供超过10,000多种流行免费铃声的集合。 RingtonesCloud是一个扩展,允许用户下载最佳的免费手机铃声。 您可以为Android和iOS手机下载最高质量的不同类型的铃声。 最新的铃声会不断更新,以跟上...
语言:English 移动的铃声 - 列表铃声666 lite。 新的铃声2021下载高质量的mp3。 铃声用于移动 - 列表铃声666 Lite由c.o.o ashikur jaman - 新铃声下载高质量的mp3 下载手机免费MP3音乐铃声。 兼容iPhone和Android。...
语言:English (United States) 铃声下载–免费最佳铃声下载为iPhone,Android,诺基亚,呼叫,信息,闹钟 为iPhone,Android,Nokia,Call,Msg,HQ质量为320kbps mp3 m4r的闹钟免费下载最佳铃声。...
下载Myxer免费铃声应用程序。我们为Android&还提供了5个免费铃声应用程序 iPhone尤其是免费的Zedge铃声。 下载Myxer免费铃声应用程序。 我们还提供了5个免费铃声应用程序,适用于Android和iPhone,尤其是Zedge ...
从/System/Library/Audio/UISounds和/Library/Ringtones及其子文件夹中列出iOS设备上所有预安装的系统声音。 允许用户: 单击以播放列出的声音。 从左向右滑动以将声音添加为书签,以供快速参考。 重新排序或...