<?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>Professional Geekism &#187; VoIP</title>
	<atom:link href="http://www.ninjabadger.net/category/voip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ninjabadger.net</link>
	<description>Ninjas. Badgers. Linux. Me.</description>
	<lastBuildDate>Fri, 05 Aug 2011 13:49:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Speex causing Asterisk headaches</title>
		<link>http://www.ninjabadger.net/2008/07/24/speex-causing-asterisk-headaches/</link>
		<comments>http://www.ninjabadger.net/2008/07/24/speex-causing-asterisk-headaches/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 10:17:17 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[VoIP]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[Gentoo]]></category>

		<guid isPermaLink="false">http://www.ninjabadger.net/?p=37</guid>
		<description><![CDATA[Many people already know that I dabble with Asterisk on a daily basis. Our Linux distribution of choice here at work, also happens to be Gentoo. Now, when updating Gentoo&#8217;s &#8216;world&#8217; package base, you do get some problems occassionally. This is a downside to being &#8216;on the cutting edge&#8217; and, it&#8217;s obviously no wonder why [...]]]></description>
			<content:encoded><![CDATA[<p>Many people already know that I dabble with Asterisk on a daily basis. Our Linux distribution of choice here at work, also happens to be Gentoo.</p>
<p>Now, when updating Gentoo&#8217;s &#8216;world&#8217; package base, you do get some problems occassionally. This is a downside to being &#8216;on the cutting edge&#8217; and, it&#8217;s obviously no wonder why distributions such-as Ubuntu, Red Hat and SuSe, stick to well-tested release schedules.</p>
<p>Recently, after a well over-due profile update (from 2006.0 to 2008.0) and the following <em>emerge -av &#8211;newuse &#8211;deep world</em> command, Asterisk simply stopped working. No warning, and it took a while for me to notice.</p>
<p>Once I had noticed, it became apparent that something was really quite awry. Asterisk wouldn&#8217;t start via the init script (with has a seemingly immortal, and hideously annoying process), nor via just calling the executable. I eventually realised, with the help of <a href="http://bugs.digium.com/view.php?id=11693">this bug report</a> and the /var/log/asterisk/full logfile, that Asterisk was failing to find the speex modules it required.</p>
<p>Long story short, as per the bug report, you need to downgrade (and mask for good measure) speex to 1.1.12 to retain functionality on anything older than a January/Febuary release of Asterisk 1.4.x. <img src='http://www.ninjabadger.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>The fact that Portage <em>still</em> only has Asterisk 1.2.x, means that unless you switch to using the voip overlay, you&#8217;re going to find this issue will affect you.</p>
<p>Oh Gentoo, how I love and hate you! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjabadger.net/2008/07/24/speex-causing-asterisk-headaches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TFTP Server via Netgear DB834GT</title>
		<link>http://www.ninjabadger.net/2008/01/14/tftp-server-via-netgear-db834gt/</link>
		<comments>http://www.ninjabadger.net/2008/01/14/tftp-server-via-netgear-db834gt/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 00:35:52 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Netgear]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.ninjabadger.net/2008/01/14/tftp-server-via-netgear-db834gt/</guid>
		<description><![CDATA[I&#8217;ve written a short guide on how to configure a Netgear DB834GT (and possibly other variants of the DB834) to forward a device to a TFTP server, via the router&#8217;s built-in busybox/linux-based udhcpd server. I&#8217;ve recently been setting up a Cisco IP phone at home, and this functionality has proven to be extremely useful. Disclaimer: [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written a short guide on how to configure a <a href="http://www.netgear.co.uk/wireless_broadband_router_dg834gt.php">Netgear DB834GT</a> (and possibly other variants of the DB834) to forward a device to a <a href="http://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol">TFTP server</a>, via the router&#8217;s built-in <a href="http://www.busybox.net/">busybox</a>/linux-based <a href="http://udhcp.busybox.net/">udhcpd</a> server. I&#8217;ve recently been setting up a Cisco IP phone at home, and this functionality has proven to be extremely useful.</p>
<p><strong>Disclaimer: I am NOT responsible if you screw up, over-write your config, brick your router, forget your password, kill your dog or set fire to the living room. There&#8217;s no reason why you should do any of these things, given the simple commands below, but if you do see fit to go a-wandering through the files stored within your router, then it&#8217;s not my fault if you break it!</strong></p>
<p>Anyway, to start, you&#8217;ll need to enable the debug mode on your Netgear router. Simply construct a link like the one below, paste it into your web browser and login with your username (most-likely &#8216;admin&#8217;) and the configured password:</p>
<p><code>http://192.168.0.1/setup.cgi?todo=debug</code></p>
<p>Of course, you&#8217;ll need to replace &#8217;192.168.0.1&#8242; with the LAN IP that you&#8217;ve chosen for your router.</p>
<p>Now for the fun part. We need to see what the DHCP server is configured to do at present, so issue the following command:</p>
<p><code>cat /etc/udhcpd.conf</code></p>
<p>You should see the contents of the udhcp.conf file printed out. It will look something like this:<br />
<code><br />
server          192.168.0.1<br />
start           192.168.0.20<br />
end             192.168.0.254<br />
interface       br0<br />
option  subnet  255.255.255.0<br />
option  router  192.168.0.1<br />
option  dns     208.67.222.222<br />
option  dns     208.67.220.220<br />
option  lease   259200<br />
</code><br />
To setup the TFTP server re-direction, you first need to add a line to this config file. I had to look up a <a href="http://udhcp.busybox.net/udhcpd.conf">sample config file for udhcpd</a>, but thankfully it lists a number of DHCP options that can be utilised (but aren&#8217;t directly supported by the web interface) to extend its usefulness.</p>
<p>Sadly there&#8217;s no text file editor included on the router, but one can achieve the same effect with simple shell operators:</p>
<p><code>echo "option  tftp    192.168.0.20" >> /etc/udhcpd.conf</code></p>
<p>This simply prints a line and appends it to the file. You can check your addition by using the &#8216;cat&#8217; command above.</p>
<p>Now you need to stop the DHCP server and restart it. This is so that udhcpd will re-load it&#8217;s configuration file and take note of your changes. If you issue the command &#8216;ps&#8217;, you&#8217;ll see something like this:<br />
<code><br />
# ps<br />
  PID  Uid     VmSize Stat Command<br />
    1 root        252 S   init<br />
    2 root            SWN [ksoftirqd/0]<br />
    3 root            SW< [events/0]<br />
    4 root            SW< [khelper]<br />
    5 root            SW< [kblockd/0]<br />
   17 root            SW  [pdflush]<br />
   18 root            SW  [pdflush]<br />
   19 root            SW  [kswapd0]<br />
   20 root            SW< [aio/0]<br />
   26 root            SW  [mtdblockd]<br />
  104 root        244 S   /sbin/klogd<br />
  147 root        400 S   /usr/sbin/hostapd -B /etc/hostapd.conf<br />
  163 root        260 S   /usr/sbin/netgear_ntp -z GMT+0 -h 208.69.32.170<br />
  165 root        256 S   /usr/sbin/mini_httpd -d /www -r NETGEAR DG834GT  -c *<br />
  172 root        268 S   /sbin/syslogd -f /etc/syslog.conf<br />
  173 root        244 S   /usr/sbin/crond<br />
  175 root        168 S   /usr/sbin/scfgmgr<br />
  179 root        184 S   /usr/sbin/cmd_agent_ap<br />
  180 root        168 S   /usr/sbin/pb_ap<br />
  193 root        252 S   init<br />
  602 root        220 S   /usr/sbin/utelnetd -d<br />
 1835 root        524 S   /usr/sbin/pppd plugin pppoa 0.38 user lol@adsl.net<br />
 2056 root        300 S   /usr/sbin/reaim<br />
 2153 root        244 S   /usr/sbin/udhcpd /etc/udhcpd.conf<br />
 2155 root        396 S   /bin/sh<br />
 2157 root        268 R   ps<br />
</code><br />
As you can see by this line:</p>
<p></code>2153 root        244 S   /usr/sbin/udhcpd /etc/udhcpd.conf</p>
<p>..the udhcpd server is running with PID 2153. To stop it, just kill it:</p>
<p><code>kill 2153</code></p>
<p><strong>Note: Although <em>my</em> example shows udhcpd using PID 2153, yours will most-certainly be different, so remember to substitute the the kill command above with one that uses the <em>correct</em> PID value. Killing the wrong PID could mean that you break something vital, and you&#8217;ll need to start over again (ie. restart the router, and go back to the beginning of this guide.)</strong></p>
<p>Issuing &#8216;ps&#8217; once more should show that the udhcpd server has been sucessfully stopped (it won&#8217;t appear in the list of running processes). The router won&#8217;t restart udhcpd by itself thankfully. Note that whilst you have the DHCP server disabled, any clients expecting a lease or renew won&#8217;t get it. I can only recommend that the machine you do this from is assigned a static IP, to avoid any [possible, however unlikely] hassle.</p>
<p>Since we&#8217;ve pre-edited the udhcpd.conf file, all that is left to do is restart udhcpd:</p>
<p><code>/usr/sbin/udhcpd /etc/udhcpd.conf &#038;</code></p>
<p>The ampersand at the end is important, don&#8217;t forget it!</p>
<p>Finally, issue another &#8216;ps&#8217; command to check that udhcpd has been restarted successfully, and you&#8217;re all done.</p>
<p>Unfortunately these changes will not be permanent. If your router is restarted, or power cycled, you will lose these settings. At present, I do not know of a way to successfully add the TFTP option to the configuration saved within the router&#8217;s non-volatile memory. It would be nice if Netgear could build some of this functionality into their firmwares (and thus the web interface), and whilst third-party firmwares do exist, I&#8217;ve not had the beef to test one out as of yet.</p>
<p>Still, this helped me configure my SIP phone, so hopefully it&#8217;ll help someone else. <img src='http://www.ninjabadger.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjabadger.net/2008/01/14/tftp-server-via-netgear-db834gt/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Cisco IOS copy command</title>
		<link>http://www.ninjabadger.net/2007/10/14/the-cisco-ios-copy-command/</link>
		<comments>http://www.ninjabadger.net/2007/10/14/the-cisco-ios-copy-command/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 15:41:09 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.ninjabadger.net/2007/10/14/the-cisco-ios-copy-command/</guid>
		<description><![CDATA[Update: On my last trip to the hosting facility where this router&#8217;s stored, I took the opportunity to test the theory of a non-Cisco CF card knobbling the successful restart of a router. I was sure I&#8217;d checked already, but I wanted to be sure. Thankfully, it restarted without a hitch. So I guess there&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
<strong>Update:</strong> On my last trip to the hosting facility where this router&#8217;s stored, I took the opportunity to test the theory of a non-Cisco CF card knobbling the successful restart of a router. I was sure I&#8217;d checked already, but I wanted to be sure.</p>
<p>Thankfully, it restarted without a hitch. So I guess there&#8217;s zero cause for alarm. <img src='http://www.ninjabadger.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p></blockquote>
<p>I know I&#8217;ve not written on this log in a long while; I&#8217;ve been so busy following the departure of my predecessor, that it&#8217;s left me with little time (or will) to write about technology. More to come on this though. I&#8217;m still meant to be using this blog as a placement log, so I should really document what I&#8217;m doing.</p>
<p>Anyhow, as it happens I&#8217;m sat with very little to do at the minute, so I thought I&#8217;d write about something that really got me annoyed a week or so ago.</p>
<p>OK, so anyone who&#8217;s had the pleasure of setting up a VoIP system based around Cisco CME will know that the flash: directory rapidly fills up with a tonne of files. Config files, language files, firmware files&#8230; Basically; a lot of individual little files inhabit your CF card.</p>
<p>Now, on a recent trip to our co-location facility of choice, I wanted to take the opportunity to upgrade the flash card in our voice router. This is a 2811, with the basic 64MB CF card pre-installed, and recently it&#8217;s become a pain in the arse working with newer phones (7941&#8242;s, in my case) because the firmware files were just taking up too much room. Not to mention you&#8217;re only left with ~14MB free space after uploading the IOS image.</p>
<p>So I purchased a 256MB CF card, for about Â£8 inc. delivery (a mere shadow of the Â£202-400+ that Cisco wanted for a god-damn CF card of the same size!) and grabbed a standard-affair USB flash drive to use as temporary storage whilst shifting files from one card to the other.</p>
<p>Now, when you&#8217;re deleting files en masse from a Cisco flash: directory, it&#8217;s possible to use wildcards in order to catch multiple, similarly-named files and delete them all in turn. Which is quite useful if you&#8217;re working with 20 config files that all begin with &#8216;SEPSomethingOrOther&#8217;. So because of this included [20th Century] functionality, one would also assume that Cisco would have also included the use of wildcards into the copy command&#8230;</p>
<p>Have they bollocks!</p>
<p><code><br />
RouterX# copy flash:its\SEP* usbflash0:<br />
LOL * IS NOT A VALID FILENAME CHARACTER<br />
</code></p>
<p><code><br />
RouterX# copy flash:its usbflash0:<br />
LOL CAN'T COPY FOLDERS!<br />
</code></p>
<p>So not only is it retarded enough to not recognise &#8216;*&#8217; as &#8216;please copy anything that begins with the preceeding phrase&#8217;, it&#8217;s also completely inable to copy an entire directory! I cannot <strong>believe</strong> that Cisco are up to release 12.4(15) and haven&#8217;t included some way of copying files en-masse.</p>
<p>It took me <em>bloody ages</em> to copy each of the 62 files from flash: to usbflash0:, swap the CF cards over, and then copy 62 files back to the new CF card. What a <em>horrid</em> waste of time, Cisco.</p>
<p>My good friends at Cisco: if you&#8217;re reading this, for the sake of all that&#8217;s useful, bloody-well sort it out!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjabadger.net/2007/10/14/the-cisco-ios-copy-command/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Bad SIP transfers in CME 4.0/4.1/4.2</title>
		<link>http://www.ninjabadger.net/2007/08/17/bad-sip-transfers-in-cme-404142/</link>
		<comments>http://www.ninjabadger.net/2007/08/17/bad-sip-transfers-in-cme-404142/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 10:54:03 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.ninjabadger.net/2007/08/17/bad-sip-transfers-in-cme-404142/</guid>
		<description><![CDATA[Whilst I&#8217;ve been messing about with registering a Grandstream GXP2000 to our CME 4.2 server&#8217;s SIP service, I&#8217;ve found quite an annoying problem. The phone registers fine and can make external calls via the SIP trunk absolutely fine. The phone will also accept transfers of internal calls (ephones), but if I attempt to transfer an [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst I&#8217;ve been messing about with registering a Grandstream GXP2000 to our CME 4.2 server&#8217;s SIP service, I&#8217;ve found quite an annoying problem.</p>
<p>The phone registers fine and can make external calls via the SIP trunk absolutely fine. The phone will also accept transfers of internal calls (ephones), <strong>but</strong> if I attempt to transfer an external call form an ephone, to the Granstream &#8211; the external call is cut-off. I&#8217;ve isolated the &#8216;debug ccsip messages&#8217; output which describes what is happening, but I&#8217;m by no means an expert in debugging SIP output.<br />
<code><br />
Aug 14 09:16:49.807: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:<br />
Sent:<br />
REFER sip:07xxxxxxxxx@cme-router:5060 SIP/2.0<br />
Via: SIP/2.0/UDP cme-router:5060;branch=z9hG4bK3432633<br />
From: <sip:0116@cme-router>;tag=2CD733C8-216A<br />
To: "Tom" <sip:07xxxxxxxxx@cme-router>;tag=as221e2abe<br />
Call-ID: 24524ebd58e984e930f461ff5d490bd9@asterisk-sip-gateway<br />
CSeq: 102 REFER<br />
Max-Forwards: 70<br />
Contact: <sip:0116@cme-router:5060><br />
User-Agent: Cisco-SIPGateway/IOS-12.x<br />
Timestamp: 1187083009<br />
Refer-To: sip:2007@cme-router?Replaces=E72682C6-497D11DC-90D890FC-79F613F8%40cme-router<br />
%3Bto-tag%3Ddb0457357be0d469%3Bfrom-tag%3D2CD77068-25C3<br />
Referred-By: <sip:0116@cme-router><br />
Content-Length: 0<br />
</code><br />
<code><br />
Aug 14 09:16:49.811: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:<br />
Received:<br />
SIP/2.0 202 Accepted<br />
Via: SIP/2.0/UDP cme-router:5060;branch=z9hG4bK3432633;received=cme-router<br />
From: <sip:0116@cme-router>;tag=2CD733C8-216A<br />
To: "Tom" <sip:07xxxxxxxxx@cme-router>;tag=as221e2abe<br />
Call-ID: 24524ebd58e984e930f461ff5d490bd9@asterisk-sip-gateway<br />
CSeq: 102 REFER<br />
User-Agent: Asterisk PBX<br />
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY<br />
Supported: replaces<br />
Contact: <sip:07xxxxxxxxx@asterisk-sip-gateway><br />
Content-Length: 0<br />
</code><br />
<code><br />
Aug 14 09:16:49.811: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:<br />
Received:<br />
NOTIFY sip:0116@cme-router:5060 SIP/2.0<br />
Via: SIP/2.0/UDP asterisk-sip-gateway:5060;branch=z9hG4bK49b17aad;rport<br />
From: "Tom" <sip:07xxxxxxxxx@asterisk-sip-gateway>;tag=as221e2abe<br />
To: <sip:0116@cme-router>;tag=2CD733C8-216A<br />
Contact: <sip:07xxxxxxxxx@asterisk-sip-gateway><br />
Call-ID: 24524ebd58e984e930f461ff5d490bd9@asterisk-sip-gateway<br />
CSeq: 104 NOTIFY<br />
User-Agent: Asterisk PBX<br />
Max-Forwards: 70<br />
Event: refer;id=102<br />
Subscription-state: terminated;reason=noresource<br />
Content-Type: message/sipfrag;version=2.0<br />
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY<br />
Supported: replaces<br />
Content-Length: 49<br />
</code><br />
<code><br />
SIP/2.0 481 Call leg/transaction does not exist<br />
</code><br />
<code><br />
Aug 14 09:16:49.815: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:<br />
Sent:<br />
SIP/2.0 200 OK<br />
Via: SIP/2.0/UDP asterisk-sip-gateway:5060;branch=z9hG4bK49b17aad;rport<br />
From: "Tom" <sip:07xxxxxxxxx@asterisk-sip-gateway>;tag=as221e2abe<br />
To: <sip:0116@cme-router>;tag=2CD733C8-216A<br />
Date: Tue, 14 Aug 2007 09:16:49 GMT<br />
Call-ID: 24524ebd58e984e930f461ff5d490bd9@asterisk-sip-gateway<br />
CSeq: 104 NOTIFY<br />
Content-Length: 0<br />
</code><br />
<code><br />
Aug 14 09:16:49.843: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:<br />
Received:<br />
BYE sip:0116@cme-router:5060 SIP/2.0<br />
Via: SIP/2.0/UDP asterisk-sip-gateway:5060;branch=z9hG4bK136ae0fa;rport<br />
From: "Tom" <sip:07xxxxxxxxx@asterisk-sip-gateway>;tag=as221e2abe<br />
To: <sip:0116@cme-router>;tag=2CD733C8-216A<br />
Call-ID: 24524ebd58e984e930f461ff5d490bd9@asterisk-sip-gateway<br />
CSeq: 105 BYE<br />
User-Agent: Asterisk PBX<br />
Max-Forwards: 70<br />
Content-Length: 0<br />
</code></p>
<p>My voice service voip config is as below:<br />
<code><br />
voice service voip<br />
allow-connections sip to sip<br />
no supplementary-service sip moved-temporarily<br />
sip<br />
registrar server expires max 240 min 60<br />
no call service stop<br />
</code></p>
<p>And the Grandstream phone config is:<br />
<code><br />
voice register dn 1<br />
number 2007<br />
allow watch<br />
refer target dial-peer<br />
mwi<br />
!<br />
voice register pool 1<br />
id mac 000B.820D.0536<br />
number 1 dn 1<br />
template 1<br />
dtmf-relay rtp-nte<br />
voice-class codec 1<br />
description Grandstream<br />
</code></p>
<p>Where &#8216;cme-router&#8217; is the router on which CME 4.2 is installed and running, and &#8216;asterisk-sip-gateway&#8217; is our SIP gateway (which the CME 4.2 SIP-UA connects to) that handles more advanced call routing features.</p>
<p>If anyone has any ideas &#8211; I&#8217;d appreciate the help! It&#8217;s not a massive problem, but I&#8217;m keen to see this one through.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjabadger.net/2007/08/17/bad-sip-transfers-in-cme-404142/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Testing translation rules</title>
		<link>http://www.ninjabadger.net/2007/08/01/testing-translation-rules/</link>
		<comments>http://www.ninjabadger.net/2007/08/01/testing-translation-rules/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 10:54:42 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://www.ninjabadger.net/2007/08/01/testing-translation-rules/</guid>
		<description><![CDATA[When you&#8217;re testing translation rules on a CME setup, you need to be very careful. An example of the test command: test translation-rule 1 01234555321 Don&#8217;t assume that just because there is no output from the test, that nothing has been matched. If there are no matches across any of your rules, you will see: [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re testing translation rules on a CME setup, you need to be very careful. An example of the test command:<br />
<code><br />
test translation-rule 1 01234555321<br />
</code></p>
<p>Don&#8217;t assume that just because there is no output from the test, that nothing has been matched. If there are no matches across <em>any</em> of your rules, you will see:<br />
<code><br />
01234555321 Didn't match with any of rules<br />
</code></p>
<p>If there&#8217;s no output, then you have a partial match. If you issue &#8216;debug voice translation&#8217;, and watch carefully, you will see output such as this:<br />
<code><br />
Router(cfg-translation-rule)#do test voice translation-rule 1 0123<br />
Router(cfg-translation-rule)#<br />
//-1/xxxxxxxxxxxx/RXRULE/regxrule_match: more digits needed; number=0123 rule precedence=1<br />
//-1/xxxxxxxxxxxx/RXRULE/regxrule_match: more digits needed; number=0123 rule precedence=2<br />
//-1/xxxxxxxxxxxx/RXRULE/regxrule_match: more digits needed; number=0123 rule precedence=3<br />
//-1/xxxxxxxxxxxx/RXRULE/regxrule_match: more digits needed; number=0123 rule precedence=4<br />
//-1/xxxxxxxxxxxx/RXRULE/regxrule_rule_match: partial match found, partial_match 4<br />
</code></p>
<p>There is a problem with this: if your translation rules are mistakenly waiting for any number (as mine was this morning; I&#8217;d left a .* on the beginning of the expression!), then your calling will exhibit some odd behaviour.</p>
<p>For instance, when dialling extensions from one ephone to another (simply across CME) your call will be subject to the &#8216;timeout interdigit&#8217; value (as set in telephony-service). Why? Well, if your translation rules pick up a partial match they wait for a predefined length of time to see if you dial any other digits. The time waited is predefined by the interdigit timeout!</p>
<p>Even if the number matches the correct dial-peer (eg. 20001, 20002) and eventually dials correctly, you will still be subjected to the interdigit timeout, despite the lack of any &#8216;T&#8217; in your destination-patterns. This is <em>purely</em> because the translation rules are waiting on your dial pattern.</p>
<p>Just thought I&#8217;d mention it. Really confused me this morning &#8211; many thanks to Tele for helping out!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ninjabadger.net/2007/08/01/testing-translation-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

