<div class="gmail_quote">On 19 June 2011 17:24, dotnetdub <span dir="ltr">&lt;<a href="mailto:dotnetdub@gmail.com">dotnetdub@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi List,<div><br></div><div>CDRTool version 8.12</div><div><br></div><div>I am trying initial import of data.</div><div><br></div><div>I start with the destination table.</div><div><br></div><div>If I copy /var/www/cdrtool/setup/csv/destinations.csv to /var/spool/cdrtool and run importRatingTables.php I get:</div>


<div><br></div><div><div>Database error for query insert into destinations</div><div>                    (</div><div>                    reseller_id,</div><div>                    gateway,</div><div>                    domain,</div>


<div>                    subscriber,</div><div>                    dest_id,</div><div>                    region,</div><div>                    dest_name,</div><div>                    increment,</div><div>                    min_duration,</div>


<div>                    max_duration,</div><div>                    max_price</div><div>                    ) values (</div><div>                    &#39;0&#39;,</div><div>                    &#39;&#39;,</div><div>                    &#39;&#39;,</div>


<div>                    &#39;&#39;,</div><div>                    &#39;1&#39;,</div><div>                    &#39;USA&#39;,</div><div>                    &#39;&#39;,</div><div>                    &#39;0&#39;,</div><div>

                    &#39;0&#39;,</div>
<div>                    &#39;0&#39;,</div><div>                    &#39;&#39;</div><div>                    ): Unknown column &#39;region&#39; in &#39;field list&#39; (1054)</div></div><div><br></div><div><br></div><div>


If I move the region field from it&#39;s position to the third column that gets rid of that error but now I get:</div><div><br></div><div><div>Reading file /var/spool/cdrtool/destinations.csv</div><div>Importing destinations from /var/spool/cdrtool/destinations.csv for reseller 0:</div>


<div>Skipped 13127 records</div></div><div><br></div><div>Here are two records and the header from destinations.csv</div><div><br></div><div><table border="0" cellpadding="0" cellspacing="0" width="804" style="border-collapse:collapse;width:804pt">



 <col width="26" style="width:26pt">
 <col width="46" style="width:46pt">
 <col width="70" style="width:70pt">
 <col width="41" style="width:41pt">
 <col width="45" style="width:45pt">
 <col width="59" style="width:59pt">
 <col width="73" style="width:73pt">
 <col width="266" style="width:266pt">
 <col width="26" style="width:26pt">
 <col width="47" style="width:47pt">
 <col width="49" style="width:49pt">
 <col width="56" style="width:56pt">
 <tbody><tr height="15" style="min-height:15.0pt">
  <td height="15" width="26" style="min-height:15.0pt;width:26pt">Ops</td>
  <td width="46" style="width:46pt">Reseller</td>
  <td width="70" style="width:70pt">Trusted peer</td>
  <td width="41" style="width:41pt">Region</td>
  <td width="45" style="width:45pt">Domain</td>
  <td width="59" style="width:59pt">Subscriber</td>
  <td width="73" style="width:73pt">Destination</td>
  <td width="266" style="width:266pt">Description</td>
  <td width="26" style="width:26pt">Incr</td>
  <td width="47" style="width:47pt">Min Dur</td>
  <td width="49" style="width:49pt">Max Dur</td>
  <td width="56" style="width:56pt">Max Price</td>
 </tr>
 <tr height="15" style="min-height:15.0pt">
  <td height="15" align="right" style="min-height:15.0pt">2</td>
  <td align="right">0</td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td align="right">1</td>
  <td>USA</td>
  <td align="right">0</td>
  <td align="right">6</td>
  <td align="right">0</td>
  <td></td>
 </tr>
 <tr height="15" style="min-height:15.0pt">
  <td height="15" align="right" style="min-height:15.0pt">2</td>
  <td align="right">0</td>
  <td></td>
  <td></td>
  <td></td>
  <td></td>
  <td align="right">1204</td>
  <td>CANADA MANITOBA</td>
  <td align="right">0</td>
  <td align="right">0</td>
  <td align="right">0</td>
  <td></td>
 </tr>

</tbody></table><br>



</div><div><br></div><div>I have been using 6.71 for quite some time with no issue&#39;s.</div><div><br></div><div>Any help would be most appreciated, probably missing something very obvious.</div><div><br></div><div>Regards,</div>


<div>Brian</div>
</blockquote></div><br><div><br></div><div><br></div><div>The sample customers,rates work fine.</div><div><br></div><div>I&#39;ve stripped down a destinations import to:</div><div><br></div><div><div>Ops,Reseller,Trusted peer,Domain,Subscriber,Destination,Description,Incr,Min Dur,Max Dur,Max Price</div>

<div>2,0,,,,1,USA,0,0,0,</div></div><div><br></div><div><br></div><div>When I run it:</div><div><br></div><div><div>Reading file /var/spool/cdrtool/destinations.csv</div><div>Importing destinations from /var/spool/cdrtool/destinations.csv for reseller 0:</div>

<div>Database error for query update destinations set</div><div>                    region             = &#39;USA&#39;,</div><div>                    dest_name          = &#39;0&#39;,</div><div>                    increment          = &#39;0&#39;,</div>

<div>                    min_duration       = &#39;0&#39;,</div><div>                    max_duration       = &#39;0&#39;,</div><div>                    max_price          = &#39;&#39;</div><div>                    where gateway      = &#39;&#39;</div>

<div>                    and reseller_id    = &#39;0&#39;</div><div>                    and domain         = &#39;&#39;</div><div>                    and subscriber     = &#39;&#39;</div><div>                    and dest_id        = &#39;1&#39;</div>

<div>                    : Unknown column &#39;region&#39; in &#39;field list&#39; (1054)</div></div><div><br></div><div><br></div><div>There seems to some major inconsistency between the scripts and docs..</div><div><br>

</div><div>Nowhere in any documentation is region mentioned?</div><div><br></div><div>Would appreciate any pointers.</div><div><br></div><div>TIA.</div><div><br></div><div>Brian</div><div><br></div>