<div dir="ltr"><div>Hi!</div><div><br></div><div>Thanks for your interest in sip_reg and sip_monitor!</div><div><br></div><div>sip_reg.c is a very old tool in libeXosip. It's runs as a daemon, in background so..., to REGISTER a Contact header.</div><div>This Contact header can be a long term static URI, or anything to test.</div><div>It will reject any incoming call.</div><div>It will log into syslog so you may keep an eye on it and may be monitor connection with a service.</div><div>sip_reg.c is working, but I'm not using it and it may be uncomplete for some task.</div><div><br></div><div>sip_monitor is a very new version of sip_reg. It's a tool, not running in the background with the goal</div><div>of reporting in syslog proper logs on success or failure to connect on a service. I'm using it to monitor</div><div>a kamailo service.</div><div><br></div><div>In order to use one or the other, you need to install openssl + openssl-dev and libc-ares-dev + libc-ares-dev (<a href="https://c-ares.haxx.se/">https://c-ares.haxx.se/</a>)</div><div><br></div><div>$> git clone <a href="https://git.savannah.gnu.org/git/osip.git">https://git.savannah.gnu.org/git/osip.git</a><br></div><div>$> cd osip</div><div>$> ./autogen.sh</div><div><div>$> ./configure</div><div></div></div><div>$> make</div><div>$> make install</div><div><br></div><div>$> git clone <a href="https://git.savannah.nongnu.org/git/exosip.git">https://git.savannah.nongnu.org/git/exosip.git</a><br></div><div>$> cd osip</div><div>$> ./autogen.sh</div><div><div>$> ./configure</div><div></div></div><div>$> make</div><div>$> make install</div><div><br></div><div>To make sure you correctly have compiled eXosip with the dependancies, check in exosip-config.h if it contains</div><div> #define HAVE_ARES_H 1</div><div>and</div><div> #define HAVE_OPENSSL_SSL_H 1<br></div><div><br></div><div>Then, you can run sip_monitor. You get in syslog various information, including error or duration of the test:</div><div><br></div><div>$> /usr/local/bin/sip_monitor -r sip:<a href="http://antisip.com">antisip.com</a> -u <a href="mailto:sip%3Atest1@antisip.com">sip:test1@antisip.com</a> -U test1 -P THISISTHEPASSWORD -t TLS -s --outbound "<sip:<a href="http://sip.antisip.com">sip.antisip.com</a>;lr>"<br></div><div>sip_monitor[6439]: sip_monitor (5.1.3) up and running [testing on [TLS] REGISTER [sip:<a href="http://antisip.com">antisip.com</a>] From: [<a href="mailto:sip%3Atest1@antisip.com">sip:test1@antisip.com</a>] Username: [test1:*****] Route: [<sip:<a href="http://sip.antisip.com">sip.antisip.com</a>;lr>]<br>sip_monitor[6439]: [count=1] socket [<a href="http://sip.antisip.com">sip.antisip.com</a>] [sock=11] [pos=0] connected<br>sip_monitor[6439]: [count=2] socket [<a href="http://sip.antisip.com">sip.antisip.com</a>] [sock=11] [pos=0] connected (ssl in progress)<br>sip_monitor[6439]: [count=1] [ssl connect] succeeded [TLSv1.2]<br>sip_monitor[6439]: [TLS][duration:0,091s] REGISTER [401][Unauthorized]<br>sip_monitor[6439]: REGISTRATION REPORT:[SUCCESS] [TLS][duration:0,115s] REGISTER [200][OK]<br></div><div><br></div><div>WRONG PASSWORD:</div><div><br></div><div><div>$> /usr/local/bin/sip_monitor -r sip:<a href="http://sip4.antisip.com">sip4.antisip.com</a> -u <a href="mailto:sip%3Atest1@sip.antisip.com">sip:test1@sip.antisip.com</a> -U test1 -P THISISNOTTHEPASSWORD -t TLS -s --outbound "<sip:<a href="http://sip.antisip.com">sip.antisip.com</a>;lr>"<br></div><div></div></div><div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">sip_monitor[6357]: sip_monitor (5.1.3) up and running [testing on [TLS] REGISTER [sip:<a href="http://antisip.com">antisip.com</a>] From: [<a href="mailto:sip%3Atest1@antisip.com">sip:test1@antisip.com</a>] Username: [test1:*****] Route: [<sip:<a href="http://sip.antisip.com">sip.antisip.com</a>;lr>]<br>sip_monitor[6357]: [count=1] socket [<a href="http://sip.antisip.com">sip.antisip.com</a>] [sock=11] [pos=0] connected<br>sip_monitor[6357]: [count=2] socket [<a href="http://sip.antisip.com">sip.antisip.com</a>] [sock=11] [pos=0] connected (ssl in progress)<br>sip_monitor[6357]: [count=1] [ssl connect] succeeded [TLSv1.2]<br>sip_monitor[6357]: [TLS][duration:0,092s] REGISTER [401][Unauthorized]<br>sip_monitor[6357]: REGISTRATION REPORT:[FAILURE] [TLS][duration:0,116s] REGISTER [403][Wrong Password] err=Wrong Password<br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr"><br></div><div class="gmail_attr">WRONG CERTIFICATE VALIDATION: (Wrong SNI : FQDN is wrong)</div><div class="gmail_attr"><br></div><div><div>$> /usr/local/bin/sip_monitor -r sip:<a href="http://sip4.antisip.com">sip4.antisip.com</a> -u <a href="mailto:sip%3Atest1@sip.antisip.com">sip:test1@sip.antisip.com</a> -U test1 -P
THISISTHEPASSWORD
-t TLS -s --outbound "<sip:<a href="http://sip4.antisip.com">sip4.antisip.com</a>;lr>"<br></div><div></div></div><div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr"></div></div><div class="gmail_attr">sip_monitor[6496]: sip_monitor (5.1.3) up and running [testing on [TLS] REGISTER [sip:<a href="http://antisip.com">antisip.com</a>] From: [<a href="mailto:sip%3Atest1@antisip.com">sip:test1@antisip.com</a>] Username: [test1:*****] Route: [<sip:<a href="http://sip4.antisip.com">sip4.antisip.com</a>;lr>]<br>sip_monitor[6496]: [count=1] socket [<a href="http://sip4.antisip.com">sip4.antisip.com</a>] [sock=11] [pos=0] connected<br>sip_monitor[6496]: [count=1] socket [<a href="http://sip4.antisip.com">sip4.antisip.com</a>] [sock=11] [pos=0] connected (ssl in progress)<br>sip_monitor[6496]: [count=1] [TLS] invalid depth[0] [/CN=<a href="http://antisip.com">antisip.com</a>] [62:Hostname mismatch]<br>sip_monitor[6496]: [count=1] [ssl connect] error<br>sip_monitor[6496]: REGISTRATION REPORT:[FAILURE] [TLS][duration:1,391s] REGISTER [408][ ] err=[TLS] invalid depth[0] [/CN=<a href="http://antisip.com">antisip.com</a>] [62:Hostname mismatch]<br></div><div dir="ltr" class="gmail_attr"><br></div><div class="gmail_attr">"-v 6" option can be used to debug more. And other parameters for Contact, etc... By default, it's only fetching Contact.</div><div class="gmail_attr"><br></div><div class="gmail_attr">About sip_reg.c: There is less options in general, but more option for Contact header manipulation</div><div class="gmail_attr"><br></div><div class="gmail_attr">$> sip_reg -d -r sip:<a href="http://sip.antisip.com">sip.antisip.com</a> -u <a href="mailto:sip%3Atest1@sip.antisip.com">sip:test1@sip.antisip.com</a> -U test1 -P THISISTHEPASSWORD -t TCP -s -e 180 -m<br></div><div class="gmail_attr"><br></div><div class="gmail_attr">WIth "-d", it runs in foreground on console. Without "-d", it will fork and run for ever in background (if started correctly)</div><div class="gmail_attr"><br></div><div class="gmail_attr">Unfortunatly, it do not provide much info in the syslog. Only this kind:</div><div class="gmail_attr">Oct 5 13:59:49 antisip sip_reg[8245]: sip_reg (5.1.3) up and running [testing on [TCP] REGISTER [sip:<a href="http://sip.antisip.com">sip.antisip.com</a>] Expires [180] From: [<a href="mailto:sip%3Atest1@sip.antisip.com">sip:test1@sip.antisip.com</a>] Username: [test1:*****]]<br>Oct 5 13:59:49 antisip sip_reg[8245]: local port: 5060<br>Oct 5 13:59:49 antisip sip_reg[8245]: automasquerade enabled<br>Oct 5 13:59:50 antisip sip_reg[8245]: registrered successfully<br>Oct 5 13:59:50 antisip sip_reg[8245]: registrered successfully<br>Oct 5 13:59:50 antisip sip_reg[8245]: registrered successfully<br></div><div class="gmail_attr"><br></div><div class="gmail_attr"><br></div><div class="gmail_attr">Regards,</div><div class="gmail_attr">Aymeric</div><div class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">Le lun. 5 oct. 2020 à 13:30, Arsen Semenov <<a href="mailto:arsperger@gmail.com">arsperger@gmail.com</a>> a écrit :<br></div><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 Aymeric,</div><div><br></div><div>Can you please send a link to git repo with this tool?</div><div><br></div><div><br></div><div>Thanks</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Oct 3, 2020 at 9:05 PM Aymeric Moizard <<a href="mailto:amoizard@gmail.com" target="_blank">amoizard@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Hi,</div><div dir="auto"><br></div><div dir="auto">In libeXosip, latest release or git, I have made a new tool named "sip_monitor".</div><div dir="auto"><br></div><div dir="auto">The dependencies are libosip and c-ares.</div><div dir="auto"><br></div><div dir="auto">The tool can build many REGISTER for any protocol (UDP, TCP, TLS) with many variant of request-uri, from and contact or TLS certificate.</div><div dir="auto"><br></div><div dir="auto">It could be extended for more options.</div><div dir="auto"><br></div><div dir="auto">The latest git has also a new outbound proxy setting to have a different request-uri.</div><div dir="auto"><br></div><div dir="auto">Aymeric<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">Le sam. 3 oct. 2020 à 17:30, luke devon <<a href="mailto:luke_devon@yahoo.com" target="_blank">luke_devon@yahoo.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:10px"><div dir="ltr">Hi Team, </div><div dir="ltr"><br></div><div dir="ltr">May I check with you, Is there a SIP message generator available for the Kamailio? I want to test my setup using some test SIP messages.</div><div dir="ltr"><br></div><div dir="ltr">Many Thanks</div><div dir="ltr">Luke. </div></div></div>_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Arsen Semenov<br></div><div><br></div></div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><img src="http://sip.antisip.com/am48.png">Antisip - <a href="http://www.antisip.com" target="_blank">http://www.antisip.com</a><br></div></div>