<?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>Alex's Adventures in CodeSpace &#187; Kannel</title>
	<atom:link href="http://www.blogalex.com/archives/category/kannel/feed" rel="self" type="application/rss+xml" />
	<link>http://www.blogalex.com</link>
	<description>Alejandro Guerrieri's Blog</description>
	<lastBuildDate>Wed, 10 Feb 2010 23:16:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Dlr counters on the status page</title>
		<link>http://www.blogalex.com/archives/222</link>
		<comments>http://www.blogalex.com/archives/222#comments</comments>
		<pubDate>Fri, 06 Nov 2009 14:37:24 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[dlr]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[reporting]]></category>
		<category><![CDATA[status]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=222</guid>
		<description><![CDATA[This patch adds separate dlr counters on the status page.]]></description>
			<content:encoded><![CDATA[<p>This patch adds separate <em>dlr</em> counters on the status page.</p>
<p>If you use <em>dlrs</em> (Delivery Receipts) with Kannel, you&#8217;ve noticed that they&#8217;re counted along with MO traffic as incoming messages.</p>
<p>This leads to misunderstandings on how much incoming traffic you&#8217;re <em>really</em> sustaining: For example on <em>SMPP</em>, if you request <em>dlrs</em>, depending on the carrier having it enabled or not, you&#8217;ll get one or two more &#8220;incoming&#8221; messages counted (<em>dlrs</em> are very similar to <em>mo</em> messages in structure).</p>
<p>After applying this patch, the status page will display incoming and <em>dlr</em> traffic on separate counter, either for the total amouns as in each and every defined smsc connection. It will also display separate load indicators, so you&#8217;ll know at all times if your inbound traffic is actually traffic or just old/delayed <em>dlrs</em>.</p>
<p>Here&#8217;s the patch:</p>
<p><a href="http://www.blogalex.com/wp-content/uploads/2009/11/kannel-dlr-status.patch">kannel-dlr-status</a></p>
<p>As usual, please try it and let me know what you think.</p>
<p>Alex</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/222/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PAM Authentication for Kannel</title>
		<link>http://www.blogalex.com/archives/206</link>
		<comments>http://www.blogalex.com/archives/206#comments</comments>
		<pubDate>Thu, 11 Jun 2009 09:56:48 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[pam]]></category>
		<category><![CDATA[patch]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=206</guid>
		<description><![CDATA[Though kannel already has some pam functionality included, it&#8217;s far from optimal imho. As it is now, to use pam authentication you have to: 1. Configure with &#8211;enable-pam and compile. 2. Create an smsbox-user called &#8220;pam&#8221; with a dummy password. 3. Create a pam configuration file called &#8220;kannel&#8221; on /etc/pam.d/, with your pam settings. 4. [...]]]></description>
			<content:encoded><![CDATA[<p>Though <strong>kannel</strong> already has some <em>pam</em> functionality included, it&#8217;s far from optimal imho.</p>
<p>As it is now, to use <em>pam</em> authentication you have to:</p>
<p>1. Configure with <em>&#8211;enable-pam</em> and compile.<br />
2. Create an smsbox-user called &#8220;pam&#8221; with a dummy password.<br />
3. Create a <em>pam</em> configuration file called &#8220;kannel&#8221; on <em>/etc/pam.d/</em>, with your <em>pam</em> settings.<br />
4. <strong>Kannel</strong> will then use only <em>pam</em> for authentication, so you could use <em>LDAP</em>, <em>Radius</em> or whatever supported authentication modules you have configured on the box.</p>
<p>However:</p>
<p>* Other s<em>msbox-user</em>&#8216;s are disabled, only the &#8220;pam&#8221; user is allowed to authenticate.<br />
* All users would get logged as &#8220;pam&#8221;, so you cannot make settings per users of any kind.<br />
* Only one <em>pam</em> group is allowed.</p>
<p>After applying the patch, pam authentication gets managed with a special group <em>sendsms-pam-user</em>, which shares most of s<em>endsms-user</em> parameters, except for <em>username</em> and <em>password</em>, and adds the <em>acl</em> parameter instead.</p>
<blockquote><p>group         = sendsms-pam-user<br />
acl           = kannel<br />
&lt;other sendsms-user parameters&gt;</p></blockquote>
<p>* You can define as many groups as needed, pointing to different <em>pam</em> configuration files.<br />
* The <em>acl</em> parameter points to the pam module on <em>/etc/pam.d/</em> (&#8220;kannel&#8221; in this case, but could be anything you want).<br />
* Pam authentication is only attempted after trying the regular <em>sendsms-user</em> way, so you can have local users and <em>pam</em> users at the same time (local taking precedence).<br />
* Each <em>sendsms-pam-user</em> group will be logged separately, and you&#8217;ll also get info about the <em>pam</em> user making the call.</p>
<p>To use the patch:</p>
<p>1. Download the patch <a href="http://www.blogalex.com/wp-content/uploads/2009/06/kannel-pam.patch">here</a> and apply it.<br />
2. Run ./bootstrap.sh<br />
3. Run ./configure &#8211;enable-pam<br />
4. make and make install as usual.</p>
<p>As usual, please try it and let me know what you think.</p>
<p>-Alex</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/206/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using individual meta-data fields on urls</title>
		<link>http://www.blogalex.com/archives/182</link>
		<comments>http://www.blogalex.com/archives/182#comments</comments>
		<pubDate>Fri, 29 May 2009 19:34:19 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[meta-data]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[url translation]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=182</guid>
		<description><![CDATA[With the addition of meta-data functionality in Kannel, now it&#8217;s possible to pass meta-data between different smsc&#8217;s and services. When defining services or urls to send messages, the new %D parameter gets replaced with the complete meta-data information available. However, there wasn&#8217;t any way to use only part of that data when posting to url&#8217;s. [...]]]></description>
			<content:encoded><![CDATA[<p>With the addition of <em>meta-data</em> functionality in <strong>Kannel</strong>, now it&#8217;s possible to pass <em>meta-data</em> between different smsc&#8217;s and services.</p>
<p>When defining services or urls to send messages, the new <em>%D</em> parameter gets replaced with the complete <em>meta-data</em> information available.</p>
<p>However, there wasn&#8217;t any way to use only part of that data when posting to url&#8217;s. This is why I&#8217;ve created this patch that allows you to use individual meta-data fields in your urls.</p>
<p><span style="text-decoration: underline;"><strong>USAGE</strong></span></p>
<p>To use it, a new set of parameters is defined, with the following format:</p>
<blockquote><p>%#group#parameter#</p></blockquote>
<p>Where <em>group</em> is the <em>meta-data group</em> (for example: <em>smpp</em>, <em>http</em> or <em>foo</em>) and parameter is the individual <em>meta-data parameter</em> you want to replace.</p>
<p>For example, let&#8217;s suppose we&#8217;re using a generic http-smsc, and we want to pass a couple of extra parameters for a dynamic username and password (some aggregators do that). Right now, that would require patching the source code and inventing some method to pass the extra parameters from the sendsms interface.</p>
<p>With the patch applied, this would be as simple as this:</p>
<blockquote><p>1. Pass the meta-data parameter on the sendsms request (urlencoded):</p>
<p><em>?http?user=Alex&amp;pass=bar</em></p>
<p>2. Define the send-url parameter on your http-smsc to pass those parameters:</p>
<p><em>send-url = http://myhost/sms?&#8230;.&amp;username=%#http#user#&amp;password=#http#pass#</em></p></blockquote>
<p>Note: I&#8217;m defining the <em>http</em> group here, but it could be anything, even the <em>smpp</em> group coming from an smpp bind, in which case the syntax would be #smpp#username# instead.</p>
<p>Download the patch from <a href="http://www.blogalex.com/wp-content/uploads/2009/05/kannel-meta-data-urltrans.patch">here</a>.</p>
<p>Please try it and let me know if it works for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/182/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Custom MO parameters on generic http-smsc</title>
		<link>http://www.blogalex.com/archives/171</link>
		<comments>http://www.blogalex.com/archives/171#comments</comments>
		<pubDate>Thu, 28 May 2009 20:57:12 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[parameters]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[smsc]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=171</guid>
		<description><![CDATA[This patch allows you to change the parameter names used when receiving incoming messages (MO&#8217;s) using the generic http-smsc. To use it, you need to add a few extra entries for the parameters you want to be redefined. The format is: generic-param-&#60;original-name&#62; = &#60;new-name&#62; For example, to redefine from, to, smsc and text: generic-param-from = [...]]]></description>
			<content:encoded><![CDATA[<p>This patch allows you to change the parameter names used when receiving incoming messages (MO&#8217;s) using the generic http-smsc.</p>
<p>To use it, you need to add a few extra entries for the parameters you want to be redefined. The format is: <em>generic-param-&lt;original-name&gt; = &lt;new-name&gt;</em></p>
<p>For example, to redefine <em>from</em>, <em>to</em>, <em>smsc</em> and <em>text</em>:</p>
<blockquote><p>generic-param-from = &#8220;phoneNumber&#8221;<br />
generic-param-to = &#8220;shortCode&#8221;<br />
generic-param-text = &#8220;message&#8221;<br />
generic-param-smsc = &#8220;carrier&#8221;</p></blockquote>
<p>That&#8217;s it, you&#8217;ll be able to use an url like this then:</p>
<p><em>http://myhost:myport/sms?phoneNumber=234567890&amp;shortCode=1234&amp;message=Hello+World&amp;carrier=mycarrier</em></p>
<p>Download the patch from <a href="http://www.blogalex.com/wp-content/uploads/2009/05/kannel-generic-mo.patch">here</a>.</p>
<p>As usual, try it and let me know.</p>
<p>-Alex</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/171/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New SqlBox release: 0.7.2</title>
		<link>http://www.blogalex.com/archives/143</link>
		<comments>http://www.blogalex.com/archives/143#comments</comments>
		<pubDate>Tue, 19 May 2009 20:11:17 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[releases]]></category>
		<category><![CDATA[sqlbox]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=143</guid>
		<description><![CDATA[I&#8217;ve just updated SqlBox. Version 0.7.2 adds: * rpm target (already on the latest snapshot). You can now run ./configure and then make rpm to build an RPM! * Support for MS-SQL and Sybase over FreeTDS. You need a current Kannel snapshot to support this. * Some code cleanups. You can get it from here. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just updated SqlBox. Version 0.7.2 adds:</p>
<p>* rpm target (already on the latest snapshot). You can now run <em>./configure</em> and then <em>make rpm</em> to build an RPM!<br />
* Support for MS-SQL and Sybase over FreeTDS. You need a current Kannel snapshot to support this.<br />
* Some code cleanups.</p>
<p>You can get it from <a title="SqlBox 0.7.2" href="http://www.kannel.org/~aguerrieri/SqlBox/Releases/sqlbox-0.7.2.tar.gz">here</a>.</p>
<p>As usual, try it and let me know what you think.</p>
<p>Alex</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/143/feed</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Retrying the dlrs from the store</title>
		<link>http://www.blogalex.com/archives/132</link>
		<comments>http://www.blogalex.com/archives/132#comments</comments>
		<pubDate>Thu, 07 May 2009 13:46:06 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[dlr]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[retry]]></category>
		<category><![CDATA[store]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=132</guid>
		<description><![CDATA[This patch implements an sleep and retry mechanism when calling dlr_get(). This aims to solve the problem we were having with dlr's arriving before the row is inserted.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using an external DB for dlr storage, there&#8217;s a slight chance that the carrier&#8217;s response to your MT (with the dlr information) would arrive <em>after</em> the dlr itself. If this happens, <strong>Kannel</strong> won&#8217;t be able to find the dlr (because it&#8217;s not there yet).</p>
<p>This patch implements an <em>sleep and retry</em> mechanism when calling <em>dlr_get()</em>. This aims to solve that problem.</p>
<p>2 new core parameters are defined:</p>
<blockquote><p>dlr-retry-count -&gt; How many times do we attempt to fetch the dlr? Default: 1<br />
dlr-retry-delay -&gt; How many milliseconds do we sleep before retrying? Default: 0</p></blockquote>
<p>So, if you don&#8217;t set these parameters the behaviour remains as it was before patching. However, if you, for instance, set:</p>
<blockquote><p>dlr-retry-count = 3<br />
dlr-retry-delay = 200</p></blockquote>
<p><strong>Kannel</strong> will try 3 times in total (the original plus 2 more), pausing 200ms (0.2 seconds) before each attempt. If after the third attempt the DLR&#8217;s still missing, <strong>Kannel</strong> will display a warning as usual.</p>
<p>Download the patch from here: <a href="http://www.blogalex.com/wp-content/uploads/2009/05/kannel-dlr-retry.patch">kannel-dlr-retry</a></p>
<p>Please try it and let me know what you think.</p>
<p>Regards,</p>
<p>Alex</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/132/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DLR extravaganza</title>
		<link>http://www.blogalex.com/archives/121</link>
		<comments>http://www.blogalex.com/archives/121#comments</comments>
		<pubDate>Mon, 04 May 2009 19:32:55 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[dlr]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[smsc]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=121</guid>
		<description><![CDATA[This patch adds a new configuration parameter to control the smsc name dlrs use when stored on the DB.]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE</strong>: This patch was superseded by another one I&#8217;ve wrote that adds <em>smsc-admin-id</em> instead. The s<em>msc-admin-id</em> patch was already commited to CVS so the use of th<em>e smsc-dlr-alias</em> is now officially <strong>deprecated</strong>.</p>
<p>A problem you may have faced with <em>dlrs</em> on Kannel: If you&#8217;re using <em>dlrs</em> and have more than one bind to a given carrier, you need to name them all the same. Otherwise, if the <em>dlr</em> come back over a different bind than the one you&#8217;ve used to send the <em>MT</em> message in the first place, Kannel won&#8217;t be able to match them, since they won&#8217;t share the same <em>&#8220;smsc&#8221;</em> field.</p>
<p>This is usually OK. However, you lose the ability to control the binds independently: you cannot shutdown a single bind, for example. The problem worsens yet more if your binds are to different data centers (some carriers have redundant <em>SMSC&#8217;s</em> on geographycally distant places).</p>
<p>That&#8217;s why I&#8217;ve created <a href="http://www.blogalex.com/wp-content/uploads/2009/05/kannel-dlr-alias.patch">this patch</a> that adds a new configuration option to <em>SMSC</em> groups:</p>
<blockquote><p>smsc-dlr-alias</p></blockquote>
<p>Using this parameter, you can define an alias to use when storing <em>dlrs</em>, so they will match despite being sent/received over different binds.</p>
<p>For example:</p>
<blockquote>
<div>&#8230;</div>
<div>#carrier link 1</div>
<div>
<div>group                      = smsc</div>
<div>smsc                       = smpp</div>
<div>smsc-id                  = &#8220;link1&#8243;</div>
<div>smsc-dlr-alias     = &#8220;myalias&#8221;</div>
<div>allowed-smsc-id = &#8220;link1;mylink&#8221;</div>
<div>host                        = &#8220;1.1.1.1&#8243;</div>
<div>&#8230;</div>
<div>
<div>#carrier link 2</div>
<div>
<div>group                      = smsc</div>
<div>smsc                       = smpp</div>
<div>smsc-id                  = &#8220;link2&#8243;</div>
<div>smsc-dlr-alias     = &#8220;myalias&#8221;</div>
<div>allowed-smsc-id = &#8220;link2;mylink&#8221;</div>
<div>host                        = &#8220;1.1.1.1&#8243;</div>
</div>
<div>&#8230;</div>
</div>
</div>
</blockquote>
<p>Using this configuration, you just have to use the <em>&#8220;&amp;smsc=mylink&#8221;</em> parameter on your <em>send-sms</em> url. The dlr will be stored using the alias <em>&#8220;myalias&#8221;</em> no matter which of these 2 routes the message takes. When getting the response back, again, it will be matched against <em>&#8220;myalias&#8221;</em>.</p>
<p>Download the patch <a href="http://www.blogalex.com/wp-content/uploads/2009/05/kannel-dlr-alias.patch">here</a>.</p>
<p>Please try it and let me know what you think.</p>
<p>Regards,</p>
<p>Alex</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/121/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>DLR support for MS-SQL and Sybase</title>
		<link>http://www.blogalex.com/archives/107</link>
		<comments>http://www.blogalex.com/archives/107#comments</comments>
		<pubDate>Wed, 29 Apr 2009 13:41:04 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[dlr]]></category>
		<category><![CDATA[freetds]]></category>
		<category><![CDATA[ms-sql]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[sybase]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=107</guid>
		<description><![CDATA[Yesterday I&#8217;ve published a patch that added Kannel&#8217;s DBPool support for MS-SQL and Sybase via the FreeTDS library. Today&#8217;s patch uses that functionality to implement the DLR storage on MS-SQL and Sybase DB Engines. To use this, you need to: 1. Patch Kannel to support FreeTDS (see yesterday&#8217;s link). 2. Patch Kannel using this patch, [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I&#8217;ve published a patch that added Kannel&#8217;s <strong>DBPool</strong> support for <strong>MS-SQL</strong> and <strong>Sybase</strong> via the <a href="http://www.freetds.org/" target="_blank">FreeTDS</a> library.</p>
<p>Today&#8217;s patch uses that functionality to implement the DLR storage on MS-SQL and Sybase DB Engines.</p>
<p>To use this, you need to:</p>
<blockquote><p>1. Patch Kannel to support <a href="http://www.freetds.org/" target="_blank">FreeTDS</a> (see <a href="http://www.blogalex.com/archives/99" target="_blank">yesterday&#8217;s</a> link).<br />
2. Patch Kannel using <a href="http://www.blogalex.com/wp-content/uploads/2009/04/kannel-dlr-mssql.patch">this patch</a>, to add support for DLR&#8217;s over FreeTDS.<br />
3.<em><span style="font-style: normal;"> ./configure –with-mssql=[optional path] [--other-switches]<br />
4. make<br />
5. sudo make install<br />
</span></em><span style="font-style: normal;">6. Configure </span><span style="font-style: normal;">dlr-storage = mssql</span><em><span style="font-style: normal;"><br />
</span></em><span style="font-style: normal;">7. Configure the DB connection (see </span><a href="http://www.blogalex.com/archives/99" target="_blank">yesterday&#8217;s</a><span style="font-style: normal;"> article for details).</span><em><span style="font-style: normal;"><br />
8. Configure the dlr-db group (see the <a title="userguide" href="http://www.kannel.org/userguide.shtml" target="_blank">userguide</a> for details).</span></em></p></blockquote>
<p>A simple example:</p>
<blockquote><p>group = core<br />
&#8230;<br />
dlr-storage = mssql<br />
&#8230;</p>
<p>group = mssql-connection<br />
id = msdlr<br />
username = myuser<br />
password = mypass<br />
server = mssql<br />
database = mydb</p>
<p>#DLR Configuration<br />
group = dlr-db<br />
id = msdlr<br />
table = dlr<br />
field-smsc = smsc<br />
field-timestamp = ts<br />
field-destination = destination<br />
field-source = source<br />
field-service = service<br />
field-url = url<br />
field-mask = mask<br />
field-status = status<br />
field-boxc-id = boxc</p></blockquote>
<p>Here is the patch: <a href="http://www.blogalex.com/wp-content/uploads/2009/04/kannel-dlr-mssql.patch">kannel-dlr-mssql </a></p>
<p>That&#8217;s all. Please try it and let me know.</p>
<p>Regards,</p>
<p>Alex</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/107/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MS-SQL and Sybase support for Kannel via FreeTDS</title>
		<link>http://www.blogalex.com/archives/99</link>
		<comments>http://www.blogalex.com/archives/99#comments</comments>
		<pubDate>Tue, 28 Apr 2009 19:59:21 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[dbpool]]></category>
		<category><![CDATA[freetds]]></category>
		<category><![CDATA[ms-sql]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[sybase]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=99</guid>
		<description><![CDATA[I've been working integrating with FreeTDS, an open source project that provides a free, open source driver for the tabular data system protocol used on MS-SQL and Sybase DB Engines.
The result is a DBPool module that makes Kannel capable of talking with MS-SQL and Sybase DB's.]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: This patch has been officially accepted into the main tree. Just download the latest CVS and you&#8217;re all set.</strong></p>
<p>The following article is now old news:</p>
<p>I&#8217;ve been working integrating Kannel with <a href="http://www.freetds.org/" target="_blank">FreeTDS</a>, an open source project that provides a free, open source driver for the tabular data system protocol used on MS-SQL and Sybase DB Engines.</p>
<p>The result is a DBPool module that makes Kannel capable of talking with MS-SQL and Sybase DB&#8217;s.</p>
<p>To use this module you need to have <a href="http://www.freetds.org/" target="_blank">FreeTDS</a> installed on your kannel box (either by compiling the source code or installing binary packages). If you&#8217;re installing from packages, do not forget to install the development packages as well (otherwise you won&#8217;t be able to compile Kannel).</p>
<p>Once you&#8217;ve installed <a href="http://www.freetds.org/" target="_blank">FreeTDS</a>, configure the freetds.conf and make sure that everything works properly. Hint: use the tsql command line utility and try connecting to your DB server).</p>
<p>To compile this into Kannel, you need to download and apply this patch. Since it touches the configure template, you need to bootstrap the code afterwards. In short:</p>
<blockquote><p>1. Download the patch <a href="http://www.blogalex.com/wp-content/uploads/2009/04/kannel-dbpool-mssql.patch">kannel-dbpool-mssql</a> to Kannel&#8217;s source root directory<br />
2. Apply the patch: patch -p0 &lt; kannel-dbpool-mssql.patch<br />
3. ./bootstrap.sh (only the first time after applying the patch)<br />
4. ./configure &#8211;with-mssql=[optional path] [--other-switches]<br />
5. make<br />
6. sudo make install</p></blockquote>
<p>Now, to configure the DB-Link, you need to add a dbpool group to kannel&#8217;s configuration files. It should look similar to this:</p>
<blockquote><p>group = mssql-connection<br />
id = mssql-db<br />
username = myuser<br />
password = mypass<br />
server = server_name<br />
database =my_db_name</p></blockquote>
<p>Note: server_name should match the [server_name] group for the DB link on your freetds.conf file.</p>
<p>Right now, this patch only adds the functionality to make Kannel FreeTDS-capable. I&#8217;m adding support for DLR&#8217;s and SqlBox soon, so stay tuned!</p>
<p>Here&#8217;s the patch: <a href="http://www.blogalex.com/wp-content/uploads/2009/04/kannel-dbpool-mssql.patch">kannel-dbpool-mssql</a></p>
<p>As usual, please try it and let me know how it goes.</p>
<p>Regards,</p>
<p>Alex</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/99/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DB-Based Store for Kannel</title>
		<link>http://www.blogalex.com/archives/88</link>
		<comments>http://www.blogalex.com/archives/88#comments</comments>
		<pubDate>Thu, 29 Jan 2009 22:20:26 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Kannel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[store]]></category>

		<guid isPermaLink="false">http://www.blogalex.com/?p=88</guid>
		<description><![CDATA[This is a new version from my previous patch to add support for a DB based store. Fundamental differences with the previous version: 1. The DB table is now created automatically at startup (if it didn&#8217;t exist). 2. Cleaned up code aiming at supporting other DB engines apart from MySQL. 3. Added documentation. Please download [...]]]></description>
			<content:encoded><![CDATA[<p>This is a new version from my <a title="previous" href="http://www.blogalex.com/archives/20" target="_self">previous</a> patch to add support for a DB based store.</p>
<p>Fundamental differences with the previous version:</p>
<p>1. The DB table is now created automatically at startup (if it didn&#8217;t exist).</p>
<p>2. Cleaned up code aiming at supporting other DB engines apart from MySQL.</p>
<p>3. Added documentation.</p>
<p>Please download the patches here:</p>
<p><a href="http://www.blogalex.com/wp-content/uploads/2009/01/kannel-store-db.patch">kannel-store-db</a></p>
<p><a href="http://www.blogalex.com/wp-content/uploads/2009/01/kannel-store-db-docs.patch">kannel-store-db-docs</a></p>
<p>Again, this is far from stable. It needs further testing and confirmation before rolling up into production.</p>
<p>Regards,</p>
<p>Alex</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blogalex.com/archives/88/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
