<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    On 10/21/11 3:36 PM, Arthur Alkhasyan wrote:
    <blockquote
cite="mid:CAJx9ktcv9z5D=7sfczxsNiimwyOYJ+PN35HnCWR_nMgf=BPFLg@mail.gmail.com"
      type="cite">Hi all,
      <div><br>
      </div>
      <div><span class="Apple-style-span" style="background-color:
          rgb(255, 255, 255);">
          <pre style="font-family: 'Times New Roman'; font-size: medium; ">I'm new to the list and new to the Kamailio. We are using Kamailio with Mysql to route calls between clients asterisks and SIP PSTN gateways. We have two inbound gateways and one outbound. I need to add outbound gateway and a few new features:</pre>
          <pre style="font-family: 'Times New Roman'; font-size: medium; ">1. Call routing between carriers based at prefixes added by asterisks. I would like to route all calls with prefix 99101 to gateway 1 and prefix 99102 to gateway 2. Prefix have to be striped out before sending call to carrier.</pre>
          <pre style="font-family: 'Times New Roman'; font-size: medium; ">2. Remote Call Forwarding. I have to setup RCF at Kamailio. All calls to the particular DID number have to be forward to another number. </pre>
          <pre><font class="Apple-style-span" face="'Times New Roman'" size="3">I found description for dialplan module and believe the module can work for me. I recompiled Kamailio with dialplan module support and added to config 

</font></pre>
          <pre><font class="Apple-style-span" face="'Times New Roman'" size="3"># ----- dialplan params -----
modparam("dialplan", "db_url", "mysql://openser:openserrw@localhost/openser")</font></pre>
          <pre><font class="Apple-style-span" face="'Times New Roman'" size="3">I did search and found this thread related to my problem:</font></pre>
          <pre><font class="Apple-style-span" face="'Times New Roman'" size="3"><a moz-do-not-send="true" href="http://lists.sip-router.org/pipermail/sr-users/2009-November/025416.html">http://lists.sip-router.org/pipermail/sr-users/2009-November/025416.html</a> </font></pre>
          <pre><font class="Apple-style-span" face="'Times New Roman'" size="3">I try to use kamctl to add rule to the MySQL and can't find proper syntax</font></pre>
          <pre><font class="Apple-style-span" face="'Times New Roman'" size="3">kamctl dialplan addrule 10 100 1 ^123+ 0 ^(123.+) 0030\1
-bash: syntax error near unexpected token `('</font></pre>
        </span></div>
    </blockquote>
    <br>
    try to enclose the parameters that have special characters between
    double or single quotes. Also, you may need to double the char '\',
    in case the shell expands the parameters (usually happens with
    double quoted parameters).<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Dec 5-8, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
  </body>
</html>