<div dir="ltr"><div><div><div>Thanks Sammy. Really Sorry for that. until now i have never used Kamailio or other SIP servers. I am trying to learn that.<br><br></div>Once again thanks for your support.<br><br></div>Regards,<br>
<br></div>Nishar Hamsa<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Aug 18, 2013 at 2:40 PM, SamyGo <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Oh Dear Nishar,</p>
<p>Please google and see that there is an error in the regexp which gives error..don't you see an extra ( on the start..make a regexp yourself..what's the big deal? </p>
<p>I expect that at the very least you can write dial plan in asterisk to dial call TO kamailio peer when user 5XXX dials 1XXX or you need help in there too? <br>
If that is OK then you may need to at least tell your Kamailio to accept calls from asterisk source ip:port<br>
Please look at the route[FROM_ASTERISK] or enable WITH_IPAUTH and put IP&Port address of Asterisk in address table to get past the Authentication for calls coming in from asterisk to kamailio. </p>
<p>Please do some mailing list searching and working on your part as well before asking mailing list to give exact working solutions for your requirements.</p>
<p>Daniels' blog are THE BEST thing you will ever find to understand the configuration file and its flow. </p><div class="im HOEnZb">
<p>--<br>
Sammy</p>
<p>sent from a little smart phone </p>
</div><div class="HOEnZb"><div class="h5"><div class="gmail_quote">On Aug 18, 2013 3:08 PM, "Nishar M.H" <<a href="mailto:nisharmh85@gmail.com" target="_blank">nisharmh85@gmail.com</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Thanks sammy.<br><br></div>But when i added <br><pre 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-radius:2px 2px 2px 2px;overflow:auto;word-wrap:normal;border:1px solid rgb(204,204,204);line-height:19px">

$rU<span style="color:rgb(102,204,102)">=</span>~<span style="color:rgb(255,0,0)">"^([1-5]01[0-9]$"<br></span></pre><div class="gmail_extra">into that code it shows some errors. Thats why remove that line and used <span> <b>if</b></span><b><span>(</span><span>!</span><span>(</span>$rU<span>=</span>~<span>"^(\+|00)[1-9][0-9]{3,20}$"</span><span>)</span></b><span><b>) </b>there.<b><br>


<br><br></b></span></div><div class="gmail_extra"><span><b><br></b></span></div><div class="gmail_extra"><span>Now,<br><br></span></div><div class="gmail_extra"><span>I have created users in :<br><br></span></div><div class="gmail_extra">


<span>Asterisk Server (192.168.20.196) : 5555<br></span></div><div class="gmail_extra"><span>Kamailio Server (192.168.20.208) : 1000<br><br></span></div><div class="gmail_extra"><span>If i want to communicate from 5555 to 1000, what are the customization require on both server ?<br>


<br></span></div><div class="gmail_extra"><span>Like <b>5555 <------> 1000</b><br><br></span><br><span><span>How can i get the user events in asterisk that i have created in kamailio server<b> ?<br></b></span><br></span></div>


<div class="gmail_extra"><span><br></span></div><div class="gmail_extra"><span><br></span></div><div class="gmail_extra"><span><b><br><br><br></b></span></div><div class="gmail_extra"><span><b>Regards,<br><br></b></span></div>


<div class="gmail_extra"><span><b>Nishar Hamsa.<br></b></span></div><div class="gmail_extra"><span><b><br></b></span></div><div class="gmail_extra"><span><b><br></b></span></div><div class="gmail_extra"><br><div class="gmail_quote">


On Sun, Aug 18, 2013 at 1:39 PM, SamyGo <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


<p>Since you've removed the second regex  then only way to make call reach to Asterisk via PSTN route is when you dial anything that matches the mentioned regexp in your email I.e 001456223456 and look at your Asterisk cli for anything. </p>




<p>--<br>
Sammy</p><div>
<p>sent from a little smart phone </p>
</div><div><div><div class="gmail_quote">On Aug 18, 2013 10:13 AM, "Nishar M.H" <<a href="mailto:nisharmh85@gmail.com" target="_blank">nisharmh85@gmail.com</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div>HI,<br><br>I have used<span> <b>if</b></span><b><span>(</span><span>!</span><span>(</span>$rU<span>=</span>~<span>"^(\+|00)[1-9][0-9]{3,20}$"</span><span>)</span></b><span><b>)</b> and now i am able to start the kamailio using kamctl start<br>




<br></span></div><span>Here is the log  below.:<br></span><div><br><br>Aug 18 08:24:45 kamailio-VirtualBox /usr/local/sbin/kamailio[3757]: INFO: rr [rr_mod.c:159]: outbound module not available<br>Aug 18 08:24:45 kamailio-VirtualBox /usr/local/sbin/kamailio[3757]: INFO: usrloc [hslot.c:53]: locks array size 512<br>




