login | register
Sat 17 of May, 2008 [07:08 UTC]

voip-info.org

Search with Google
Search this site with Google. Results may not include recent changes.
 
Google Ads
Shoutbox
  • Juan Ortega, Thu 15 of May, 2008 [10:33 UTC]: Hi everybody, I'm Juan, an ITCom student, and I need to know what basic elements I need to create a VoIP network. Can anybody helpme, please?,Thank you very much
  • gineta, Wed 14 of May, 2008 [03:58 UTC]: any here not fine the configuration of firewall juniper -screem for VOIP asterisk????
  • Anoop Prabhakaran, Tue 13 of May, 2008 [12:16 UTC]: I am developing Asterisk IVR, Whenever i make a internation call to the IVR system, the DTMF is not getting detected properly, this happens only for the first time, second call onwards system works fine. why this is happening
  • joe, Mon 12 of May, 2008 [04:27 UTC]: Is there an opensource browser based softphone, or a system like Busta where everything is not manages through their website?
  • Nick Barnes, Fri 09 of May, 2008 [11:36 UTC]: Christopher - yesterday I tried an Asterisk install on a CentOS 5.1 box with stock GUI and it all worked fine. Sorry I can't help.
  • aero, Fri 09 of May, 2008 [08:20 UTC]: can someone help me out on this, i tried to play some sound files on my asterisk box and this is the error message i got. WARNING[4429]: format_wav.c:169 check_header: Unexpected freqency 22050 May 8 11:17:39 WARNING[4433]: codec_gsm.c:194 gsmtolin_fra
  • Christopher Faust, Thu 08 of May, 2008 [14:15 UTC]: I beleive that I may have to change something in the xserver configuration. Please advise
  • Christopher Faust, Thu 08 of May, 2008 [14:14 UTC]: Everything was perfect. In the bios I have increased the memory allocated Still receive input not supported on my display.
  • Christopher Faust, Thu 08 of May, 2008 [14:13 UTC]: This would not be my main box. I am doing some testing to see if I can install zaptel and asterisk 1.4 on a full centos 5.1 box with development software Its bizzare, because before I went through the asterisk and zaptel installation everything was perfe
  • Nick Barnes, Thu 08 of May, 2008 [13:44 UTC]: Christopher - I can't see any way in which an Asterisk installation would muck your GUI, but remember that it is advised not to use a GUI on an Asterisk box anyway.
Server Stats
  • Execution time: 0.38s
  • Memory usage: 2.19MB
  • Database queries: 33
  • GZIP: Disabled
  • Server load: 0.84

MySQL custom ringtones

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_fromcid_toringwave
external.wav
8
internal.wav
0805myexternal.wav
8805myinternal.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(Connect connid myhostname login password databasename)
 exten => s-sound,2,MySQL(Query resultid ${connid} SELECT\ ringwave\,CASE WHEN ISNULL(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(Fetch foundrow ${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  ( goto DIAL statement )

Here is the MySQL table needed:

 CREATE TABLE ringer (
    cid_from char(20)  default NULL,
    cid_to char(20)  default NULL,
    ringwave char(20) default NULL
 ) ;

have a nice ring.
Eugenio

See also


Created by edevena, Last modification by JustRumours on Tue 09 of Aug, 2005 [15:48 UTC]

Comments Filter

this doesn't work on sip POS3-07-5-00

by tc0nn on Sunday 18 of December, 2005 [20:01:31 UTC]
<pre>I tried several variations of the basic set/setvar(ALERT_INFO=...) and nothing seems to work.
Can somebody verify this does in fact work on Cisco 7960 SIP vPOS3-7-5-00 ?

I have:
extensions.conf:
exten=>s,1,set(ALERT_INFO=hohoho.raw)
;also tried these
exten=>s,1,set(ALERT_INFO=http
//www.timsnet.com/hohoho.raw)

;exten=>s,1,setvar(ALERT_INFO=hohoho.raw)
exten=>s,2,dial(SIP/6010)


Nothing but generic ring on this end.
</pre>

Please update this page with new information, just login and click on the "Edit" or "Add Comment" button above. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

Sponsored by:

Terms of Service Privacy Policy
© 2003-2008 VOIP-Info.org LLC

Powered by bitweaver