Connecting to Squillo using SIP

Squillo.it - see http://www.squillo.it - is an Italian VoIP company offering geographical termination in SIP. To connect your Asterisk box to Squillo, you should edit the following files: – sip.conf –

[global]
....
canreinvite=no
register => **USER**:**PASS**@sip.squillo.it

[squillo]
type=friend
username=**USER**
fromuser=**USER**
secret=**PASS**
host=sip.squillo.it
context=from-squillo
insecure=very
disallow=all
allow=ilbc
allow=gsm
allow=ulaw
allow=alaw
dtmfmode=rfc2833
This way you register to Squillo as if your * box was a simple telephone. Incoming calls are routed to the context from-squillo. – extensions.conf –
[default]
exten => _0.,1,Dial(SIP/${EXTEN:1}@squillo,30,tr)

[from-squillo]
exten => s,1,Dial(SIP/501,30,tr)
This example shows how to place and receive calls from Squillo (in this example, all incoming calls are routed to the single telephone SIP/501). Continue Reading...



User stats

This page will keep a number of user stats available. Last 10 logged on users: NO-PLUGIN:(userlist sort=’last’ order=’desc’ max=’10’) Top users hall of fame: NO-PLUGIN:(userlist sort=’logins’ order=’desc’ max=’10’) More will be added soon…. Continue Reading...



Quick and Dirty Asterisk sound recorder

This script is a quick-and-dirty Asterisk sound recorder to be used to record sound files. It records a sound file, plays it back and stores it as /var/lib/asterisk/sounds/mymessage.gsm.

[ast-recorder]
; quick-and-dirtyu sound recorder
exten => s,1,Answer
exten => s,2,Playback(registratore-invito)
exten => s,3,Playback(beep)
exten => s,4,Record(mymessage:gsm)
exten => s,5,Playback(beep)
exten => s,6,Playback(mymessage)
exten => s,7,Background(registratore-post)
exten => s,8,Wait(10)
exten => s,9,Hangup
exten => 2,1,Goto(s,4)
You have to provide a couple of voice messages: Continue Reading...



Asterisk dialplanner

If you are having problems manually typing in your dialplan commands, you can use the Asterisk dialplanner! With an easy point-and-click interface, the Asterisk dialplanner is a web-based tool to assist your dialplan creation. You can create new contexts and extensions, then select the appropriate command from a convenient list. Then, simply type in that command’s arguments. The dialplanner tool will automatically assign the proper priorities so you’ll never have to remember the correct priority to use. You’ll also get to see the dialplan in a nested tree structure, providing a visual view of how your dialplan looks. Once you’ve finished, with a click of a button you can export your dialplan into the standard extensions.conf format. Simply type in your email address, and your new creation will be emailed to you in a flash! Go ahead and give it a go! The Asterisk Dialplanner is a Java applet and requires a modern Java runtime. Continue Reading...



Checking library dependencies

This not is not - strictly speaking - an Asterisk issue; but I present it here as it sometimes pops up with Asterisk installations, after compiling shared libraries (for example, OH323). A typpical example is in fact an error like the one here below:

 [chan_oh323.so]May  2 15:41:29 WARNING[-1218537120]: loader.c:242 ast_load_resource: liboh323wrap.so: cannot open shared object file: No such file or directory
