<?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; dlr</title>
	<atom:link href="http://www.blogalex.com/archives/tag/dlr/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>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>
	</channel>
</rss>