Aug 18 08:24:45 kamailio-VirtualBox /usr/local/sbin/kamailio[3757]: INFO: auth [auth_mod.c:350]: auth: qop set, but nonce-count (nc_enabled) support disabled<br>Aug 18 08:24:45 kamailio-VirtualBox /usr/local/sbin/kamailio[3757]: INFO: <core> [udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 163840<br>




Aug 18 08:24:45 kamailio-VirtualBox /usr/local/sbin/kamailio[3757]: INFO: <core> [udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142<br>Aug 18 08:24:45 kamailio-VirtualBox /usr/local/sbin/kamailio[3757]: INFO: <core> [udp_server.c:179]: INFO: udp_init: SO_RCVBUF is initially 163840<br>




Aug 18 08:24:45 kamailio-VirtualBox /usr/local/sbin/kamailio[3757]: INFO: <core> [udp_server.c:230]: INFO: udp_init: SO_RCVBUF is finally 262142<br>Aug 18 08:24:45 kamailio-VirtualBox /usr/local/sbin/kamailio[3773]: INFO: ctl [io_listener.c:225]: io_listen_loop:  using epoll_lt io watch method (config)<br>




Aug 18 08:28:54 kamailio-VirtualBox /usr/local/sbin/kamailio[3771]: ERROR: mi_fifo [fifo_fnc.c:470]: fifo command domain_dump is not available<br>Aug 18 08:49:13 kamailio-VirtualBox /usr/local/sbin/kamailio[3764]: NOTICE: acc [acc.c:275]: ACC: call missed: timestamp=1376801353;method=INVITE;from_tag=ae70066a;to_tag=e90f3c6b;call_id=NmEwMzE3ZDBkNGEwZmRhODMwNDMzZDNkZmVjNGVmODM.;code=486;reason=Busy Here;src_user=1000;src_domain=192.168.20.208;src_ip=192.168.20.186;dst_ouser=1000;dst_user=1000;dst_domain=192.168.20.186<br>




<br></div><div>I am able to call sip to sip for internal purpose.<br><br></div><div>In Asterisk Server i have created a trunk and after the command "sip show peers" it show  like below :<br>localhost*CLI> sip show peers<br>




Name/username             Host                                    Dyn Forcerport ACL Port     Status      Description                      Realtime<br><b>kamailio                  192.168.20.208                                             5060     OK (1 ms)</b><br>




1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]<br><br></div><div>Now how can i test the calls are going through Asterisk ?<br><br></div><div><br></div><div><br><br></div><div>Thanks in advance.<br>




</div><div><br></div><div>Regards,<br><br></div><div>Nishar Hamsa<br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 17, 2013 at 1:06 PM, SamyGo <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p>Check regular expression as the logs state. Modify with correct one.</p>
<p>sent from a little smart phone </p><div><div>
<div class="gmail_quote">On Aug 17, 2013 2:03 PM, "Nishar M.H" <<a href="mailto:nisharmh85@gmail.com" target="_blank">nisharmh85@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div dir="ltr"><div><div><div><div><div><div><div><div>HI,<br><br></div>I have followed the same.<br><br></div>When i run :<br><br></div><b>kamctl start</b><br><br></div>I got the same error like :<br><br><b>INFO: Starting Kamailio :<br>






<br>ERROR: PID file /var/run/kamailio.pid does not exist -- Kamailio start failed</b><br><br></div>Here is the log file :<br><br>Aug 17 12:57:31 kamailio-VirtualBox kamailio: INFO: <core> [tcp_main.c:4846]: init_tcp: using epoll_lt as the io watch method (auto detected)<br>






Aug 17 12:57:31 kamailio-VirtualBox /usr/local/sbin/kamailio[2110]: INFO: rr [../outbound/api.h:49]: Failed to import bind_ob<br>Aug 17 12:57:31 kamailio-VirtualBox /usr/local/sbin/kamailio[2110]: INFO: rr [rr_mod.c:159]: outbound module not available<br>






Aug 17 12:57:31 kamailio-VirtualBox /usr/local/sbin/kamailio[2110]: INFO: usrloc [hslot.c:53]: locks array size 512<br>Aug 17 12:57:31 kamailio-VirtualBox /usr/local/sbin/kamailio[2110]: INFO: auth [auth_mod.c:350]: auth: qop set, but nonce-count (nc_enabled) support disabled<br>






Aug 17 12:57:31 kamailio-VirtualBox /usr/local/sbin/kamailio[2110]: ERROR: <core> [rvalue.c:3026]: Bad regular expression "^([1-5]01[0-9]$"(853,50-853,66)<br>Aug 17 12:57:31 kamailio-VirtualBox /usr/local/sbin/kamailio[2110]: ERROR: <core> [route.c:1214]: fixing failed (code=-1) at cfg:/usr/local/etc/kamailio//kamailio.cfg:857<br>






<br><br></div>Some issues is there with the pattern.<br><br></div>Regards,<br><br></div>Nishar Hamsa<br><div><div><div><div><br><br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">





On Sat, Aug 17, 2013 at 11:29 AM, SamyGo <span dir="ltr"><<a href="mailto:govoiper@gmail.com" target="_blank">govoiper@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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 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-radius:2px 2px 2px 2px;overflow:auto;word-wrap:normal;border:1px solid rgb(204,204,204);line-height:19px">

<span style="color:rgb(128,128,128);font-style:italic">#!KAMAILIO</span>
 
<span style="color:rgb(128,128,128);font-style:italic">#!define WITH_MYSQL</span>
<span style="color:rgb(128,128,128);font-style:italic">#!define WITH_AUTH</span>
<span style="color:rgb(128,128,128);font-style:italic">#!define WITH_USRLOCDB</span>
<span 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 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-radius:2px 2px 2px 2px;overflow:auto;word-wrap:normal;border:1px solid rgb(204,204,204);line-height:19px">

pstn.<span style="color:rgb(0,102,0)">gw_ip</span> <span style="color:rgb(102,204,102)">=</span> <span style="color:rgb(255,0,0)">"<AsteriskIPHere>"</span> desc <span 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 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-radius:2px 2px 2px 2px;overflow:auto;word-wrap:normal;border:1px solid rgb(204,204,204);line-height:19px">

<span style="color:rgb(177,177,0)">if</span><span style="color:rgb(102,204,102)">(</span><span style="color:rgb(102,204,102)">!</span><span style="color:rgb(102,204,102)">(</span>$rU<span style="color:rgb(102,204,102)">=</span>~<span style="color:rgb(255,0,0)">"^(\+|00)[1-9][0-9]{3,20}$"</span><span style="color:rgb(102,204,102)">) || </span>$rU<span style="color:rgb(102,204,102)">=</span>~<span style="color:rgb(255,0,0)">"^([1-5]01[0-9]$"</span><span style="color:rgb(102,204,102)">)</span><span style="color:rgb(102,204,102)">)</span></pre>







