<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><tt>Thanks for the nice report, Ali - I'm already testing a fix
for this, and will keep you posted!</tt><br>
</p>
<pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 12.07.2017 16:26, Ali Raza wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1963922431.2029514.1499865970353.JavaMail.zimbra@timegroup.ae">
<div style="font-family: arial, helvetica, sans-serif; font-size:
12pt; color: #000000">
<div>Hello Guys,</div>
<div><br data-mce-bogus="1">
</div>
<div>I am new to OpenSIPS. I am currently test mid-registrar
module with FreeSwitch and I am facing a issue not sure if its
a bug or its me.</div>
<div><br data-mce-bogus="1">
</div>
<div>Let me explain whats happening:</div>
<div><br data-mce-bogus="1">
</div>
<div>I am running OpenSIPS mid-registrar in contact-throttling
mode(mode:1) with usrloc mode:0 - because mid-registrar was
crashing again and again then I saw the
post <a class="moz-txt-link-freetext" href="https://github.com/OpenSIPS/opensips/issues/1094">https://github.com/OpenSIPS/opensips/issues/1094</a> - so
that issue is now gone with usrloc mode:0.</div>
<div><br data-mce-bogus="1">
</div>
<div> When I run opensips my devices(soft phone: zopier and sip
phone: fanvil) register perfectly but as soon the registration
time for fanvilphone is reaching expiry(outging expiry)
opensips passes my registrartion request to freeswitch -
Freeswitch sends back 401unauthorised message which is
delivered to the phone by opensips. This time phone sends
register request with <span style="color: #000000;
font-family: arial, helvetica, sans-serif; font-size: 16px;
font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; orphans: 2; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width:
0px; background-color: #ffffff; text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;" data-mce-style="color: #000000;
font-family: arial, helvetica, sans-serif; font-size: 16px;
font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; orphans: 2; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width:
0px; background-color: #ffffff; text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;">AuthHeader</span> but this request
gets absorbed by mid-registrar and reply from UAC with
AuthHeader never reach UAS and freeswitch then remove the
registrartion from its database assuming the UAC is dead. But
when the softphone-Zopier outgoing register expiring somehow
Softphone sends the register request with <span style="color:
#000000; font-family: arial, helvetica, sans-serif;
font-size: 16px; font-style: normal; font-variant-ligatures:
normal; font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; orphans: 2; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width:
0px; background-color: #ffffff; text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;" data-mce-style="color: #000000;
font-family: arial, helvetica, sans-serif; font-size: 16px;
font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; orphans: 2; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width:
0px; background-color: #ffffff; text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;">AuthHeader</span> and as OpenSIPs
forwards 1 register request to freeswtich - Freeswitch renew
its registrartion. So softphone remain registered and works
fine.</div>
<div><br>
</div>
<div>2nd/Renew Registration from FanvilPhone:<br>
</div>
<div><br data-mce-bogus="1">
</div>
<div>1. UAC==Reg==>OpenSIPS==>FreeSwitch</div>
<div><br data-mce-bogus="1">
</div>
<div>2. FreeSwitch==401==>OpenSIPs==401==>UAC</div>
<div><br data-mce-bogus="1">
</div>
<div>3. UAC==Reg w/Auth-Header==>OpenSIPs(Absorbe by
mid-registrar: Returncode: 2)</div>
<div><br data-mce-bogus="1">
</div>
<div>4. OpenSIPs==Reply 200==>UAC (so actually phone thinks
its registered)</div>
<div><br data-mce-bogus="1">
</div>
<div>2nd/Renew Registration from SoftPhone Zopier:</div>
<div><br data-mce-bogus="1">
</div>
<div>1. SoftPhone==Reg w/Auth-Header==>OpenSIPs==<span
style="color: #000000; font-family: arial, helvetica,
sans-serif; font-size: 16px; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: #ffffff;
text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;"
data-mce-style="color: #000000; font-family: arial,
helvetica, sans-serif; font-size: 16px; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: #ffffff;
text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;">Reg
w/Auth-Header==>FreeSwitch</span></div>
<div><span style="color: #000000; font-family: arial, helvetica,
sans-serif; font-size: 16px; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: #ffffff;
text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;"
data-mce-style="color: #000000; font-family: arial,
helvetica, sans-serif; font-size: 16px; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: #ffffff;
text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;"><br
data-mce-bogus="1">
</span></div>
<div><span style="color: #000000; font-family: arial, helvetica,
sans-serif; font-size: 16px; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: #ffffff;
text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;"
data-mce-style="color: #000000; font-family: arial,
helvetica, sans-serif; font-size: 16px; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: normal; letter-spacing: normal; orphans: 2;
text-align: start; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-stroke-width: 0px; background-color: #ffffff;
text-decoration-style: initial; text-decoration-color:
initial; display: inline !important; float: none;">2.
FreeSwitch==Reply 200==>OpenSIPs==Reply
200==>SoftPhone-Zopier.</span></div>
<div><br data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
<div>MY OPENSIPS CONFIG -- USED FOR MID-REGISTRAR:</div>
<div><br data-mce-bogus="1">
</div>
<div>#### USeR LOCation module<br>
loadmodule "usrloc.so"<br>
modparam("usrloc", "nat_bflag", "NAT")<br>
modparam("usrloc", "db_mode", 0)<br>
modparam("usrloc", "use_domain", 1)<br>
</div>
<div><br data-mce-bogus="1">
</div>
<div>#### MID-REGISTRAR module<br>
loadmodule "mid_registrar.so"<br>
modparam("mid_registrar", "mode", 1) /* 0 = mirror / 1 = ct /
2 = AoR */<br>
modparam("mid_registrar", "outgoing_expires", 180) ##Set to
low for testing purpose.<br>
modparam("mid_registrar", "insertion_mode", 0) /* 0 = contact;
1 = path */<br>
</div>
<div><br data-mce-bogus="1">
</div>
<div>if ( !(is_method("REGISTER")) ) {<br>
if (check_source_address("10")) {<br>
xlog("looking up $ru!\n");<br>
if (!mid_registrar_lookup("location")) {<br>
t_reply("404", "Not Found");<br>
exit;<br>
}<br>
<br>
t_relay();<br>
exit;<br>
}<br>
}<br>
</div>
<div><br data-mce-bogus="1">
</div>
<div>if (is_method("REGISTER"))<br>
{<br>
#mid_registrar_save("location");<br>
xlog("BEFORE IT PASS TO MID-REG SAVE!");<br>
mid_registrar_save("","m");<br>
switch ($retcode) {<br>
case 1:<br>
xlog("forwarding REGISTER to main registrar
($$ci=$ci) - $fd\n");<br>
#Call script to set $ru - Testing! </div>
<div> #perl_exec("dest_host","$fd");<br>
$ru = <a class="moz-txt-link-rfc2396E" href="mailto:sip:dispatcher\@10.10.7.206:5070">"sip:dispatcher\@10.10.7.206:5070"</a>;<br>
xlog("NEW HOST VALUE: $ru");<br>
t_relay();<br>
break;<br>
case 2:<br>
xlog("absorbing REGISTER! ($$ci=$ci)\n");<br>
break;<br>
default:<br>
xlog("failed to save registration! ($$ci=$ci)\n");<br>
}<br>
exit;<br>
}<br>
</div>
<div><br data-mce-bogus="1">
</div>
<div><br data-mce-bogus="1">
</div>
<div>LET ME KNOW IF YOU NEED ANYTHING ELSE. </div>
<div><br data-mce-bogus="1">
</div>
<div>THANKS!</div>
<div><br data-mce-bogus="1">
</div>
<div data-marker="__SIG_PRE__">Regards<br>
Ali Raza<br>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>