<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sébastien Wains &#187; VoIP</title>
	<atom:link href="http://www.wains.be/index.php/category/voip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wains.be</link>
	<description>Linux, Open Source, VoIP and other stuff</description>
	<lastBuildDate>Tue, 07 Sep 2010 21:25:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Asterisk Wake Up call application</title>
		<link>http://www.wains.be/index.php/2010/02/02/asterisk-wake-up-call-application/</link>
		<comments>http://www.wains.be/index.php/2010/02/02/asterisk-wake-up-call-application/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 21:00:54 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=977</guid>
		<description><![CDATA[If you want to be awaken by your Asterisk PBX, here&#8217;s a simple bit of code to add in your dial plan. Basically, you would call 9253 followed by the time the phone should ring, for exemple if you want to be awaken at 06:30am you would call 92530630 (on your dialpad WAKE0610). This code [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to be awaken by your Asterisk PBX, here&#8217;s a simple bit of code to add in your dial plan.</p>
<p>Basically, you would call 9253 followed by the time the phone should ring, for exemple if you want to be awaken at 06:30am you would call 92530630 (on your dialpad WAKE0610).</p>
<p>This code only allows to set ONE alarm.</p>
<p>If you want to delete -for exemple the 0630am- alarm, you would call 6692530610 (on dialpad NOWAKE0610).</p>
<p>Asterisk will create a call file and put it under /var/spool/asterisk/outgoing/<br />
How does Asterisk know when to call you ? It will check the timestamp of the call files.</p>
<p>Make sure you enable func_strings.so module, it is required for STRFTIME.</p>
<pre><code>[Context-This-Code-Should-Go-In]

; WAKE + hour + minute : sets a wake up call
exten =&gt; _9253XXXX,1,Answer()
exten =&gt; _9253XXXX,n,Set(wakeuptime=${EXTEN:4:4})
exten =&gt; _9253XXXX,n,Set(today=${STRFTIME(${EPOCH},,%Y%m%d)})
exten =&gt; _9253XXXX,n,Set(tomorrow=${STRFTIME($[${EPOCH} + 86400],,%Y%m%d)})
exten =&gt; _9253XXXX,n,Set(now=${STRFTIME(${EPOCH},,%Y%m%d%H%M)})
exten =&gt; _9253XXXX,n,System(echo -e "Channel: SIP/${CALLERID(num)}\\nContext: WakeUp\\nExtension: 92531" &gt; /tmp/${UNIQUEID}.call)
exten =&gt; _9253XXXX,n,GotoIf($["${today}${wakeuptime}" &lt; "${now}"]?tomorrow:today)
exten =&gt; _9253XXXX,n(today),NoOp(Scheduling wake up call for ${CALLERID(num)} today at ${wakeuptime} / )
exten =&gt; _9253XXXX,n,System(touch -t ${today}${wakeuptime} /tmp/${UNIQUEID}.call)
exten =&gt; _9253XXXX,n,Goto(move)
exten =&gt; _9253XXXX,n(tomorrow),NoOp(Scheduling wake up call for ${CALLERID(num)} tomorrow at ${wakeuptime} / )
exten =&gt; _9253XXXX,n,System(touch -t ${tomorrow}${wakeuptime} /tmp/${UNIQUEID}.call)
exten =&gt; _9253XXXX,n(move),System(mv /tmp/${UNIQUEID}.call /var/spool/asterisk/outgoing/${wakeuptime}.${UNIQUEID}.call)
exten =&gt; _9253XXXX,n,Wait(1)
exten =&gt; _9253XXXX,n,SayNumber(${wakeuptime})
exten =&gt; _9253XXXX,n,Hangup()

; NOWAKE + hour + minute : deletes a wake up call
exten =&gt; _669253XXXX,1,Answer()
exten =&gt; _669253XXXX,n,Set(wakeuptime=${EXTEN:6:4})
exten =&gt; _669253XXXX,n,NoOp(Deleting alarm set at ${wakeuptime})
exten =&gt; _669253XXXX,n,System(rm -f /var/spool/asterisk/outgoing/${wakeuptime}*)
exten =&gt; _669253XXXX,n,Wait(1)
exten =&gt; _669253XXXX,n,Background(auth-thankyou)
exten =&gt; _669253XXXX,n,Hangup()

[WakeUp]
;;; Context for outgoing wake up calls only, well you can always call 92531 but it's rather pointless
exten =&gt; 92531,1,Answer()
exten =&gt; 92531,n,Wait(1)
exten =&gt; 92531,n,Background(hello-world)
exten =&gt; 92531,n,Wait(1)
exten =&gt; 92531,n,Hangup()</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/02/02/asterisk-wake-up-call-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Asterisk : XMPP notifications for missed calls</title>
		<link>http://www.wains.be/index.php/2010/01/20/asterisk-xmpp-notifications-for-missed-calls/</link>
		<comments>http://www.wains.be/index.php/2010/01/20/asterisk-xmpp-notifications-for-missed-calls/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 16:57:38 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=884</guid>
		<description><![CDATA[Tester under Asterisk 1.4.21. If someone calls and hangs up before leaving a voicemail (that means while the phone is ringing or during voicemail message), Asterisk will send a &#8220;missed call&#8221; notification by XMPP/Jabber. /etc/asterisk/jabber.conf : This file contains the info for Asterisk to connect to the Jabber server. When restarting Asterisk, it will connect [...]]]></description>
			<content:encoded><![CDATA[<p>Tester under Asterisk 1.4.21.</p>
<p>If someone calls and hangs up before leaving a voicemail (that means while the phone is ringing or during voicemail message), Asterisk will send a &#8220;missed call&#8221; notification by XMPP/Jabber.</p>
<p><strong>/etc/asterisk/jabber.conf :</strong></p>
<p>This file contains the info for Asterisk to connect to the Jabber server.<br />
When restarting Asterisk, it will connect automatically and add contacts specified under buddy fields to its contact list.<br />
You can specify several accounts in this file, and use different accounts for different notifications, for example.<br />
From Asterisk CLI, there&#8217;s a command &#8220;jabber test&#8221; which would display the status of your contacts, this command only works with the account specified in the [asterisk] context.</p>
<pre><code>[general]
debug=no
autoprune=no ; this is important to set this to no, if set to yes and you don't specify any "buddy=" it will delete contacts from your buddy list
autoregister=yes        

[asterisk] ; must be called "asterisk" if we want the command "jabber test" to work
type=client
serverhost=jabber.example.org
username=pbx@example.org/pbx
secret=PASSWORD
port=5222
usetls=yes
usesasl=yes
buddy=youraccountreceivingnotifications@gmail.com
buddy=anotheraccountthatmayreceivenotifications@gmail.com
statusmessage=Asterisk XMPP bot. Don't talk to me, your messages would be lost forever.
timeout=100

[account2]
type=client
serverhost=jabber.example.org
username=anotheraccount@example.org/pbx
secret=PASSWORD
port=5222
usetls=yes
usesasl=yes
buddy=someoneelse@gmail.com
statusmessage=Asterisk XMPP bot. Don't talk to me, your messages would be lost forever.
timeout=100</code></pre>
<p><strong>/etc/asterisk/extensions.conf :</strong></p>
<p>When you pass the option &#8220;g&#8221; to the Dial() command, when the user hangs up, Asterisk exits the Dial() command and continue by jumping to the special &#8220;h&#8221; extension in the current context. From the console you should expect something like &#8220;Spawn extension (macro-DialVM, h, 5) exited&#8221; when the whole thing has been processed.</p>
<p>If you don&#8217;t specify the option, Asterisk will exit at the Dial() command. You would then see &#8220;Spawn extension (macro-DialVM, s, 1) exited&#8221; right after the user hangs up.</p>
<p>In this bit of dialplan, we enable XMPP notifications for calls made on extension 555 in the context named Local.<br />
Dialing is made through a macro called macro-DialVM.<br />
XMPP notifications are sent through macro-XMPPSend.</p>
<pre><code>[macro-XMPPSend]
;;; Description : sends XMPP messages only if user is online and not away
;;; ARG1 = Jabber ID to be notified
;;; ARG2 = Message
;;; Jabberstatus and Jabbersend take the account name to user to send notifications as first argument ([asterisk] or [account2] under jabber.conf)

; getting user's status
; Status can be in order : 1)Online, 2)Chatty, 3)Away, 4)XAway, 5)DND, 6)Offline, 7)Not in roster
exten =&gt; s,1,Jabberstatus(asterisk,${ARG1},STATUS)
; If the value of STATUS is anything under 3 (or Away), in other words if user is Online or in Chatty mode
exten =&gt; s,n,GotoIf($["${STATUS}" &lt; "3"]?available:unavailable)
; then we send a message
exten =&gt; s,n(available),NoOp(${ARG1} is available)
exten =&gt; s,n,Jabbersend(asterisk,${ARG1},${ARG2})
exten =&gt; s,n,MacroExit()
; if the user is not available, we don't send anything
exten =&gt; s,n(unavailable),NoOp(${ARG1} is not available in at least one location.. Do not send notification)
exten =&gt; s,n,MacroExit()

