<div dir="ltr"> Dear Nishar,<div><br></div><div>From the mentioned URL the configurations need the following changes.</div><div><br></div><div>On the top start on configs you need to use: WITH_PSTN and might not need WITH_ASTERISK</div>
<div><br></div><div><pre class="" style="margin-top:0px;margin-bottom:1.4em;padding:0.7em 1em;font-family:Consolas,'Andale Mono WT','Andale Mono','Bitstream Vera Sans Mono','Nimbus Mono L',Monaco,'Courier New',monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;overflow:auto;word-wrap:normal;border:1px solid rgb(204,204,204);line-height:19px">
<span class="" style="color:rgb(128,128,128);font-style:italic">#!KAMAILIO</span>
 
<span class="" style="color:rgb(128,128,128);font-style:italic">#!define WITH_MYSQL</span>
<span class="" style="color:rgb(128,128,128);font-style:italic">#!define WITH_AUTH</span>
<span class="" style="color:rgb(128,128,128);font-style:italic">#!define WITH_USRLOCDB</span>
<span class="" style="color:rgb(128,128,128);font-style:italic">#!define WITH_PSTN</span></pre></div><div>The insert your asterisk IP in the following line:</div><div><br></div><div><pre class="" style="margin-top:0px;margin-bottom:1.4em;padding:0.7em 1em;font-family:Consolas,'Andale Mono WT','Andale Mono','Bitstream Vera Sans Mono','Nimbus Mono L',Monaco,'Courier New',monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;overflow:auto;word-wrap:normal;border:1px solid rgb(204,204,204);line-height:19px">
pstn.<span class="" style="color:rgb(0,102,0)">gw_ip</span> <span class="" style="color:rgb(102,204,102)">=</span> <span class="" style="color:rgb(255,0,0)">"<AsteriskIPHere>"</span> desc <span class="" style="color:rgb(255,0,0)">"PSTN GW Address"</span></pre>
</div><div><br></div><div>Next your route[LOCATION] is called after the route[PSTN] from default config file so you'll have to put proper regexp/conditions to avoid your regular Extension to Extension calls to go out to PSTN-Asterisk.</div>
<div><br></div><div>Now in route[PSTN] add another condition to return from PSTN route when a local extension is dialed. </div><div><br></div><div><pre class="" style="margin-top:0px;margin-bottom:1.4em;padding:0.7em 1em;font-family:Consolas,'Andale Mono WT','Andale Mono','Bitstream Vera Sans Mono','Nimbus Mono L',Monaco,'Courier New',monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;overflow:auto;word-wrap:normal;border:1px solid rgb(204,204,204);line-height:19px">
<span class="" style="color:rgb(177,177,0)">if</span><span class="" style="color:rgb(102,204,102)">(</span><span class="" style="color:rgb(102,204,102)">!</span><span class="" style="color:rgb(102,204,102)">(</span>$rU<span class="" style="color:rgb(102,204,102)">=</span>~<span class="" style="color:rgb(255,0,0)">"^(\+|00)[1-9][0-9]{3,20}$"</span><span class="" style="color:rgb(102,204,102)">) || </span>$rU<span class="" style="color:rgb(102,204,102)">=</span>~<span class="" style="color:rgb(255,0,0)">"^([1-5]01[0-9]$"</span><span class="" style="color:rgb(102,204,102)">)</span><span style="color:rgb(102,204,102)">)</span></pre>
<pre class="" style="margin-top:0px;margin-bottom:1.4em;padding:0.7em 1em;font-family:Consolas,'Andale Mono WT','Andale Mono','Bitstream Vera Sans Mono','Nimbus Mono L',Monaco,'Courier New',monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;overflow:auto;word-wrap:normal;border:1px solid rgb(204,204,204);line-height:19px">
                <span class="" style="color:rgb(177,177,0)">return</span><span class="" style="color:rgb(102,204,102)">;</span></pre></div><div><br></div><div>That will ensure that your regular extensions set don't route out to PSTN asterisk and infact will enter the route[LOCATION] where a user location DB search is made and an online user is found for the dialed destination and a successful call will be established.</div>
<div><br></div><div>I think that should be all for now.</div><div><br></div><div>BR,</div><div>Sammy</div><div><br></div><div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 16, 2013 at 4:06 AM, Victor V. Kustov <span dir="ltr"><<a href="mailto:coyote@bks.tv" target="_blank">coyote@bks.tv</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, Nishar M.H!<br>
<div class="im"><br>
><br>
>ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio<br>
>start failed<br>
<br>
</div>see log for details. do not use dumb copy/paste for kamailio config.<br>
<br>
--<br>
 WBR, Victor<br>
 I use FREE operation system: 3.10.4-calculate GNU/Linux<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br></div></div>