<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><tt>Maybe, maybe not...<br>
<br>
Follow
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/TroubleShooting-Crash">http://www.opensips.org/Documentation/TroubleShooting-Crash</a> and
post the backtrace for your crash.<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
On 04.04.2014 14:19, Alexander Mustafin wrote:<br>
</div>
<blockquote
cite="mid:06D29803-410B-481C-AC59-F649CEB4E408@gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Hello!
<div><br>
</div>
<div>I can’t find commit in git for this problem. </div>
<div><br>
</div>
<div>Maybe, my problem related:</div>
<div><br>
</div>
<div>opensips[4065]: segfault at 0 ip (null) sp 00007fff64ade248
error 14 in opensips[400000+14c000]<br>
<div><br>
</div>
<div><br>
<div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; word-wrap: break-word;
-webkit-nbsp-mode: space; -webkit-line-break:
after-white-space; ">
<div>Best regards,</div>
<div>Alexander Mustafin</div>
<div><a moz-do-not-send="true"
href="mailto:mustafin.aleksandr@gmail.com">mustafin.aleksandr@gmail.com</a></div>
<div><br>
</div>
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br>
<div>
<div>27 марта 2014 г., в 2:08, Justin Zondagh <<a
moz-do-not-send="true" href="mailto:zondagh@gmail.com">zondagh@gmail.com</a>>
написал(а):</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">Thanks Bogdan, glad we could fix it.
<div><br>
</div>
<div>Regards,</div>
<div>Justin</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr">
<div><b><br>
</b></div>
<b>Justin Zondagh<br>
</b><a moz-do-not-send="true"
href="mailto:zondagh@gmail.com" target="_blank">zondagh@gmail.com</a><br>
<br>
Cape Town | South Africa
<div>skype: jrzondagh</div>
<div>m: +27 72 598 4887 | f: +27 86 546 1405</div>
<div>uk:<b> </b>+44 20 328 99610</div>
</div>
</div>
<br>
<br>
<div class="gmail_quote">On Wed, Mar 26, 2014 at 7:57
PM, Bogdan-Andrei Iancu <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div><tt>Hello Justin,<br>
<br>
Thanks for all your help - I managed to find
and fix the bug - please update from GIT and
try again.<br>
<br>
Best regards,<br>
</tt>
<div class="">
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com/" target="_blank">http://www.opensips-solutions.com</a></pre>
</div>
<div>
<div class="h5"> On 25.03.2014 21:31, Justin
Zondagh wrote:<br>
</div>
</div>
</div>
<div>
<div class="h5">
<blockquote type="cite">
<div dir="ltr">Hi Bogdan,
<div><br>
</div>
<div>I placed the LM_DBG as follows</div>
<div><br>
</div>
<div>
<div> if (
is_script_func_used("uac_auth", -1) )
{</div>
<div> /* load the
UAC_AUTH API as uac_auth() is invoked
from script */</div>
<div>
if(load_uac_auth_api(&uac_auth_api)<0){</div>
<div>
LM_ERR("can't load UAC_AUTH API,
needed for uac_auth()\n");</div>
<div> goto error;</div>
<div> }</div>
<div><br>
</div>
<div> LM_DBG("Loaded
uac_auth api as found in script");</div>
<div> }</div>
</div>
<div><br>
</div>
<div>But nothing appears in the log on
init.</div>
<div> <br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I'm using the uac_auth() in a failure
route</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>failure_route[ip_auth_fail]</div>
<div>{</div>
<div><br>
</div>
<div> if (t_check_status("401"))
{</div>
<div>
xlog("L_INFO","[$ci] Got 401 from
Proxy\n");</div>
<div><br>
</div>
<div>
avp_db_query("select password from
registrant where username =
'$(avp(authuser){s.escape.common})'","$avp(authpass)");</div>
<div><br>
</div>
<div> $avp(authrealm) =
"";</div>
<div><br>
</div>
<div> $avp(www) =
$(<reply>hdr(WWW-Authenticate));</div>
<div>
avp_subst("$avp(www)", "/Digest\s//");</div>
<div><br>
</div>
<div> #Get the realm from
the www-auth header</div>
<div> $var(numkvp) =
$(avp(www){csv.count});</div>
<div> $var(i) = 0;</div>
<div> while($var(i) <
$var(numkvp)) {</div>
<div><br>
</div>
<div> $var(temp)
= $(avp(www){s.select,$var(i),,});</div>
<div><br>
</div>
<div> if
($var(temp) =~ "realm.*") {</div>
<div>
$avp(authrealm) = $var(temp);</div>
<div>
avp_subst("$avp(authrealm)","/(realm=\")(.*)(\")/\2/");</div>
<div>
#$avp(authrealm) := "asterisk";</div>
<div> }</div>
<div><br>
</div>
<div> $var(i) =
$var(i) + 1;</div>
<div> }</div>
<div><br>
</div>
<div>
xlog("L_INFO","[$ci] authrealm is
[$avp(authrealm)], authuser is
[$avp(authuser)], authpass is
[$avp(authpass)]\n");</div>
<div><br>
</div>
<div> #No need for loop
prevention as Proxy sends 183 early
media recording saying password is
wrong, then sends 603</div>
<div><br>
</div>
<div> if (uac_auth()) {</div>
<div>
xlog("L_INFO","[$ci] Built auth,
sending back to Proxy\n");</div>
<div><br>
</div>
<div>
t_on_failure("ip_auth_fail");</div>
<div><br>
</div>
<div> # the $du
should really be uri as specified in
Record-Route in 401, but using reply's
source IP for now</div>
<div> $du =
"sip:" + $(<reply>si) + ":5060";</div>
<div><br>
</div>
<div>
xlog("L_INFO", "[$ci] Sending request
with Auth header to [$du]\n");</div>
<div> t_relay();</div>
<div><br>
</div>
<div> }</div>
<div> }</div>
<div><br>
</div>
<div> if (t_was_cancelled()) {</div>
<div> exit;</div>
<div> }</div>
<div> <br>
</div>
<div>}</div>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>
<div dir="ltr">
<div><b><br>
</b></div>
<b>Justin Zondagh<br>
</b><a moz-do-not-send="true"
href="mailto:zondagh@gmail.com"
target="_blank">zondagh@gmail.com</a><br>
<br>
Cape Town | South Africa
<div>skype: jrzondagh</div>
<div>m: <a moz-do-not-send="true"
href="tel:%2B27%2072%20598%204887"
value="+27725984887"
target="_blank">+27 72 598 4887</a>
| f: <a moz-do-not-send="true"
href="tel:%2B27%2086%20546%201405"
value="+27865461405"
target="_blank">+27 86 546 1405</a></div>
<div>uk:<b> </b><a
moz-do-not-send="true"
href="tel:%2B44%2020%20328%2099610"
value="+442032899610"
target="_blank">+44 20 328 99610</a></div>
</div>
</div>
<br>
<br>
<div class="gmail_quote">On Tue, Mar 25,
2014 at 7:28 PM, Bogdan-Andrei Iancu <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:bogdan@opensips.org"
target="_blank">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div><tt>Hello Justin,<br>
<br>
In the 1.10 code, in the UAC
module, in the mod_init
function, the binding to UAC
AUTH module is to be done. See
line 171 in modules/uac/uac.c<br>
<br>
<br>
if (
is_script_func_used("uac_auth",
-1) ) {<br>
/* load the UAC_AUTH API
as uac_auth() is invoked from
script */<br>
if(load_uac_auth_api(&uac_auth_api)<0){<br>
LM_ERR("can't load
UAC_AUTH API, needed for
uac_auth()\n");<br>
goto error;<br>
}<br>
}<br>
<br>
<br>
Maybe the is_script_func_used()
doesn't trigger properly there -
in what kind of route are you
using the uac_auth() function ?
Could you place a LM_DBG() in
that 'if' statement to see if it
goes in there ?<br>
<br>
Thank and regards,<br>
</tt>
<div>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com/" target="_blank">http://www.opensips-solutions.com</a></pre>
</div>
<div> On 25.03.2014 14:28, Justin
Zondagh wrote:<br>
</div>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Bogdan,
<div><br>
</div>
<div>
<div>I have found and fixed
the bug. The uac_auth_api
wasn't being loaded before
being called as you
suspected.</div>
<div><br>
</div>
<div>I added this code</div>
<div><br>
</div>
<div>
<div>
if(load_uac_auth_api(&uac_auth_api)
< 0){</div>
<div>
LM_INFO("Error loading
uac_auth_api");</div>
<div> goto
error;</div>
<div> }</div>
<div><br>
</div>
<div> <br>
</div>
<div>before calling the API
on the next line:</div>
<div>
<div><br>
</div>
<div> crd =
uac_auth_api._lookup_realm(
&auth->realm );</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Seems to work now...</div>
<div> <br>
</div>
<div>How do we commit this
to code base?</div>
<div> </div>
<div><br>
</div>
</div>
<div>Regards,</div>
<div>Justin</div>
<div><br>
</div>
</div>
</div>
<div>
<div class="gmail_extra"><br
clear="all">
<div>
<div dir="ltr">
<div><b><br>
</b></div>
<b>Justin Zondagh<br>
</b><a
moz-do-not-send="true"
href="mailto:zondagh@gmail.com"
target="_blank">zondagh@gmail.com</a><br>
<br>
Cape Town | South Africa
<div>skype: jrzondagh</div>
<div>m: <a
moz-do-not-send="true"
href="tel:%2B27%2072%20598%204887" value="+27725984887" target="_blank">+27
72 598 4887</a> | f: <a
moz-do-not-send="true"
href="tel:%2B27%2086%20546%201405" value="+27865461405" target="_blank">+27
86 546 1405</a></div>
<div>uk:<b> </b><a
moz-do-not-send="true"
href="tel:%2B44%2020%20328%2099610" value="+442032899610"
target="_blank">+44 20
328 99610</a></div>
</div>
</div>
<br>
<br>
<div class="gmail_quote">On
Tue, Mar 25, 2014 at 10:18
AM, Justin Zondagh <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:zondagh@gmail.com"
target="_blank">zondagh@gmail.com</a>></span>
wrote:<br>
<blockquote
class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div dir="ltr">They were
the wrong way round, but
swapped them and seems
to have the same issue:<br>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
_______________________________________________<br>
Users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<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><br>
</blockquote>
</div>
<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>