<?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>CROESNET.EU</title>
	<atom:link href="http://croesnet.eu/feed/" rel="self" type="application/rss+xml" />
	<link>http://croesnet.eu</link>
	<description>my experimental site</description>
	<lastBuildDate>Fri, 16 Sep 2011 15:53:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Protect your Trixbox with iptables</title>
		<link>http://croesnet.eu/trixbox/protect-your-trixbox-with-iptables/</link>
		<comments>http://croesnet.eu/trixbox/protect-your-trixbox-with-iptables/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 15:52:24 +0000</pubDate>
		<dc:creator>Arnaud</dc:creator>
				<category><![CDATA[Trixbox]]></category>

		<guid isPermaLink="false">http://croesnet.eu/?p=280</guid>
		<description><![CDATA[Found a useful article on the web, to help block someone hacking into my asterisk server. http://www.pbxer.com/asterisk-security-use-iptables-to-block-nasty-hosts/ Was searching for this, after I found a lot of failed registration requests in the log-file of my PBX. While the passwords I use are strong, and were not hacked, my little Flepo PC running trixbox didn&#8217;t like [...]]]></description>
			<content:encoded><![CDATA[<p>Found a useful article on the web, to help block someone hacking into my asterisk server.</p>
<p><a href="http://www.pbxer.com/asterisk-security-use-iptables-to-block-nasty-hosts/">http://www.pbxer.com/asterisk-security-use-iptables-to-block-nasty-hosts/</a></p>
<p>Was searching for this, after I found a lot of failed registration requests in the log-file of my PBX. While the passwords I use are strong, and were not hacked, my little Flepo PC running trixbox didn&#8217;t like the workload this was causing. All fine now again. Thank you.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://croesnet.eu/trixbox/protect-your-trixbox-with-iptables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unbrick Sarotech Wizplat NAS-20 ?</title>
		<link>http://croesnet.eu/trixbox/unbrick-sarotech-wizplat-nas-20/</link>
		<comments>http://croesnet.eu/trixbox/unbrick-sarotech-wizplat-nas-20/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 08:07:12 +0000</pubDate>
		<dc:creator>Arnaud</dc:creator>
				<category><![CDATA[Trixbox]]></category>

		<guid isPermaLink="false">http://croesnet.eu/?p=274</guid>
		<description><![CDATA[Being unhappy with the limited functionality offered by this model of NAS, and knowing it is based on the Gemini chip I tried to upload an alternative firmware. Thats was a mistake &#8211; it no longer boots up. Instead, 20 seconds after power-on it sounds a very loud beep and that&#8217;s it. It seems bricked. [...]]]></description>
			<content:encoded><![CDATA[<p>Being unhappy with the limited functionality offered by this model of NAS, and knowing it is based on the Gemini chip I tried to upload an alternative firmware. Thats was a mistake &#8211; it no longer boots up. Instead, 20 seconds after power-on it sounds a very loud beep and that&#8217;s it. It seems bricked. <img src='http://croesnet.eu/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>There&#8217;s apparently no telnet server running in the bootloader, nor is there any other network traffic coming out of the box (checked with wireshark).</p>
<p>Anyone who knows how to unbrick this NAS? I found info on the web about unbricking a Giganas, using the build in TTL serial interface, but was unable to find this same interface inside ths Sarootech product.</p>

<div class="ngg-galleryoverview" id="ngg-gallery-4-274">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://croesnet.eu/trixbox/unbrick-sarotech-wizplat-nas-20/?show=slide">
			[Show as slideshow]		</a>
	</div>

	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://croesnet.eu/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=4&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-18" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/img_6368.jpg" title=" " class="shutterset_set_4" >
								<img title="img_6368" alt="img_6368" src="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/thumbs/thumbs_img_6368.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-19" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/img_6369.jpg" title=" " class="shutterset_set_4" >
								<img title="img_6369" alt="img_6369" src="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/thumbs/thumbs_img_6369.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-17" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/img_6367.jpg" title=" " class="shutterset_set_4" >
								<img title="img_6367" alt="img_6367" src="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/thumbs/thumbs_img_6367.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-16" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/img_6366.jpg" title=" " class="shutterset_set_4" >
								<img title="img_6366" alt="img_6366" src="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/thumbs/thumbs_img_6366.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-22" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/img_6370.jpg" title=" " class="shutterset_set_4" >
								<img title="img_6370" alt="img_6370" src="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/thumbs/thumbs_img_6370.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-23" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/img_6371.jpg" title=" " class="shutterset_set_4" >
								<img title="img_6371" alt="img_6371" src="http://croesnet.eu/wp-content/gallery/sarotech-wizplat20-nas/thumbs/thumbs_img_6371.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


<p>Is the conector on the second picture the serial port? What would be the pin lay-out?</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://croesnet.eu/trixbox/unbrick-sarotech-wizplat-nas-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Funplug FFP on Sarotech Wizplat NAS-20</title>
		<link>http://croesnet.eu/test/funplug-ffp-on-sarotech-wizplat-nas-20/</link>
		<comments>http://croesnet.eu/test/funplug-ffp-on-sarotech-wizplat-nas-20/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 20:58:05 +0000</pubDate>
		<dc:creator>Arnaud</dc:creator>
				<category><![CDATA[Test]]></category>

		<guid isPermaLink="false">http://croesnet.eu/?p=270</guid>
		<description><![CDATA[This weekend I received my new NAS server, a Sarotech Wizplat NAS-20. After installing my two 1TB in it to build a RAID array, I soon noticed the following: my old (bricked) Giganas configuartion, which was still on the disks, was being read, but only partially working. I had to remove the partitions from the [...]]]></description>
			<content:encoded><![CDATA[
<div class="ngg-galleryoverview" id="ngg-gallery-5-270">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://croesnet.eu/test/funplug-ffp-on-sarotech-wizplat-nas-20/?show=slide">
			[Show as slideshow]		</a>
	</div>

	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://croesnet.eu/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=5&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-20" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/wizplat-marketing/sarotech-wizplat-nas-20-nas-system.jpg" title=" " class="shutterset_set_5" >
								<img title="sarotech-wizplat-nas-20-nas-system" alt="sarotech-wizplat-nas-20-nas-system" src="http://croesnet.eu/wp-content/gallery/wizplat-marketing/thumbs/thumbs_sarotech-wizplat-nas-20-nas-system.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-21" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/wizplat-marketing/sarotech_wizplat_nas-20.jpg" title=" " class="shutterset_set_5" >
								<img title="sarotech_wizplat_nas-20" alt="sarotech_wizplat_nas-20" src="http://croesnet.eu/wp-content/gallery/wizplat-marketing/thumbs/thumbs_sarotech_wizplat_nas-20.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


<p>This weekend I received my new NAS server, a Sarotech Wizplat NAS-20. After installing my two 1TB in it to build a RAID array, I soon noticed the following:</p>
<ul>
<li> my old (bricked) Giganas configuartion, which was still on the disks, was being read, but only partially working. I had to remove the partitions from the disk in my PC, install them back in the NAS before being able to configure them in the NAS</li>
<li>The NAS is making less Noise than my Raidsonic Icy Box 4220</li>
<li>The webinterface look and feel of the Icybox and the NAS-20 s very similar</li>
<li>Out of the box the NAS-20 however has less functionality; no twonkey server, no DHCP server, no SSH-server &#8211; Of which I mostly disliked the lack of a UPnP media streaming service.</li>
</ul>
<p>But, after spending some time googling, I found a very good piece of software called <a href="http://nas-tweaks.net/40/installation-of-the-fonz-funplug-0-5-for-ch3snas-ch3mnas-dns-323-and-many-more/">Fonz Fun-Plug (or FFP)</a>.</p>
<p>Following the instruction from <a href="http://forum.nas-portal.org/showthread.php?3259-ffp-on-4220">this page</a>, I had a working ffp with mediatomb up and running in no time.</p>
<p>I&#8217;m at the moment fine-tuning the configuration, but think I will soon be able to migrate all my media over to this NAS, and use it as my primary server.</p>
<p>Next topics on the wishlist (to be able to retire my old Linksys UnSlung-2) is a LDAP server.</p>
]]></content:encoded>
			<wfw:commentRss>http://croesnet.eu/test/funplug-ffp-on-sarotech-wizplat-nas-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AVM Fritzbox 7390 on Belgium Edpnet VDSL</title>
		<link>http://croesnet.eu/test/avm-fritzbox-7390-on-belgium-edpnet-vdsl/</link>
		<comments>http://croesnet.eu/test/avm-fritzbox-7390-on-belgium-edpnet-vdsl/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 18:53:24 +0000</pubDate>
		<dc:creator>Arnaud</dc:creator>
				<category><![CDATA[Test]]></category>

		<guid isPermaLink="false">http://croesnet.eu/?p=256</guid>
		<description><![CDATA[Since last week I am now the proud owner of a German 1&#038;1 Homeserver 50.000, in fact a rebranded AVM Fritzbox 7390 in a different color. After some initial configuration challenges, my VDSL2 connection is up and running now for a little more than 1 day. I was now able to unplug some devices, because [...]]]></description>
			<content:encoded><![CDATA[<p>Since last week I am now the proud owner of a German 1&#038;1 Homeserver 50.000, in fact a rebranded AVM Fritzbox 7390 in a different color.<br />
After some initial configuration challenges, my VDSL2 connection is up and running now for a little more than 1 day.</p>
<p><img src='http://croesnet.eu/wp-content/gallery/frtizbox-7390/dsl.png' alt='dsl' class='ngg-singlepic ngg-center' /></p>
<p>I was now able to unplug some devices, because all functions were taken over by the new Fritzbox:<br />
Sagem 3464 &#8211; Only acting as bridge<br />
Firtzbox 7170 &#8211; Providing my PPPOE connectivity<br />
Cisco 837 &#8211; Acting as DHCP server, because of being able to pass options (like TFTP server info) to the clients.</p>
<p>I have the new 7390 now running with <a href="http://freetz.org/wiki/freetz.">Freetz</a> additions, to be able to use DNSMASQ and some other packages.</p>
<p>A thank you to:<br />
Philippe for providing some tips through the <a href="http://userbase.be/forum/viewtopic.php?f=83&#038;t=26071&#038;start=100">userbase.be forum</a><br />
The <a href="http://freetz.org/wiki/freetz.">Freetz</a> team for providing this brilliant piece of software</p>
]]></content:encoded>
			<wfw:commentRss>http://croesnet.eu/test/avm-fritzbox-7390-on-belgium-edpnet-vdsl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: test &#8211; open for facebook</title>
		<link>http://croesnet.eu/test/test-open-for-facebook/</link>
		<comments>http://croesnet.eu/test/test-open-for-facebook/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 16:44:31 +0000</pubDate>
		<dc:creator>Arnaud</dc:creator>
				<category><![CDATA[Test]]></category>

		<guid isPermaLink="false">http://croesnet.eu/?p=250</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://croesnet.eu/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-250">Password:<br />
<input name="post_password" id="pwbox-250" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://croesnet.eu/test/test-open-for-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>1und1 Smartdrive under Ubuntu 10.10 &#8211; Maverick</title>
		<link>http://croesnet.eu/trixbox/1und1-smartdrive-under-ubuntu-10-10-maverick/</link>
		<comments>http://croesnet.eu/trixbox/1und1-smartdrive-under-ubuntu-10-10-maverick/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 10:31:08 +0000</pubDate>
		<dc:creator>Arnaud</dc:creator>
				<category><![CDATA[Test]]></category>
		<category><![CDATA[Trixbox]]></category>

		<guid isPermaLink="false">http://croesnet.eu/?p=242</guid>
		<description><![CDATA[It has taken me some time to get the 1und1 Smartdrive to work correctly under Ubuntu 10.10 Maverick through webdav. Capturing the steps here, to remind myself and share with the community. Most of this info is created by testing, trial and error, using pieces of information found on the internet and the man pages. [...]]]></description>
			<content:encoded><![CDATA[<p>It has taken me some time to get the 1und1 Smartdrive to work correctly under Ubuntu 10.10 Maverick through webdav. Capturing the steps here, to remind myself and share with the community.<br />
Most of this info is created by testing, trial and error, using pieces of information found on the internet and the man pages.</p>
<pre>1) Install davfs2 (via synaptic or command line: <span style="color: #0000ff;">sudo apt-get install davfs2</span>)
2) Allow users to mount by setting this option through this program
   "<span style="color: #0000ff;">sudo dpkg-reconfigure davfs2</span>"
3) Create folder /media/1und1 (<span style="color: #0000ff;">sudo mkdir /media/1und1</span>)
4) Edit /etc/fstab by adding this line
   <span style="color: #0000ff;">https://sd2dav.1und1.de /media/1und1 davfs user,noauto,rw 0 0</span>
5) Edit /etc/davfs2/davfs2.conf, changing the following line:
   a) from: <span style="color: #0000ff;"># ignore_home                      # system wide config file only</span>
      to:   <span style="color: #0000ff;">ignore_home kernoops               # system wide config file only</span>
   b) from: <span style="color: #0000ff;"># if_match_bug    0</span>
      to:   <span style="color: #0000ff;">if_match_bug    1</span>
6) Edit /etc/davfs2/secrets, adding the line with credentials
   <span style="color: #0000ff;">https://sd2dav.1und1.de         kaxxxx-xxx@online.de    your-password</span>
7) Add yourself to the user-group davfs2
   (<span style="color: #0000ff;">System -&gt; Administration -&gt; Users and Groups</span>)</pre>
<p>You can now mount /media/1und1 to your 1und1 Smartdrive as user</p>
]]></content:encoded>
			<wfw:commentRss>http://croesnet.eu/trixbox/1und1-smartdrive-under-ubuntu-10-10-maverick/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bridging PPPOE with Fritzbox and Belgacom B-Box2</title>
		<link>http://croesnet.eu/trixbox/bridging-pppoe-with-fritzbox-and-belgacom-b-box2/</link>
		<comments>http://croesnet.eu/trixbox/bridging-pppoe-with-fritzbox-and-belgacom-b-box2/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 19:34:30 +0000</pubDate>
		<dc:creator>Arnaud</dc:creator>
				<category><![CDATA[Trixbox]]></category>

		<guid isPermaLink="false">http://croesnet.eu/?p=212</guid>
		<description><![CDATA[Since about two weeks I have a VDSL connection in addition to an ADSL which will be terminated next month. While I do enjoy the bandwidth increase, I quickly discovered that the router which comes with the new subscription does not offer the same functionality as I used to have. VDSL in Belgium comes by [...]]]></description>
			<content:encoded><![CDATA[<p>Since about two weeks I have a VDSL connection in addition to an ADSL which will be terminated next month. While I do enjoy the bandwidth increase, I quickly discovered that the router which comes with the new subscription does not offer the same functionality as I used to have.<br />
VDSL in Belgium comes by default with a so called B-Box2, a Sagem Webr@cer 3464 rebranded by Belgacom, running a customized Belgacom firmware.<br />
With some hidden command this router offers some basic functionality including dyndns, port-forwarding, but features like VPN are missing.</p>
<p>To overcome these limitations, I decided to start using my AVM Fritzbox 7170 router again, and just use the B-Box2 as a bridge. It proved more challenging than I expected, but I succeeded. Below the step you have to perform to make this to work.<span style="text-decoration: underline;"><strong> </strong></span></p>
<p><span style="text-decoration: underline;"><strong>Belgacom B-Box / Sagem 3464 in Bridge mode:</strong></span></p>
<p><strong> </strong></p>
<p><strong> </strong>Firstly, start with the basic steps to configure the B-Box2 for operating in bridge mode. Doing more with less is the trick here. Rather than adding special configuration, it turns out the modem is already supporting bridged PPPOE traffic straight out of the box. I just decided to strip some unnecessary configuration to avoid problem;</p>
<ol>
<li>Disable wireless</li>
<li>Disable the voip wan interface</li>
</ol>
<p>Below are some screenshots of the steps to take on a factory default box</p>

<div class="ngg-galleryoverview" id="ngg-gallery-1-212">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://croesnet.eu/trixbox/bridging-pppoe-with-fritzbox-and-belgacom-b-box2/?show=slide">
			[Show as slideshow]		</a>
	</div>

	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://croesnet.eu/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=1&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-1" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sagem-bbox2/01-fresh-start.png" title=" " class="shutterset_set_1" >
								<img title="01-fresh-start" alt="01-fresh-start" src="http://croesnet.eu/wp-content/gallery/sagem-bbox2/thumbs/thumbs_01-fresh-start.png" width="78" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-2" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sagem-bbox2/02-disable-wireless.png" title=" " class="shutterset_set_1" >
								<img title="02-disable-wireless" alt="02-disable-wireless" src="http://croesnet.eu/wp-content/gallery/sagem-bbox2/thumbs/thumbs_02-disable-wireless.png" width="78" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-3" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sagem-bbox2/03-network-interfaces.png" title=" " class="shutterset_set_1" >
								<img title="03-network-interfaces" alt="03-network-interfaces" src="http://croesnet.eu/wp-content/gallery/sagem-bbox2/thumbs/thumbs_03-network-interfaces.png" width="78" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-4" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sagem-bbox2/04-disable-voip-wan.png" title=" " class="shutterset_set_1" >
								<img title="04-disable-voip-wan" alt="04-disable-voip-wan" src="http://croesnet.eu/wp-content/gallery/sagem-bbox2/thumbs/thumbs_04-disable-voip-wan.png" width="78" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-5" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/sagem-bbox2/05-status.png" title=" " class="shutterset_set_1" >
								<img title="05-status" alt="05-status" src="http://croesnet.eu/wp-content/gallery/sagem-bbox2/thumbs/thumbs_05-status.png" width="78" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


<p><span style="text-decoration: underline;"><strong>Reconfigure the Fritzbox 7170:</strong></span></p>
<p>The re-configuration of the Fritzbox is more tricky. To be able to establish a PPPOE connection to your ISP (in my case EDPNET), it is necessary that the router is able to send PPPOE encapsulated packets out of the LAN interface, with a VLAN tag. The VLAN tagging is required for VDSL and is only possible after some configuration tweaks. By default, a fritzbox is able to use the LAN0 interface as pseudo WAN port, however this is normally without VLAN tagging. Your PPPOE requests will time out without response if they are not send with the correct VLAN tagging, in case of EDPNET (and probably Belgacom as well) VLAN ID=10.</p>
<p>I also learned that it is not possible with every firmware version. I was succesful with 29.04.70. Newer firmware versions did cause some problems.</p>
<p>To add VLAN tagging to the IP packets, the following changes need to be made to the ar7.cfg file (in /var/flash). First enable telnet (dial #96*7* from a phone connected to one of the analog or ISDN ports). Telnet into the box, and edit ar7.cfg using the build in <strong>nvi</strong> editor.</p>
<p>Change / add the following:</p>
<p>Insert the below code, in between the existing piece of code in grey:</p>
<pre>       vccs {
                VPI = 1;
                VCI = 32;
                traffic_class = atm_traffic_class_UBR;
                pcr = 0;
                scr = 0;
                priority = 0;
                dsl_encap = dslencap_pppoe;
<span style="color: #0000ff;"><strong>                vlancfg {
                            vlanencap = vlanencap_class_prio;
                            vlanid = 10;
                            vlanprio = 1;
                           }
</strong></span>               ipbridgeing = no;
               ipbridgeing_igmp = no;
               pppoeforwarding = no;
               connections = "internet", "voip";
        }</pre>
<p>Change the following parameters from no to yes:</p>
<pre>enabled = yes;
name = "internet";
dsl_encap = dslencap_inherit;
dslinterfacename = "dsl";
no_masquerading = no;
no_firewall = no;
pppoevlanauto = <strong><span style="color: #0000ff;">yes</span></strong>;
pppoevlanauto_startwithvlan = <strong><span style="color: #0000ff;">yes</span></strong>;
ppptarget = "internet";</pre>
<p>and</p>
<pre>enabled = yes;
name = "voip";
dsl_encap = dslencap_inherit;
dslinterfacename = "dsl";
no_masquerading = no;
no_firewall = no;
pppoevlanauto = <strong><span style="color: #0000ff;">yes</span></strong>;
pppoevlanauto_startwithvlan = <strong><span style="color: #0000ff;">yes</span></strong>;
ppptarget = "voip";</pre>
<p>The code pppoevlanauto and pppoevlanauto_startwithvlan appears twice in the config.<br />
Lastly, change the default VLAN ID from 7 to 10:</p>
<pre>manual_speed = no;
connect_delay_when_synced = 3s;
sync_lost_delay = 0w;
default_tcom_vlan = <strong><span style="color: #0000ff;">10</span></strong>;</pre>
<p>After this, it&#8217;s just a matter of using the GUI to configure LAN0 as WAN interface, with PPPOE. Screenshots below:</p>

<div class="ngg-galleryoverview" id="ngg-gallery-2-212">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://croesnet.eu/trixbox/bridging-pppoe-with-fritzbox-and-belgacom-b-box2/?show=slide">
			[Show as slideshow]		</a>
	</div>

	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://croesnet.eu/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=2&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-6" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/fritzbox-internet/01-expert-mode.png" title=" " class="shutterset_set_2" >
								<img title="01-expert-mode" alt="01-expert-mode" src="http://croesnet.eu/wp-content/gallery/fritzbox-internet/thumbs/thumbs_01-expert-mode.png" width="78" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-7" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://croesnet.eu/wp-content/gallery/fritzbox-internet/02-internet-interface.png" title=" " class="shutterset_set_2" >
								<img title="02-internet-interface" alt="02-internet-interface" src="http://croesnet.eu/wp-content/gallery/fritzbox-internet/thumbs/thumbs_02-internet-interface.png" width="78" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>


]]></content:encoded>
			<wfw:commentRss>http://croesnet.eu/trixbox/bridging-pppoe-with-fritzbox-and-belgacom-b-box2/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Trixbox behind Fritzbox</title>
		<link>http://croesnet.eu/trixbox/trixbox-behind-fritzbox/</link>
		<comments>http://croesnet.eu/trixbox/trixbox-behind-fritzbox/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 15:48:50 +0000</pubDate>
		<dc:creator>Arnaud</dc:creator>
				<category><![CDATA[Trixbox]]></category>

		<guid isPermaLink="false">http://croesnet.eu/?p=199</guid>
		<description><![CDATA[As of today I&#8217;ve replaced my Netgear DG835GB routers, by two identical Fritzbox models 7170. I had to do this, because the Netgear model was not supported for a migration to the &#8220;1und1 Komplettanschluss&#8221;. I already had replaced the remote end, but because of not being able to establish a VPN between a Netgear and [...]]]></description>
			<content:encoded><![CDATA[<p>As of today I&#8217;ve replaced my Netgear DG835GB routers, by two identical Fritzbox models 7170. I had to do this, because the Netgear model was not supported for a migration to the &#8220;1und1 Komplettanschluss&#8221;. I already had replaced the remote end, but because of not being able to establish a VPN between a Netgear and a Frtizbox, I now replaced the central site router as well.<br />
Given that this one has the Trixbox behind it, as expected, it brought some challenges.</p>
<p>Out of the box, Asterisk is registering with external SIP providers via UDP port 5060. Traffic received by the fritzbox using UDP port 5060 is not passed on to devices behind the Fritzbox, because being considered for the Fritzbox itself.<br />
Trying to setup port forwarding on the Fritzbox for UDP port 5060 gives the following error &#8220;FEHLER: Eintrag kollidiert mit interner Regel&#8221;.</p>
<p>Another solution found on the web suggests to change the port or bindport in sip.conf on the Asterisk server, to a different value than the default 5060. I tried this, including setting up port-forwarding on the router. My trixbox registered now correctly with the various SIP providers I&#8217;m using, but my internal extension failed to register correctly.</p>
<p>The solution turned out to be a modification in the fritzbox. I&#8217;m using software version 29.04.76.<br />
First of all, you need to make sure telnet access is enabled.</p>
<p>I made the following modifications (using nvi):</p>
<p>In file <strong>/var/flash/voip.cfg</strong> change:
<pre>"sip_srcport = 5060;"</pre>
<p> to
<pre>"sip_srcport = 5061;"</pre>
<p>In file <strong>/var/flash/ar7.cfg</strong> :
<pre>
                        forwardrules = "tcp 0.0.0.0:443 0.0.0.0:443 0",
                                       "udp 0.0.0.0:5060 0.0.0.0:5060",</pre>
<p>to
<pre>
                        forwardrules = "tcp 0.0.0.0:443 0.0.0.0:443 0",
                                       "udp 0.0.0.0:5060 192.168.1.3:5060",</pre>
<p>192.168.1.3 being the IP address of my Asterisk/Trixbox.</p>
<p><strong>Note that it is important to use the editor nvi on the fritzbox to edit the config files</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://croesnet.eu/trixbox/trixbox-behind-fritzbox/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>7941/7961 dialplan</title>
		<link>http://croesnet.eu/trixbox/79417961-dialplan/</link>
		<comments>http://croesnet.eu/trixbox/79417961-dialplan/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 21:02:54 +0000</pubDate>
		<dc:creator>Arnaud</dc:creator>
				<category><![CDATA[Trixbox]]></category>

		<guid isPermaLink="false">http://croesnet.eu/?p=191</guid>
		<description><![CDATA[After a bit of googling, I managed to find a way to reduce the annoying delay when dialing from on of the 7941 phones in my network. Where the 7960&#8242;s immediatly send the outgoing call after pushing the # key, I had a long delay on the 7941 phones. I found the solution in changing [...]]]></description>
			<content:encoded><![CDATA[<p>After a bit of googling, I managed to find a way to reduce the annoying delay when dialing from on of the 7941 phones in my network. Where the 7960&#8242;s immediatly send the outgoing call after pushing the # key, I had a long delay on the 7941 phones.<br />
I found the solution in changing the dialplan file.<br />
Using the below code did the trick. Pushing # sends the dialstring immediatly. Just waiting results in the call being placed 4 seconds after pushing the last button.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DIALTEMPLATE<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TEMPLATE</span> <span style="color: #000066;">MATCH</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000066;">TIMEOUT</span>=<span style="color: #ff0000;">&quot;4&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DIALTEMPLATE<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://croesnet.eu/trixbox/79417961-dialplan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ldap directory for Cisco 7941 / 7961 IP Phones</title>
		<link>http://croesnet.eu/trixbox/ldap-directory-for-cisco-7941-7961-ip-phones/</link>
		<comments>http://croesnet.eu/trixbox/ldap-directory-for-cisco-7941-7961-ip-phones/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 20:37:15 +0000</pubDate>
		<dc:creator>Arnaud</dc:creator>
				<category><![CDATA[Trixbox]]></category>

		<guid isPermaLink="false">http://croesnet.eu/?p=166</guid>
		<description><![CDATA[Since a few weeks I&#8217;m having a few Cisco 7941 IP Phones. Although they look pretty similar to the 7940 models, it turns out configuring them is totally different. Once provisioned and registered, I discovered that the ldap directory script I use for the 7960 phone didn&#8217;t work any longer. I finally found a solution [...]]]></description>
			<content:encoded><![CDATA[<p>Since a few weeks I&#8217;m having a few Cisco 7941 IP Phones. Although they look pretty similar to the 7940 models, it turns out configuring them is totally different.<br />
Once provisioned and registered, I discovered that the ldap directory script I use for the 7960 phone didn&#8217;t work any longer.</p>
<p>I finally found a solution for this problem today, by just using some of the code from the pre-installed Trixbox xmlservices scripts.</p>
<p>Rather than using the original directory.php script, I now use the below updated SearchDirectory.php script, and renamed it to ldapSearchDirectory.php.</p>
<p>ldapSearchDirectory.php</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">//Copyright (C) 2006 Fonality Inc. (fonality.com)</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//This program is free software; you can redistribute it and/or</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//modify it under the terms of the GNU General Public License</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//as published by the Free Software Foundation; either version 2</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//of the License, or (at your option) any later version.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//This program is distributed in the hope that it will be useful,</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//GNU General Public License for more details.</span>
&nbsp;
&nbsp;
<span style="color: #b1b100;">require</span> <span style="color: #0000ff;">'/var/www/html/xmlservices/libs/Smarty.class.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$smarty</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Smarty<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">require</span> <span style="color: #0000ff;">'/var/www/html/xmlservices/include/xmlservices_libs.php'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require</span> <span style="color: #0000ff;">'/var/www/html/xmlservices/include/xmlservices_config.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">compile_check</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// $smarty-&gt;debugging = true; </span>
&nbsp;
<span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">assign</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'PageTitle'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Search by last name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">assign</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Prompt'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Enter the first few letters'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ldapsearchDirectory_'</span><span style="color: #339933;">.</span><span style="color: #000088;">$content_format</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.tpl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>ldapsearchDirectory_ciscoxml4.tpl in the templates directory looks like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;CiscoIPPhoneInput<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>{$PageTitle}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>{$Prompt}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Prompt<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;URL<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>{$Server}/result.php<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/URL<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;InputItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DisplayName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Filter<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DisplayName<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;QueryStringParam<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>filter<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/QueryStringParam<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DefaultValue<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/DefaultValue<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;InputFlags<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>A<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/InputFlags<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/InputItem<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/CiscoIPPhoneInput<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Lastly, the result.php script has been updated a little:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #666666; font-style: italic;">// This XML-PHP page searches contacts in LDAP and display it on CISCO directory service </span>
<span style="color: #666666; font-style: italic;">// Script Provided by Gael Marronnier From Simstream Company www.simstream.com gael_asterisk@simstream.com</span>
<span style="color: #666666; font-style: italic;">// Modified by Arnaud Croes (arnaud@croesnet.eu) to make it work properly in a 3CX environment</span>
<span style="color: #666666; font-style: italic;">// </span>
<span style="color: #666666; font-style: italic;">// Get parameter from directory script</span>
&nbsp;
<span style="color: #b1b100;">require</span> <span style="color: #0000ff;">'/var/www/html/xmlservices/libs/Smarty.class.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$smarty</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Smarty<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">require</span> <span style="color: #0000ff;">'/var/www/html/xmlservices/include/xmlservices_libs.php'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require</span> <span style="color: #0000ff;">'/var/www/html/xmlservices/include/xmlservices_config.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$directoryRowCount</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">30</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">compile_check</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//$smarty-&gt;debugging = true; </span>
&nbsp;
<span style="color: #666666; font-style: italic;"># This sets the offset for the LIMIT portion of the query
</span><span style="color: #000088;">$NextStartingRow</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'NextGroup'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">*</span><span style="color: #000088;">$directoryRowCount</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000088;">$filter</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;filter&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// LDAP server characteristics </span>
<span style="color: #000088;">$ds</span><span style="color: #339933;">=</span><span style="color: #990000;">ldap_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;192.168.1.2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">ldap_set_option</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ds</span><span style="color: #339933;">,</span>LDAP_OPT_PROTOCOL_VERSION<span style="color: #339933;">,</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Using LDAP v3&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Failed to set version to protocol 3&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$myldap</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;ou=addressbook,dc=croesnet,dc=eu&quot;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// Phone entries on my LDAP server are in the format +1 (800) 5551234, the way outlook likes it.</span>
<span style="color: #666666; font-style: italic;">// Names on the server (cn) are not supposed to have special characters like &amp;</span>
<span style="color: #666666; font-style: italic;">// The script replaces the + by 00 , because 3CX doesn't like the + character in the dial string.</span>
<span style="color: #666666; font-style: italic;">// Also removing space, ( and ) characters.</span>
<span style="color: #666666; font-style: italic;">// Removing the ( and ) characters is just cosmetic, they do not cause functionality problems.</span>
<span style="color: #666666; font-style: italic;">// Phone number format change variables</span>
<span style="color: #000088;">$patterns</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/\+/'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$patterns</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/\(|\)|-|\s+/'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$replacements</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'00'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$replacements</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ds</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
  <span style="color: #000088;">$r</span><span style="color: #339933;">=</span><span style="color: #990000;">ldap_bind</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ds</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
  <span style="color: #000088;">$filterldap</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;(|(givenname=*&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$filter</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;*)(sn=*&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$filter</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;*)(cn=*&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$filter</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;*)(mail=*&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$filter</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;*))&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$sr</span><span style="color: #339933;">=</span><span style="color: #990000;">ldap_search</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ds</span><span style="color: #339933;">,</span> <span style="color: #000088;">$myldap</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filterldap</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
  <span style="color: #666666; font-style: italic;">// Lets start displaying XML infos </span>
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;CiscoIPPhoneDirectory&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;Title&gt;IP Telephony Directory&lt;/Title&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
  <span style="color: #000088;">$info</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ldap_get_entries</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ds</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sr</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;Prompt&gt;&quot;</span><span style="color: #339933;">;</span> 
  <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;count&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; Reachable person(s)&lt;/Prompt&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
  <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;count&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;mobile&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;DirectoryEntry&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;Name&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">iconv</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UTF-8&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;ISO-8859-1&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;cn&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; (mobile)&lt;/Name&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;Telephone&gt;&quot;</span> <span style="color: #339933;">.</span><span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$patterns</span><span style="color: #339933;">,</span> <span style="color: #000088;">$replacements</span><span style="color: #339933;">,</span> <span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;mobile&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/Telephone&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/DirectoryEntry&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #009900;">&#125;</span> 
     <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;homephone&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;DirectoryEntry&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;Name&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">iconv</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UTF-8&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;ISO-8859-1&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;cn&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; (home)&lt;/Name&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;Telephone&gt;&quot;</span> <span style="color: #339933;">.</span><span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$patterns</span><span style="color: #339933;">,</span> <span style="color: #000088;">$replacements</span><span style="color: #339933;">,</span> <span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;homephone&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/Telephone&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/DirectoryEntry&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #009900;">&#125;</span> 
     <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;telephonenumber&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;DirectoryEntry&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;Name&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">iconv</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UTF-8&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;ISO-8859-1&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;cn&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; (business)&lt;/Name&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;Telephone&gt;&quot;</span> <span style="color: #339933;">.</span><span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$patterns</span><span style="color: #339933;">,</span> <span style="color: #000088;">$replacements</span><span style="color: #339933;">,</span> <span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;telephonenumber&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/Telephone&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/DirectoryEntry&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> 
     <span style="color: #009900;">&#125;</span> 
   <span style="color: #009900;">&#125;</span> 
   <span style="color: #b1b100;">echo</span><span style="color: #0000ff;">&quot;&lt;/CiscoIPPhoneDirectory&gt;&quot;</span><span style="color: #339933;">;</span> 
   <span style="color: #990000;">ldap_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ds</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> 
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;error&quot;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://croesnet.eu/trixbox/ldap-directory-for-cisco-7941-7961-ip-phones/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