[macro-DialVM]
;;; Description : dials (option g enabled, jumps to h extension) and goes to voicemail if reaching timeout.
;;; ARG1 = extension to be dialed
;;; ARG2 = timeout
;;; XMPP notification if call missed

exten =&gt; s,1,Dial(SIP/${ARG1},${ARG2},wg)
exten =&gt; s,n,Voicemail(${ARG1})

; option g must be passed to Dial() to jump to h extension or it would spawn at "macro-DialVM,s,1"
; if user doesn't leave a voicemail, VMSTATUS = FAILED
; if user hangs up before reaching the voicemail app, DIALSTATUS = CANCEL
exten =&gt; h,1,NoOp(Did user hang up before leaving a voicemail ?)
exten =&gt; h,n,GotoIf($["${VMSTATUS}" = "FAILED"]?missed:nextcheck)
exten =&gt; h,n(nextcheck),GotoIf($["${DIALSTATUS}" = "CANCEL"]?missed:notmissed)
exten =&gt; h,n(missed),Macro(XMPPSend,youraccountreceivingnotifications@gmail.com,${CALLERID(all)} just tried to call ${ARG1})
exten =&gt; h,n(notmissed),Hangup()

[Local]
;;; Description : Local calls context

; My extension is 555, with a timeout of 30 seconds
exten =&gt; 555,1,Macro(DialVM,${EXTEN},30)</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2010/01/20/asterisk-xmpp-notifications-for-missed-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nokia E71</title>
		<link>http://www.wains.be/index.php/2009/02/23/nokia-e71/</link>
		<comments>http://www.wains.be/index.php/2009/02/23/nokia-e71/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 00:22:25 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=595</guid>
		<description><![CDATA[I got myself a new cell phone, the Nokia E71. In the process I&#8217;m putting my old but faithful Sony Ericsson T610 to retirement. In order of importance, here are the reasons why I went with that particular phone : 1. Built-in GPS My wife landed a new job so she had to give her [...]]]></description>
			<content:encoded><![CDATA[<p>I got myself a new cell phone, the Nokia E71. In the process I&#8217;m putting my old but faithful Sony Ericsson T610 to retirement.</p>
<p>In order of importance, here are the reasons why I went with that particular phone :</p>
<p><strong>1. Built-in GPS</strong></p>
<p>My wife landed a new job so she had to give her GPS back to her old company.<br />
I went with Sygic McGuider Europe 2009. So far, I&#8217;m pleased with it, it&#8217;s very customizable and compares to Tomtom and is better than Mio GPS, but I guess anything is better than Mio <img src='http://www.wains.be/wp-content/plugins/tango/face-smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>Yesterday, as I fired up McGuider, it locked my GPS position immediately ! This is maybe Google Maps had been busy updating my location a few moments before ? Usually it&#8217;ll take from 30 seconds to 1 minute to pick up the GPS signal.</p>
<p><a href="http://navigation.teleatlas.com/en/shop/hotitem/sygic-mcguider-europe-2009-sd-card-pr6648.html">http://navigation.teleatlas.com/en/shop/hotitem/sygic-mcguider-europe-2009-sd-card-pr6648.html</a></p>
<p><strong>2. VoIP SIP</strong></p>
<p>VoIP will work over WiFi or the data network of your carrier (GPRS or 3G), as long as they don&#8217;t block SIP.</p>
<p>I run a small Asterisk PBX at home with friends and family connected to it.<br />
I also use a SIP provider (poivy.com) allowing me to call 35 countries for free (including US cell phones).<br />
Basically, I can call friends and family and 35 countries for free from my cell, as long as I have network coverage.<br />
Secondly, I now send SMS through the PBX for 6 cents instead of 12 cents through the carrier.<br />
Plus, Poivy will let me display any confirmed (cell or landline) phone number to the people I call.</p>
<p>For those wondering, I&#8217;m on BASE data network, which is EDGE and not 3G (yet). They don&#8217;t block SIP but&#8230; read on.</p>
<p>For some reason the Nokia SIP client is not able to register on my PBX. Well, I see the phone registered on the PBX (it somehow reports huge latencies between 500-2000 ms) but the phone acts like it&#8217;s not registered, so I can&#8217;t place calls.<br />
Instead, I have to use Fring, which acts as a proxy. I haven&#8217;t sniffed the traffic from the phone to Fring servers yet but I guess they obfuscated SIP/RTP traffic to allow VoIP on carriers blocking SIP. To be confirmed.<br />
Fring SIP client works okay but latencies can be annoying. This is still fine when calling relatives. For important calls, I&#8217;d try finding a wifi hotspot around, or using the GSM network as a last resort (this is the point of a cell phone in the first place right ? <img src='http://www.wains.be/wp-content/plugins/tango/face-smile.png' alt=':)' class='wp-smiley' />  ).</p>
<p>When I&#8217;m back home, my phone will automatically register to my PBX over WiFi (this time using the Nokia client). When someone calls my PBX, I can pick up my cell and be on WiFi instead of GPRS.</p>
<p><a href="http://www.fring.com">http://www.fring.com</a><br />
<a href="http://www.poivy.com">http://www.poivy.com</a></p>
<p><strong>3. SSH client</strong></p>
<p>Don&#8217;t expect to only use your cell to manage your servers.. but this is definitely nice to be able to connect to your boxes from anywhere.</p>
<p><a href="http://s2putty.sourceforge.net">http://s2putty.sourceforge.net</a></p>
<p><strong>4. Full keyboard</strong></p>
<p>I don&#8217;t like touchscreen keyboards, and I can&#8217;t imagine exchanging IM&#8217;s typing on a regular phone keypad. I can be very good at typing on a computer keyboard, but I totally suck on a cell phone.</p>
<p><strong>5. WiFi</strong></p>
<p>I&#8217;ll always try to see if there&#8217;s a WiFi network available before using the GPRS connection, unless for mails and sensitive stuff.</p>
<p><strong>6. Modem</strong></p>
<p><del datetime="2009-03-13T15:18:18+00:00">I haven&#8217;t tried the feature yet. </del><br />
I can surf the internet from anywhere by connecting my Macbook to the phone using Bluetooth or USB, and using the GPRS connection.</p>
<p>I&#8217;ve set up my Macbook to use the phone as modem, using Bluetooth. It works perfectly. I didn&#8217;t have to use some hacked script to get it working, since my carrier only does GPRS, so it just worked out of the box.</p>
<p><strong>7. VPN</strong></p>
<p>A bit of a disappointment here, I just wish the phone would be able to connect to OpenSSL/OpenVPN vpns..<br />
It only does IPsec and there&#8217;s no OpenVPN port under Symbian in the horizon.<br />
Someday I need to set up an IPsec VPN on my home server.. Ugh.</p>
<p><strong>Custom applications</strong></p>
<p>- Gmail client<br />
- Fring : MSN, AIM, Jabber, SIP and more. I prefer Nimbuzz (better interface) but I use Fring because it&#8217;s the only client that works decently with SIP.<br />
- Opera Mini : since the web browser that comes with the phone is not perfect<br />
- Qik : share live video from your phone on the internet<br />
- WorldMate : every morning, get the weather forecast<br />
- JaikuSpot : turn your cellphone into a wireless access point<br />
- Google Maps + Latitude : it works very well and will do a better job finding restaurants (thanks to reviews and budget info) or stuff like that, compared to a regular GPS. Latitude will tell you where your friends are.<br />
- Sports Tracker : Nokia Beta Labs app. Nokia Sports Tracker is a GPS-based activity tracker that runs on compatible Nokia mobile devices. Information such as speed, distance, and time are automatically stored in your training diary. <a href="http://sportstracker.nokia.com">http://sportstracker.nokia.com</a><br />
- Location Tagger : another Nokia Beta Labs app. With Nokia Location Tagger, you can automatically tag your location data to your pictures. As you take a picture, your GPS coordinates are saved to the EXIF header of the JPEG file. You can use this data later, for example, to locate your pictures on a map. <a href="http://betalabs.nokia.com/betas/view/location-tagger">http://betalabs.nokia.com/betas/view/location-tagger</a></p>
<p><strong>Other neat stuff</strong></p>
<p>- You can encrypt the memory of your phone. I did so on the phone memory but not on the 2GB SD card.<br />
- The phone has an IMAP/POP client. I set it to check my mails every 15 minutes between 7am and 2am.<br />
- You can sync your phone with Google Contacts. Very handy since I use Google Contacts as my main address book (make backups before playing with Google Sync !).</p>
<p><strong>Problems</strong></p>
<p>- I used to save phone numbers in international format (+32&#8230;). The Nokia SIP client will not accept calls on that kind of number. I had to convert my whole address book back to the national format and to 001&#8230; for US numbers.<br />
- If you store two or more contacts with the same number, when that number calls you the phone will only display the number but no name. My T610 used to display the first name it found, alphabetically.<br />
- I&#8217;m sure battery life can be very good, but don&#8217;t expect it to be huge if, like me, you keep the phone connected to GPRS/3G and let stuff running in background constantly (Fring and Google Maps + Latitude for me).<br />
- Don&#8217;t run both Nimbuzz and Fring at the same time, SIP was not working under Fring while Nimbuzz was running.<br />
- When on SIP (be it Nokia SIP client or Fring) the volume is not very high.</p>
<p><strong>What I&#8217;ll buy soon</strong></p>
<p><del datetime="2009-03-13T15:21:56+00:00">- Brodit Proclip cradle for my car</del> Way too expensive<br />
- Charger/Holder on eBay<br />
<del datetime="2009-03-13T00:20:31+00:00">- 4GB SD card</del> </p>
<p><strong>Edit : After a few weeks of use&#8230;</strong></p>
<p>This is what I use the phone for on pretty much a daily basis (in order of importance) :<br />
- <strong>Calling</strong> : but mainly over <strong>SIP</strong>, which makes me save a <strong>LOT</strong> of money<br />
- <strong>GPS</strong> : I use the GPS application (<strong>Sygic McGuider</strong>) almost daily.. even for short rides, I don&#8217;t need to remind when to turn right, the GPS just let me know <img src='http://www.wains.be/wp-content/plugins/tango/face-smile.png' alt=':-)' class='wp-smiley' /><br />
- <strong>Finding businesses</strong> : I&#8217;m often on the road, and use <strong>Google Maps</strong> to find restaurants, gas station or stores<br />
- <strong>IM</strong> : using <strong>Fring</strong><br />
- <strong>Email</strong> : I gave up with the Gmail client and use the <strong>built-in IMAP client</strong>. The Gmail client is very limited and won&#8217;t grab email addresses.. from your phone addressbook OR Gmail addressbook (shame !). Also, with the built-in IMAP client, you can just select a picture and click option > send > email. You can&#8217;t do that with the Gmail app.<br />
- <strong>Managing contacts</strong> : you can sync your Google addressbook with your phone using the SyncML protocol. See http://www.google.com/support/mobile/bin/answer.py?answer=98230&#038;topic=15015<br />
My Google addressbook is now my only addressbook.. syncing takes 5 seconds. Awesome ! (caution : iSync under Mac OS X tends to mess up with your addressbook.. It&#8217;s losing half of your contacts info)<br />
- <strong>Calendar</strong> : I use Google Calendar. I use <strong>CalSync</strong> for&#8230;. syncing with my phone and get nice notifications on my homescreen<br />
- <strong>Internet Radio</strong> : using <strong>Mobbler</strong>, I can listen to Last.fm radios, but also scrobble my tunes played with the built-in radio player<br />
- <strong>SSH</strong> : I don&#8217;t use it for day-to-day sysadmin but it&#8217;s handy when you need to check something quick (<strong>Putty</strong>)<br />
- <strong>Photo</strong> : the quality is not great but decent enough if I need to snap something quick, plus I can tag the picture with GPS coordinates using <strong>Location Tagger</strong>.<br />
- <strong>Publishing photos online</strong> : I use Picasa Web for publishing pictures online.. you can upload your pictures from your phone by sending them to an email address you specify in Picasa Web settings. Specify the album name in the subject field of your email, if you don&#8217;t set a subject, pictures will go in a &#8220;Dropbox&#8221; album.<br />
- <strong>Live video</strong> : from time to time I stream some video live on the web using <strong>Qik</strong><br />
- <strong>Sport assistant</strong> : I don&#8217;t use it right now, but plan on doing so in the future <img src='http://www.wains.be/wp-content/plugins/tango/face-smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>Annoyances :<br />
I&#8217;m off from 2 Nokia updates for my phone so maybe it&#8217;s fixed in the latest firmware updates.<br />
- Can&#8217;t call international numbers (+32&#8230;) using SIP client. This is a major issue, if someone calls me and I miss the call, I&#8217;ll see the number +32, which I can&#8217;t call back. I need to go in the addressbook and call from there.<br />
- When I&#8217;m on a call, the phone just displays &#8220;call 1&#8243;. Not the phone number, not how long I&#8217;ve been on the call. I used to have a sound playing every minutes on my old T610, and the call duration. This would be nice and welcomed here.<br />
- Given my particular PBX set up, I may get an incoming call coming on both SIP client and Fring SIP client. This tends to render the phone a bit unstable. It once crashed too. Please Fring, let me disable SIP without deleting the config !<br />
- Yesterday, I fired up Sygic, looking for a gas-station. Sygic takes around 10-15 seconds to load. Meanwhile I received a call. The call got disconnected when Sygic started.<br />
- Fring issue : when I receive a SIP call on Fring, I need to unlock my phone first ! It goes without saying that I missed every calls so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2009/02/23/nokia-e71/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Unlocking the &#8220;Belgacom Wireless/VoIP/ADSL&#8221; Router aka Philips SNV6520/18</title>
		<link>http://www.wains.be/index.php/2009/01/17/unlocking-the-belgacom-wirelessvoipadsl-router-aka-philips-snv652018/</link>
		<comments>http://www.wains.be/index.php/2009/01/17/unlocking-the-belgacom-wirelessvoipadsl-router-aka-philips-snv652018/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 23:58:04 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=542</guid>
		<description><![CDATA[THE BORING PART : For the impatients out there, just skip to &#8220;Mandatory warnings&#8221;. A while back, Belgacom, the major ISP in Belgium used to sell the router mentionned above along with their &#8220;triple-play&#8221; offer. My dad just got a DSL connection and I got him that model on eBay. Not that I wanted that [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://img181.imageshack.us/img181/303/picture3fl6.png" alt="Belgacom Philips SNV6520/18" /></p>
<p><strong>THE BORING PART :</strong></p>
<p>For the impatients out there, just skip to &#8220;Mandatory warnings&#8221;.</p>
<p>A while back, Belgacom, the major ISP in Belgium used to sell the router mentionned above along with their &#8220;triple-play&#8221; offer.</p>
<p>My dad just got a DSL connection and I got him that model on eBay. Not that I wanted that particular model or anything, I needed a wireless DSL router quick and for a reasonable price.</p>
<p>I figured I could set up VoIP so my dad could call me on my Asterisk SIP PBX at home using his brand new DSL connection, using an actual phone (the unit comes with two FXS ports which you can plug two analog phones in).</p>
<p>The thing is.. Belgacom locked the router with a proprietary firmware which restricts VoIP to their SIP servers only.<br />
(if you specify sip.example.org as server, it will actually try to register on voip.belgacom.be)</p>
<p>This howto explains how to unlock the unit and not only get unlocked VoIP but also new features (like embedded DynDNS client) .</p>
<p><strong>MANDATORY WARNINGS :</strong></p>
<p><strong>You must understand that the following will void your warranty.<br />
If you install the unlocked firmware, you&#8217;ll not be able to come back to Belgacom firmware.<br />
I don&#8217;t have Belgacom TV, so I can&#8217;t tell if the new firmware works with it.<br />
If the upgrade fails for some reason, you&#8217;ll probably end up with a paperweight, a quite original one I must say.<br />
In case of power outage during the upgrade, the unit will probably get bricked.<br />
DO NOT HOLD ME ACCOUNTABLE FOR ANY BRICKED ROUTER. I&#8217;M NOT PUTTING A GUN ON YOUR FOREHEAD TELLING YOU TO UPGRADE YOUR ROUTER. WHAT YOU ARE DOING, YOU&#8217;RE DOING IT AT YOUR OWN RISK. IF YOU ARE NOT COMFORTABLE WITH THE PROCESS, JUST DON&#8217;T DO IT.</strong></p>
<p><strong>THE HOWTO : </strong></p>
<p><strong>1. Download</strong></p>
<p>Grab the following file : <a href="http://www.wains.be/pub/SNV6520unlocking.zip">http://www.wains.be/pub/SNV6520unlocking.zip</a></p>
<p><code>Important : The package above comes with firmware 2.09.<br />
Here's the link to the latest firmware (version 2.15) which fixes known wireless issues (which my dad had) : <a href="http://www.wains.be/pub/SNV6520-FW2_15.zip">http://www.wains.be/pub/SNV6520-FW2_15.zip</a>.<br />
I've upgraded from v2.09 to v2.15 without issue.<br />
It has been reported in the comments that jumping directly to 2.15 was causing problems.<br />
I recommend you upgrade to 2.09 and then to 2.15 to avoid troubles, so just proceed with 2.09 and then repeat the steps from step 5 for version 2.15.</code></p>
<p><strong>2. Unzip the file</strong></p>
<p>Untip SNV6520unlocking.zip, it contains two files :<br />
- the boot loader : iad-boot_v0.69d.0<br />
- the firmware : FW_7908VoWBRA_v2.09.bin</p>
<p>Just make sure you write down all your settings before starting, as the unit will be reset to factory settings.</p>
<p><strong>3. Enable the &#8220;recovery&#8221; mode of your unit</strong></p>
<p>Read and make sure your understand before proceeding :</p>
<p><code>1. Turn off the unit<br />
2. Press the reset button located on the back while turning the unit on<br />
3. Keep the button pressed for 2 seconds after power on<br />
4. Release and then immediately press the reset button 3 times again (short press are fine)<br />
5. WLAN and DSL LEDs should blink, this means the router is in recovery mode.</code></p>
<p><strong>4. Upgrade the boot loader</strong></p>
<p>Make sure your computer has an IP in the 192.168.2.0/24 range.<br />
Go to http://192.168.2.1<br />
Upgrade target : select boot loader<br />
Select iad-boot_v0.69d.0 and upgrade</p>
<p>When done, click on reboot then reset<br />
It should take a minute or so.</p>
<p><strong>5. Upgrade the firmware</strong></p>
<p>When done, go back to http://192.168.2.1, you should see that you&#8217;re now running v0.69 (upper right corner of the screen)</p>
<p>Upgrade target : select runtime code<br />
Select FW_7908VoWBRA_v2.09.bin (or SMC7908VoWBRA-FW2_15.bin) and upgrade</p>
<p>When done, click on reboot then reset.</p>
<p>You should be done now, your unit should be running the SMC firmware after reboot.</p>
<p><strong>6. Enjoy</strong></p>
<p>Go to http://192.168.2.1<br />
Password is &#8220;smcadmin&#8221;</p>
<p>You can now enjoy unlocked VoIP settings, dynamic DNS and probably other niceties.</p>
<p><strong>CONCLUSION : </strong></p>
<p>My dad now enjoys his internet connection wirelessly, and also calls me and belgian landlines for free through my home PBX <img src='http://www.wains.be/wp-content/plugins/tango/face-smile-big.png' alt=':D' class='wp-smiley' /> </p>
<p><strong>In the comments, it is reported that Belgacom TV works after upgrade, but NOT AS NICELY AS BEFORE THE UPGRADE. You&#8217;ve been warned <img src='http://www.wains.be/wp-content/plugins/tango/face-smile.png' alt=':-)' class='wp-smiley' /> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2009/01/17/unlocking-the-belgacom-wirelessvoipadsl-router-aka-philips-snv652018/feed/</wfw:commentRss>
		<slash:comments>85</slash:comments>
		</item>
		<item>
		<title>ztdummy for Debian Lenny</title>
		<link>http://www.wains.be/index.php/2008/12/03/ztdummy-for-debian-lenny/</link>
		<comments>http://www.wains.be/index.php/2008/12/03/ztdummy-for-debian-lenny/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 21:09:06 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[Debian/Ubuntu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=524</guid>
		<description><![CDATA[I just compiled zaptel-modules for Debian Lenny (Kernel 2.6.26 i386) That package contains the ztdummy module. Here&#8217;s a link to the package : http://www.wains.be/pub/zaptel-modules-2.6.26-1-686_1.4.11~dfsg-2+2.6.26-10_i386.deb]]></description>
			<content:encoded><![CDATA[<p>I just compiled zaptel-modules for Debian Lenny (Kernel 2.6.26 i386)<br />
That package contains the ztdummy module.</p>
<p>Here&#8217;s a link to the package :<br />
<a href="http://www.wains.be/pub/zaptel-modules-2.6.26-1-686_1.4.11~dfsg-2+2.6.26-10_i386.deb">http://www.wains.be/pub/zaptel-modules-2.6.26-1-686_1.4.11~dfsg-2+2.6.26-10_i386.deb</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2008/12/03/ztdummy-for-debian-lenny/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Slimming Asterisk for the NSLU2 under Debian</title>
		<link>http://www.wains.be/index.php/2008/04/15/slimming-asterisk-for-the-nslu2-under-debian/</link>
		<comments>http://www.wains.be/index.php/2008/04/15/slimming-asterisk-for-the-nslu2-under-debian/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 20:28:40 +0000</pubDate>
		<dc:creator>Sébastien Wains</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[NSLU2]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.wains.be/?p=349</guid>
		<description><![CDATA[A FULLY WORKING ASTERISK SIP PBX RUNNING WITH ONLY 6 MODULES LOADED ! READ ON&#8230; This howto is based on Asterisk 1.2 under Debian Etch. Please let me know through the comments if it works for you under other versions (and if it doesn&#8217;t, please provide the steps to get a working system). Thanks. My [...]]]></description>
			<content:encoded><![CDATA[<p><strong>A FULLY WORKING ASTERISK SIP PBX RUNNING WITH ONLY 6 MODULES LOADED ! READ ON&#8230;</strong></p>
<p>This howto is based on Asterisk 1.2 under Debian Etch. Please let me know through the comments if it works for you under other versions (and if it doesn&#8217;t, please provide the steps to get a working system). Thanks.</p>
<p><strong>My needs :</strong></p>
<p>I had to slim Asterisk down to the most minimalistic configuration possible to run on my Linksys NSLU2 (ARM cpu @ 266 Mhz, RAM 32 MB).</p>
<p>- SIP calls between my IP phones and softphone<br />
- Incoming/Outgoing calls through a SIP ITSP (ipness.com)<br />
- Echo test to make sure audio is going through in some situation<br />
- I only use the alaw codec, compatible with my IP phones and ITSP, you should avoid transcoding. My DSL connection offers dynamic IP only and gives around 3400 Kbps down/386 Kbps up. I could use the GSM codec, but the ITSP doesn&#8217;t support it<br />
- No voicemail or other apps</p>
<p><strong>My setup :</strong></p>
<p>- The NSLU2 is behind a NAT router<br />
- Home phone on the same subnet as the NSLU2<br />
- Work phone behind NAT<br />
- Softphone used from several places</p>
<p><strong>Router configuration :</strong></p>
<p>- Forward port UDP/5060 to UDP/5070 to the NSLU2<br />
- UDP/5060 is used for SIP traffic (signalling)<br />
- UDP/5061 to UDP/5070 is used for RTP traffic (audio)</p>
<p><strong>Asterisk configuration files :</strong></p>
<p>Before diving into the configuration..<br />
<strong>IMPORTANT !!!</strong><br />
If you want to comment something out in the configuration you&#8217;ll start the line with a semi-colon (&#8220;;&#8221;)<br />
# is used for file inclusions. <strong># IS NOT USED FOR COMMENTS !!!</strong></p>
<p>I moved unnecessary files under backup/</p>
<p><code>root@nslu2:/etc/asterisk# ls -l<br />
total 40<br />
-rw-r--r-- 1 root root  247 2008-04-13 22:03 asterisk.conf<br />
drwxr-xr-x 2 root root 4096 2008-04-13 22:03 backup<br />
-rw-r--r-- 1 root root  141 2008-04-13 22:10 extensions.conf<br />
-rw-r--r-- 1 root root 1660 2008-04-13 23:34 features.conf<br />
-rw-r--r-- 1 root root 2158 2008-04-13 22:03 logger.conf<br />
-rw-r--r-- 1 root root  438 2008-04-13 23:37 modules.conf<br />
-rw-r--r-- 1 root root  395 2008-04-13 22:03 rtp.conf<br />
-rw-r--r-- 1 root root  299 2008-04-13 22:04 sip.conf<br />
-rw-r--r-- 1 root root  904 2008-04-13 23:40 custom_extensions.conf<br />
-rw-r--r-- 1 root root 1349 2008-04-14 09:31 custom_sip.conf</code></p>
<p><strong>/etc/asterisk/extensions.conf :</strong></p>
<pre><code>[general]

static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no

; let's include custom_extensions.conf into extensions.conf
#include "/etc/asterisk/custom_extensions.conf"</code></pre>
<p><strong>/etc/asterisk/features.conf :</strong> default configuration</p>
<p><strong>/etc/asterisk/logger.conf :</strong> default configuration</p>
<p><strong>/etc/asterisk/modules.conf :</strong></p>
<p>Order in which modules are loaded can be important. E.g. : res_features.so must be loaded before chan_sip.so</p>
<pre><code>[modules]
autoload=no             ; only load explicitely declared modules

load =&gt; app_echo.so     ; echo application
load =&gt; codec_alaw.so   ; alaw codec for voice
load =&gt; pbx_config.so   ; reading and loading configuration
load =&gt; res_features.so ; chan_sip.so dependency
load =&gt; chan_sip.so     ; SIP protocol
load =&gt; app_dial.so     ; Dial application

[global]</code></pre>
<p><strong>/etc/asterisk/rtp.conf :</strong></p>
<p>The audio is going through these UDP ports, they must be forwarded to the server in the router.</p>
<p>In this example, the number of ports used by Asterisk is relatively low (I never have more than one call going through the PBX). Set as much as you need, a channel may need up to 2 ports. Also only even ports are actually used.</p>
<p><code>[general]<br />
rtpstart=5061<br />
rtpend=5070</code></p>
<p><strong>/etc/asterisk/sip.conf :</strong></p>
<p>Having a dynamic IP, I must use externhost with a fresh rate of 60 seconds for resolving the domain.<br />
If you have a static IP, define it in externip=</p>
<p>Localnet must be defined with your network subnet(s), localnet subnets are never passed in the &#8220;Via&#8221; parameter (can be seen in sip traces).</p>
<p>realm must be a unique ID</p>
<p>The &#8220;register =>&#8221; line is necessary in order to receive incoming calls from the ITSP.</p>
<pre><code>[general]

context=incoming
bindport=5060
bindaddr=0.0.0.0

srvlookup=yes

externhost=mydynamichostname.dyndns.org
externrefresh=60

localnet=192.168.1.0/255.255.255.0

realm=mydynamichostname.dyndns.org

register =&gt; 3221234567:password:login@ipness.net:6060/3221234567

#include "/etc/asterisk/custom_sip.conf"</code></pre>
<p><strong>/etc/asterisk/custom_extensions.conf :</strong></p>
<p>custom_extensions.conf is my customized dialplan</p>
<p>- Home phone and softphone can call local phones (1XXX range)<br />
- Home phone and softphone can call national (e.g. : 02 123 45 67) and international numbers (00 1 910 123 4567) through the ITSP<br />
- Work phone can only call local phones<br />
- Every phone can call the echo application<br />
- Incoming calls make 1001 ring first, then 1002 and finally 1000 (each with a timeout of 30 seconds)</p>
<pre><code>[globals]

;;; apps context

[apps]
exten =&gt; 444,1,Answer()
exten =&gt; 444,n,Wait(1)
exten =&gt; 444,n,Echo

;;; incoming calls context

[incoming]
exten =&gt; 3221234567,1,Dial(SIP/1001,30)
exten =&gt; 3221234567,n,Dial(SIP/1002,30)
exten =&gt; 3221234567,n,Dial(SIP/1000,30)

;;; outgoing calls context

; local calls only
[local]
include =&gt; apps

exten =&gt; _1XXX,1,Dial(SIP/${EXTEN})
exten =&gt; _1XXX,n,NoOp(===== DIAL STATUS --&gt; ${DIALSTATUS} =====)
exten =&gt; _1XXX,n,Hangup()

; national (Belgium, code 32) calls only
[national]
include =&gt; local
include =&gt; apps

exten =&gt; _0N.,1,Dial(SIP/0032${EXTEN:1}@itsp_ipness)
exten =&gt; _0N.,n,NoOp(===== DIAL STATUS --&gt; ${DIALSTATUS} =====)
exten =&gt; _0N.,n,Hangup()

; international calls
[international]
include =&gt; national
include =&gt; local
include =&gt; apps

exten =&gt; _00.,1,Dial(SIP/${EXTEN}@itsp_ipness)
exten =&gt; _00.,n,NoOp(===== DIAL STATUS --&gt; ${DIALSTATUS} =====)
exten =&gt; _00.,n,Hangup()</code></pre>
<p><strong>/etc/asterisk/custom_sip.conf :</strong></p>
<p>custom_sip.conf is my customized accounts file.</p>
<p>canreinvite must be set to no for all sip accounts (unless you have several phones on the server subnet, than you can set to yes).<br />
NAT must be set to yes for any device behind NAT routers.</p>
<pre><code>; SIP accounts

[1000]
type=friend
context=international
callerid="Softphone" &lt;1000&gt;
qualify=yes
secret=1111
nat=yes
canreinvite=no
dtmfmode=rfc2833
host=dynamic
call-limit=2
disallow=all
allow=alaw

[1001]
type=friend
context=international
callerid="Home" &lt;1001&gt;
qualify=yes
secret=1111
nat=no ; IP phone is on the same subnet as the server
canreinvite=no
dtmfmode=rfc2833
host=dynamic
call-limit=2
disallow=all
allow=alaw

[1002]
type=friend
context=local
callerid="Work" &lt;1002&gt;
qualify=yes
secret=1111
nat=yes
canreinvite=no
dtmfmode=rfc2833
host=dynamic
call-limit=2
disallow=all
allow=alaw

[1003]
type=friend
context=local
callerid="Friend" &lt;1003&gt;
qualify=no
secret=1111
nat=yes
canreinvite=no
dtmfmode=rfc2833
host=dynamic
call-limit=1
disallow=all
allow=alaw

; ITSP

[itsp_ipness]
type=peer
username=login
secret=password
fromuser=3221234567
fromdomain=ipness.net
host=ipness.net
port=6060
nat=yes
canreinvite=no
context=incoming
insecure=very
qualify=yes
disallow=all
allow=alaw</code></pre>
<p><strong>Result :</strong></p>
<pre><code>nslu2*CLI&gt; show modules
Module                         Description                              Use Count
app_echo.so                    Simple Echo Application                  0
codec_alaw.so                  A-law Coder/Decoder                      0
pbx_config.so                  Text Extension Configuration             0
res_features.so                Call Features Resource                   1
chan_sip.so                    Session Initiation Protocol (SIP)        0
app_dial.so                    Dialing Application                      0       

nslu2*CLI&gt; show applications
    -= Registered Asterisk Applications =-
       AbsoluteTimeout: Set absolute maximum time of call
                Answer: Answer a channel if ringing
            BackGround: Play a file while awaiting extension
                  Busy: Indicate the Busy condition
            Congestion: Indicate the Congestion condition
                  Dial: Place a call and connect to the current channel
          DigitTimeout: Set maximum timeout between digits
                  Echo: Echo audio read back to the user
            ExecIfTime: Conditional application execution based on the current time
                  Goto: Jump to a particular priority, extension, or context
                GotoIf: Conditional goto
            GotoIfTime: Conditional Goto based on the current time
                Hangup: Hang up the calling channel
             ImportVar: Import a variable from a channel into a new variable
                  NoOp: Do Nothing
                  Park: Park yourself
            ParkedCall: Answer a parked call
              Progress: Indicate progress
              ResetCDR: Resets the Call Data Record
       ResponseTimeout: Set maximum timeout awaiting response
             RetryDial: Place a call, retrying on failure allowing optional exit extension.
               Ringing: Indicate ringing tone
              SayAlpha: Say Alpha
             SayDigits: Say Digits
             SayNumber: Say Number
           SayPhonetic: Say Phonetic
                   Set: Set channel variable(s) or function value(s)
           SetAccount: Set the CDR Account Code
           SetAMAFlags: Set the AMA Flags
          SetGlobalVar: Set a global variable to a given value
           SetLanguage: Set the channel's preferred language
                SetVar: Set channel variable(s)
          SIPAddHeader: Add a SIP header to the outbound call
           SIPDtmfMode: Change the dtmfmode for a SIP call
          SIPGetHeader: Get a SIP header from an incoming call
                  Wait: Waits for some time
             WaitExten: Waits for an extension to be entered
    -= 37 Applications Registered =-

nslu2*CLI&gt; show functions
Installed Custom Functions:
--------------------------------------------------------------------------------
CHECKSIPDOMAIN        CHECKSIPDOMAIN(&lt;domain|IP&gt;)          Checks if domain is a local domain
SIPCHANINFO           SIPCHANINFO(item)                    Gets the specified SIP parameter from the current channel
SIPPEER               SIPPEER(&lt;peername&gt;[:item])           Gets SIP peer information
SIP_HEADER            SIP_HEADER(&lt;name&gt;)                   Gets the specified SIP header
4 custom functions installed.</code></pre>
<p>Asterisk is using around 12 MB of memory when idle.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wains.be/index.php/2008/04/15/slimming-asterisk-for-the-nslu2-under-debian/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