May  2 15:41:29 WARNING[-1218537120]: loader.c:423 load_modules: Loading module chan_oh323.so failed!
Here Asterisk is complaining that even if the module chan_oh323 does exit and is being loaded, it cannot be completely loaded because of some missing shared libraries. What is a shared library? A shared library is a piece of compiled code that can be shared by more than one program on your system. This way, utility libraries need not be embedded in each and every executable that is on your disk. The cons are that if you copy a program and it does not find the exact libraries it needs in the designated system folders, it will simply refuse to run. How do I find which shared libraries are required by a module? The command ldd is your friend. It will report something like: NO-PLUGIN:(CODE marker=”3,4” :] root@vm lib# ldd /usr/lib/asterisk/modules/chan_oh323.so liboh323wrap.so => /lib/liboh323wrap.so (0x00bf2000) libh323_linux_x86_r.so.1.13.5 => not found libpt_linux_x86_r.so.1.6.6 => not found libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x008fc000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0x009ff000) libdl.so.2 => /lib/libdl.so.2 (0x00add000) libc.so.6 => /lib/tls/libc.so.6 (0x00111000) libm.so.6 => /lib/tls/libm.so.6 (0x0025c000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0034b000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00b98000) [:CODE) As you can see, some modules are missing and cannot be loaded. How do I add the correct shared libraries? If you compiled the packes yourself, chances are that the shared libraries you are looking for are present on your system, but in the wrong locations. To understand if that is the case, simply run the locate command, like here below:
[root@vm lib]# locate libh323_linux_x86_r.so.1.13.5
/root/asterisk/openh323/lib/libh323_linux_x86_r.so.1.13.5
It is important that them files have the exact (long) names referenced by the module. In this case you simply copy your library to /lib and run ldd again to see if it can be loaded. Repeat as needed. Continue Reading...



Misc links

How to blacklist unwanted callerid

First add extension to allow blacklisting from the phone. You may renumber *96 to whatever you want to not conflict with other extensions on your system.

[app-system-blacklist]
; *96 <xxxxxxxxxx> 1 - black list phone number <xxxxxxxxxx> to level <y>
; *96 <xxxxxxxxxx>   - Delete system speed dial <xxxxxxxxxx>

exten => _*96XXXXXXXXXX.,1,Answer
exten => _*96XXXXXXXXXX.,2,DBput(blacklist/${EXTEN:3:10}=${EXTEN:13})
exten => _*96XXXXXXXXXX.,3,Wait(1)
exten => _*96XXXXXXXXXX.,4,AGI(festival-script.pl|phone number)
exten => _*96XXXXXXXXXX.,5,SayDigits(${EXTEN:3:10})
exten => _*96XXXXXXXXXX.,6,AGI(festival-script.pl|has been blacklisted at level)
exten => _*96XXXXXXXXXX.,7,SayDigits(${EXTEN:13})
exten => _*96XXXXXXXXXX.,8,Hangup

exten => _*96XXXXXXXXXX,1,Answer
exten => _*96XXXXXXXXXX,2,DBdel(blacklist/${EXTEN:3:10})
exten => _*96XXXXXXXXXX,3,Wait(1)
exten => _*96XXXXXXXXXX,4,AGI(festival-script.pl|blacklisted phone number)
exten => _*96XXXXXXXXXX,5,SayDigits(digits/${EXTEN:3:10})
exten => _*96XXXXXXXXXX,6,AGI(festival-script.pl|has been cleared)
exten => _*96XXXXXXXXXX,7,Hangup
then add these lines and number accordingly before the answer command to your incoming extension
exten => s,?,Zapateller(answer|nocallerid)
exten => s,?,PrivacyManager
exten => s,?,LookupBlacklist
exten => s,?,LookupCIDName
regular part of the incoming extension and then
exten => s,102,Macro(blacklisted1)
exten => s,103,Macro(blacklisted1)
exten => s,105,Macro(blacklisted1)
exten => s,107,Macro(blacklisted1)
then you need to add the blacklisted1 macro
[macro-blacklisted1]
exten => s,1,Answer
exten => s,2,Wait(1)
;exten => s,3,Zapateller(answer|nocallerid)
exten => s,3,Playback(sit)
exten => s,4,Playback(ss-noservice)
exten => s,5,Hangup 
get the sit sound file from http://sourceforge.net/tracker/download.php?group_id=123387&atid=696352&file_id=130850&aid=1182658 and put that in your sound folder then reload asterisk to get the new configuration now pickup a phone and key in *96 then the 10 digit number of your cell phone then a 1 to black list your cell phone then call your system and see if you get the sit sound and then the ss-noservice sound and then hangup if it works you are done then pickup your phone and key in *96 and the 10 digit number you want to remove from the blacklist. Continue Reading...



Licences

All texts written on AstRecipes are under a Creative Commons licence, as seen on the left navigation bar, that basically says: You are free: Continue Reading...