<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<div class="moz-cite-prefix">On 26/05/14 15:15, Yasin Caner wrote:<br>
</div>
<blockquote cite="mid:53833E57.1050702@netgsm.com.tr" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hey all;<br>
<br>
I am trying to remote registration between Kamailio and
Asterisk. I tried remote Registration with UAC module. But this
module doesn't work online. So that i wrote my remote registration
code, is below. But there is a little problem that i cant take
Authentication header to onfailure_route so that cannot forward
Auth to client. it is working well with uac_auth but gets this
error (" run_failure_handlers(): ERROR: run_failure_handlers:
Error in run_top_route ") so cannot trust this function.<br>
</blockquote>
<br>
this message can appear if the last action in failure route returns
a negative values. In other words, the error message could be
harmless. You should still use it, eventually give its content here
so we can analyze if it is the case of a negative reply code.<br>
<br>
Regarding what you tried before, it is not clear for me what you
tried to achieve.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote cite="mid:53833E57.1050702@netgsm.com.tr" type="cite">
How can i get Auth header to add<br>
<br>
Thanks for helps.<br>
<br>
My Code:<br>
<br>
<font face="Arial">route[REMOTEREG]{<br>
<br>
xlog("L_INFO","Remote Reg: $fd : $rm : $fU : $si : ");<br>
<br>
sql_xquery("ca","CALL kamailio.route_3xx( '$fd',
'$rm'); ","ra");<br>
<br>
xlog("L_INFO","Remote Reg:ip_addr:$xavp(ra=>ip_addr):
\n");<br>
<br>
if($xavp(ra=>ip_addr)!=$null){<br>
<br>
$avp(ipmiz)=$xavp(ra=>ip_addr);<br>
xlog("L_INFO","pump
it:$rU:$avp(ipmiz):$ru:$rd");<br>
$ru="sip:"+$fU+"@"+$avp(ipmiz);<br>
xlog("L_INFO","pump it
:new::$avp(ipmiz)");<br>
t_on_failure("REMOTE_AUTH");<br>
t_on_reply("REGISTER_SUC");<br>
if(!t_relay()){<br>
t_reply("408",
"have a problem");<br>
exit;<br>
}<br>
exit;<br>
}<br>
<br>
return;<br>
}<br>
<br>
failure_route[REMOTE_AUTH]{<br>
xlog("L_INFO","REMOTE_AUTH:$fU:$si$rm:$ci:$adu:ar:$ar");<br>
if ($T_reply_code == 401 or $T_reply_code == 407) {<br>
xlog("L_NOTICE", "Remote asked for
authentication ");<br>
#uac_auth();<br>
## need to add Authentication header.<br>
append_to_reply("Allow:$hdr(Allow) \r\n");<br>
t_reply("$T_reply_code","Unauthorized");<br>
}<br>
}<br>
<br>
onreply_route[REGISTER_SUC]{<br>
<br>
xlog("L_INFO","REGISTER_SUC");<br>
if(t_check_status("200")){<br>
if (!save("location"))<br>
{<br>
xlog("L_NOTICE", "Register yapilamadi");<br>
}<br>
exit;<br>
}<br>
<br>
<br>
}<br>
</font><br>
Request-Line: REGISTER <a class="moz-txt-link-freetext" href="sip:K1;transport=UDP">sip:K1;transport=UDP</a> SIP/2.0<br>
Message Header<br>
Via: SIP/2.0/UDP
U1:61185;branch=z9hG4bK-d8754z-597229c1c2842862-1---d8754z-;rport<br>
Max-Forwards: 70<br>
Contact:
<a class="moz-txt-link-rfc2396E" href="sip:At1@U1:61185;rinstance=0e0e0d00e8aa79f1;transport=UDP"><sip:At1@U1:61185;rinstance=0e0e0d00e8aa79f1;transport=UDP></a><br>
To: "At1"<a class="moz-txt-link-rfc2396E" href="sip:At1@K1;transport=UDP"><sip:At1@K1;transport=UDP></a><br>
From: "At1"<a class="moz-txt-link-rfc2396E" href="sip:At1@K1;transport=UDP"><sip:At1@K1;transport=UDP></a>;tag=cc6f1214<br>
Call-ID: MjYwOGQ0MTRmZTEwMzcxNDc2YjBhM2FlYTU3MjU5OWE.<br>
CSeq: 1 REGISTER<br>
Expires: 3600<br>
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE,
OPTIONS, INFO, SUBSCRIBE<br>
Supported: replaces, norefersub, extended-refer, timer,
X-cisco-serviceuri<br>
User-Agent: Z 3.0.19632 r19608<br>
Allow-Events: presence, kpml<br>
Content-Length: 0<br>
Request-Line: REGISTER <a class="moz-txt-link-freetext" href="sip:At1@UAS1">sip:At1@UAS1</a> SIP/2.0<br>
Message Header<br>
Via: SIP/2.0/UDP
K1;branch=z9hG4bKc19c.d20e7767bea000b39f25e178c4831a2b.0<br>
Via: SIP/2.0/UDP
U1:61185;branch=z9hG4bK-d8754z-597229c1c2842862-1---d8754z-;rport=61185<br>
Max-Forwards: 70<br>
Contact:
<a class="moz-txt-link-rfc2396E" href="sip:At1@U1:61185;rinstance=0e0e0d00e8aa79f1;transport=UDP"><sip:At1@U1:61185;rinstance=0e0e0d00e8aa79f1;transport=UDP></a><br>
To: "At1"<a class="moz-txt-link-rfc2396E" href="sip:At1@K1;transport=UDP"><sip:At1@K1;transport=UDP></a><br>
From: "At1"<a class="moz-txt-link-rfc2396E" href="sip:At1@K1;transport=UDP"><sip:At1@K1;transport=UDP></a>;tag=cc6f1214<br>
Call-ID: MjYwOGQ0MTRmZTEwMzcxNDc2YjBhM2FlYTU3MjU5OWE.<br>
CSeq: 1 REGISTER<br>
Expires: 3600<br>
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE,
OPTIONS, INFO, SUBSCRIBE<br>
Supported: replaces, norefersub, extended-refer, timer,
X-cisco-serviceuri<br>
User-Agent: Z 3.0.19632 r19608<br>
Allow-Events: presence, kpml<br>
Content-Length: 0<br>
Message Header<br>
Via: SIP/2.0/UDP
K1;branch=z9hG4bKc19c.d20e7767bea000b39f25e178c4831a2b.0;received=K1;rport=5060<br>
Via: SIP/2.0/UDP
U1:61185;branch=z9hG4bK-d8754z-597229c1c2842862-1---d8754z-;rport=61185<br>
From: "At1"<a class="moz-txt-link-rfc2396E" href="sip:At1@K1;transport=UDP"><sip:At1@K1;transport=UDP></a>;tag=cc6f1214<br>
To: "At1"<a class="moz-txt-link-rfc2396E" href="sip:At1@K1;transport=UDP"><sip:At1@K1;transport=UDP></a>;tag=as63346477<br>
Call-ID: MjYwOGQ0MTRmZTEwMzcxNDc2YjBhM2FlYTU3MjU5OWE.<br>
CSeq: 1 REGISTER<br>
Server: Thirdlane2<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER,
SUBSCRIBE, NOTIFY, INFO, PUBLISH<br>
Supported: replaces, timer<br>
WWW-Authenticate: Digest algorithm=MD5, realm="aaaa",
nonce="1b23af8f"<br>
Content-Length: 0 <br>
Status-Line: SIP/2.0 401 Unauthorized<br>
Message Header<br>
Via: SIP/2.0/UDP
U1:61185;branch=z9hG4bK-d8754z-597229c1c2842862-1---d8754z-;rport=61185<br>
To:
"At1"<a class="moz-txt-link-rfc2396E" href="sip:At1@K1;transport=UDP"><sip:At1@K1;transport=UDP></a>;tag=a98c7436060b0c2b493a17bc0f200923-ed9e<br>
From: "At1"<a class="moz-txt-link-rfc2396E" href="sip:At1@K1;transport=UDP"><sip:At1@K1;transport=UDP></a>;tag=cc6f1214<br>
Call-ID: MjYwOGQ0MTRmZTEwMzcxNDc2YjBhM2FlYTU3MjU5OWE.<br>
CSeq: 1 REGISTER<br>
Allow:INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE,
OPTIONS, INFO, SUBSCRIBE <br>
Server: NetGSM<br>
Content-Length: 0<br>
<br>
<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>