Statistics

Content View Hits : 22043
Asterisk Voicemail
Written by Gurito   

So, I did a fresh install from Asterisk on a server, then configured some SIP users and connected Snom phones for each one of them. Then, as I was testing, I noticed that the "Mail" button on the Snom phones dialed an extension "asterisk". So I couldn't get around dialing the general voicemail extension in order to check my mail.

Anyway, there are a few solutions to this problem. One of them is including the option "vmexten" for each user, either in sip.conf or in users.conf. The problem with this approach is that any other user can dial any existing "vmexten" value and, given that he/she knows the password for this voicemail, access the mailbox. So, in order to solve this problem a collegue told me that it was perhaps a good idea to use the "asterisk" extension.

Here is how I did it. In the file "extensions.conf" I performed the next changes:

  1. ;
  2. ; *First thing is defining an ew context for the voicemail*
  3. [voicemail]
  4. exten = asterisk,1,NoOp(This extension takes us to check the voicemail)
  5. exten = asterisk,n,NoOp(Caller ID : ${CALLERID(num)})
  6. exten = asterisk,n,NoOp(Channel Type : ${CHANNEL(channeltype)})
  7. exten = asterisk,n,GotoIf($[ "${CHANNEL(channeltype)}" = "SIP" ]?asterisk-sip,1)
  8. exten = asterisk,n,GotoIf($[ "${CHANNEL(channeltype)}" = "IAX2" ]?asterisk-iax,1)
  9. exten = asterisk-sip,1,NoOp(SIP Name : ${SIPCHANINFO(peername)})
  10. exten = asterisk-sip,n,NoOp(Mailbox : ${SIPPEER(${SIPCHANINFO(peername)}|mailbox)})
  11. exten = asterisk-sip,n,Macro(voicemail-general|${SIPPEER(${SIPCHANINFO(peername)}|mailbox)})
  12. ; *Now, there's no IAXCHANINFO on asterisk 1.2 - 1.4. But it will work if you have an IAX2 client*
  13. ; *that supports entering voicemail login info. (like voix phone)*
  14. exten = asterisk-iax,1,NoOp(IAX automatic voicemail is not yet supported)
  15. exten = asterisk-iax,n,Macro(voicemail-general)
  16.  
  17.  
  18. ; *Second thing is definig a Voicemail Macro.*
  19. ; *Think of this macro as of a function which performs a login for the voicemail.*
  20. [macro-voicemail-general]
  21. ; ${ARG1} = User's mailbox
  22. ; *If the SIP 12 has the mailbox 30, then ${ARG1} = 30.*
  23. ; *But don't worry, this parameter is already given by the "asterisk" context previously defined.*
  24. ; Set the language for the voicemail message.
  25. exten = s,1,Set(CHANNEL(language)=de)
  26. exten = s,n,Answer()
  27. exten = s,n,GotoIf($[ ${ISNULL(${ARG1})} ]?s-null,1)
  28. ; *In my case I had to put this wait in order for the greeting message to play completely.*
  29. exten = s,n,Wait(1)
  30. exten = s,n,VoiceMailMain(${ARG1})
  31. exten = s,n,Hangup()
  32. ; *The extension s-null is called when ${ARG1} is empty*
  33. ; *In this case, we call VoiceMailMain withouth parameters and, if the client, say voix phone,*
  34. ; *has the voicemail login data configured, it will pass it automatically to asterisk.*
  35. ; *It may well be that you don't need the "Wait()" here*
  36. exten = s-null,1,Wait(1)
  37. exten = s-null,n,VoiceMailMain()
  38. exten = s-null,n,Hangup()
  39.  
  40.  
  41. ; *Finally, I included the "voicemail" context on the default context for my users.*
  42. [default]
  43. include = voicemail
  44. ...
  45.  


So that's it... I hope you find it useful.

Happy coding. :)

Last Updated on Tuesday, 31 March 2009 15:03
 
Sabayon 3.5 - A review
Written by Gurito   

When I first knew of Sabayon Linux (a little bit after their rename, they were called RR64 or something) I became very interested, what with it being a Gentoo based distro and all. At first I was also a little bit sceptic because they were based on Gentoo and at the same time trying to provide binary packages. Then, the artwork wasn't really my taste (yes, I like artwork, I totally go for it.) So, despite it being interesting and all, I didn't venture myself into actually installing it as my default desktop.

A few months ago they came up with Sabayon 3.5 Loop 1 and a renewed look. Let's face it, I was mainly attracted by the new looks. So I went to their site and downloaded the x86 dvd. After testing it a little on my notebook (and being positively surprised by the option "anonymous internet browsing") I decided it was not the time to install it. That and the fact that it didn't run on my other laptop (missing kernel feature) so I let it go once more...

Finally, it came the time. I installed Sabayon 3.5 Loop 3 and was happy with it. The installation went a little slow and I had to install it 4 times before actually understanding that it was normal for the update applet (etp) to hang a little while while updating sources and the available packages. Also I learned that it is not a good idea to interrupt that process --the applet seemed dead, but it wasn't. Anyway, once I got the hang of it (one word: patience), I started exprimenting a little and couldn't help going back to my old gentoo days. So I ran "emerge sync" and then "emerge -up world" just to find that it didn't work! I guess it's because the packages installed by Entropy (the Sabayon binary package manager) didn't appear on "world".... 

Last Updated on Thursday, 10 July 2008 17:02
Read more...
 
Fedora 9 - First Looks
Written by Gurito   

Yesterday, after some weeks of using Fedora 9-preview, I downloaded the final release. The first thing I did was to create a persistent liveusb --Yes! There's now persistence! officially, at least. The procedure is ridiculously simple, I just typed the following command as root:

livecd-iso-to-disk --overlay-size-mb 512 /path/to/live.iso /dev/sdb1

Now, the overlay size cannot exceed 2048 MB, so if you want to use a bigger usb stick, you'd probably want to have two partitions, so that you can use the rest of the space as a normal stick (both, from within the live system and from any other system.)

... 

Last Updated on Wednesday, 14 May 2008 15:40
Read more...
 
«StartPrev12345NextEnd»

Page 2 of 5