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