<pre 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-radius:2px 2px 2px 2px;overflow:auto;word-wrap:normal;border:1px solid rgb(204,204,204);line-height:19px">

                <span style="color:rgb(177,177,0)">return</span><span 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><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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi, Nishar M.H!<br>
<div><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><div><br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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></div></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><pre><br><code><span><code><span>Thanks & Regards,<br><br></span></code>--------------------------------------------------------------------------------------------<br>






<br><span style="font-family:arial narrow,sans-serif"><font><b>Nishar Hamsa<br><br></b></font></span><br><br><br><br><br></span></code><code><span><code><span>--------------------------------------------------------------------------------------------</span></code></span><br>






<br><br><span></span></code></pre></div>
</div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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>
<br></blockquote></div>
</div></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><pre><br><code><span><code><span>Thanks & Regards,<br><br></span></code>--------------------------------------------------------------------------------------------<br>




<br><span style="font-family:arial narrow,sans-serif"><font><b>Nishar Hamsa<br><br></b></font></span><br><br><br><br><br></span></code><code><span><code><span>--------------------------------------------------------------------------------------------</span></code></span><br>




<br><br><span></span></code></pre></div>
</div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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>
<br></blockquote></div>
</div></div><br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><pre><br><code><span><code><span>Thanks & Regards,<br><br></span></code>--------------------------------------------------------------------------------------------<br>


<br><span style="font-family:arial narrow,sans-serif"><font><b>Nishar Hamsa<br><br></b></font></span><br><br><br><br><br></span></code><code><span><code><span>--------------------------------------------------------------------------------------------</span></code></span><br>


<br><br><span></span></code></pre></div>
</div></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">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>
<br></blockquote></div>
</div></div><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>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><pre><br><code><span><code><span>Thanks & Regards,<br><br></span></code>--------------------------------------------------------------------------------------------<br>
<br><span style="font-family:arial narrow,sans-serif"><font><b>Nishar Hamsa<br><br></b></font></span><br><br><br><br><br></span></code><code><span><code><span>--------------------------------------------------------------------------------------------</span></code></span><br>
<br><br><span></span></code></pre></div>
</div>