<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Hello,<o:p></o:p></p>

<p class=MsoNormal>So much keeps changing with the dialplan and Realtime
lookups. Just downloaded the latest stable 1.6.1.2. The app_realtime, which was
perfectly brilliant and did exactly what I needed, is gone; replaced with
func_realtime. The REALTIME function is unacceptable:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>; Get the conference number from the user<o:p></o:p></p>

<p class=MsoNormal>exten =&gt;
s,n(readconfno),Read(USER_CONFNO,conf-getconfno,0,3,20)<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>; See if that conference exists in database<o:p></o:p></p>

<p class=MsoNormal>exten =&gt;
s,n,Set(CONFINFO=&quot;${REALTIME(meetme,confno,${USER_CONFNO})}&quot;)<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>; If conference doesn't exist, play error<o:p></o:p></p>

<p class=MsoNormal>exten =&gt; s,n,GotoIf(${ISNULL(${CONFINFO})} ? 101)<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>; Retardedly string-manip out the conference settings<o:p></o:p></p>

<p class=MsoNormal>exten =&gt;
s,n,Set(CONF_PINPAIR=${CUT(CONFINFO,&quot;|&quot;,2)})<o:p></o:p></p>

<p class=MsoNormal>exten =&gt;
s,n,Set(CONF_PIN=${CUT(CONF_PINPAIR,&quot;=&quot;,2)})<o:p></o:p></p>

<p class=MsoNormal>exten =&gt;
s,n,Set(CONF_ADMINPINPAIR=${CUT(CONFINFO,&quot;|&quot;,3)})<o:p></o:p></p>

<p class=MsoNormal>exten =&gt;
s,n,Set(CONF_ADMINPIN=${CUT(CONF_ADMINPINPAIR,&quot;=&quot;,2)})<o:p></o:p></p>

<p class=MsoNormal>exten =&gt;
s,n,Set(CONF_SETTINGSPAIR=${CUT(CONFINFO,&quot;|&quot;,5)})<o:p></o:p></p>

<p class=MsoNormal>exten =&gt;
s,n,Set(CONF_SETTINGS=${CUT(CONF_SETTINGSPAIR,&quot;=&quot;,2)})<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>exten =&gt; s,n,NoOp(User PIN:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
${CONF_PIN})<o:p></o:p></p>

<p class=MsoNormal>exten =&gt; s,n,NoOp(Admin PIN:&nbsp;&nbsp;&nbsp;&nbsp;
${CONF_ADMINPIN})<o:p></o:p></p>

<p class=MsoNormal>exten =&gt; s,n,NoOp(Conf Settings: ${CONF_SETTINGS})<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>The function returns a single row as one long concatenated
string that must be CUT multiple times using multiple variables. Not only does
this waste resources but there is no guarantee that the columns returned back
will be in the same order all the time.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I found a SVN commit dated Nov 19 2008 that introduces two
new functions, REALTIME_HASH and REALTIME_FIELD. But for some reason, this
patch is NOT located in the 1.6.1.2 that I just downloaded. (Bug #13651)<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>How is that possible that a 10 month old patch to the trunk
is not in the most recent stable?<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>So, what is the proper way to do REALTIME lookups within the
dial plan that don&#8217;t involve so much CUT&#8217;ing?<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>-Matthew<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>