No subject


Wed Jun 27 05:48:46 CEST 2012


<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">----authentication of INVIT=
E:</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:44 server /usr=
/sbin/kamailio[8588]: NOTICE: &lt;script&gt;: ---------------------- In r=
oute(AUTH), just before from_uri=3D=3Dmyself&nbsp;----------------------<=
/p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:44 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:583]: grep_sock_=
info - checking if host=3D=3Dus: 10=3D=3D9 &amp;&amp; [domain.ch] =3D=3D =
[127.0.0.1]&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:44 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:587]: grep_sock_=
info - checking if port 5060 (advertise 0) matches port 5060&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:44 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:583]: grep_sock_=
info - checking if host=3D=3Dus: 10=3D=3D15 &amp;&amp; [domain.ch] =3D=3D=
 [&lt;IP_ADDRESS_OF_KAMAILIO&gt;]&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:44 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:587]: grep_sock_=
info - checking if port 5060 (advertise 0) matches port 5060&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:44 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:583]: grep_sock_=
info - checking if host=3D=3Dus: 10=3D=3D9 &amp;&amp; [domain.ch] =3D=3D =
[127.0.0.1]&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:44 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:587]: grep_sock_=
info - checking if port 5060 (advertise 0) matches port 5060&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:44 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:583]: grep_sock_=
info - checking if host=3D=3Dus: 10=3D=3D15 &amp;&amp; [domain.ch] =3D=3D=
 [&lt;IP_ADDRESS_OF_KAMAILIO&gt;]&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:44 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:587]: grep_sock_=
info - checking if port 5060 (advertise 0) matches port 5060&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:44 server /usr=
/sbin/kamailio[8588]: NOTICE: &lt;script&gt;: ---------------------- from=
_uri=3D=3Dmyself evaluated as TRUE!!&nbsp;----------------------</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">----same dialog, routing of=
 ACK (response to 200 OK for invite):</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: INFO: &lt;script&gt;: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 ACK MSG, NEXT function: LOOSE_ROUTE() =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: rr [loose.c:85]: is_preloaded: No&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:583]: grep_sock_=
info - checking if host=3D=3Dus: 10=3D=3D9 &amp;&amp; [domain.ch] =3D=3D =
[127.0.0.1]&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:587]: grep_sock_=
info - checking if port 5060 (advertise 0) matches port 5060&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:583]: grep_sock_=
info - checking if host=3D=3Dus: 10=3D=3D15 &amp;&amp; [domain.ch] =3D=3D=
 [&lt;IP_ADDRESS_OF_KAMAILIO&gt;]&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:587]: grep_sock_=
info - checking if port 5060 (advertise 0) matches port 5060&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:583]: grep_sock_=
info - checking if host=3D=3Dus: 10=3D=3D9 &amp;&amp; [domain.ch] =3D=3D =
[127.0.0.1]&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:587]: grep_sock_=
info - checking if port 5060 (advertise 0) matches port 5060&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:583]: grep_sock_=
info - checking if host=3D=3Dus: 10=3D=3D15 &amp;&amp; [domain.ch] =3D=3D=
 [&lt;IP_ADDRESS_OF_KAMAILIO&gt;]&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [socket_info.c:587]: grep_sock_=
info - checking if port 5060 (advertise 0) matches port 5060&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: rr [loose.c:591]: Next hop: 'sip:&lt;IP_ADDR=
ESS_OF_KAMAILIO&gt;;lr=3Don' is loose router&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: rr [loose.c:641]: The last route URI: 'sip:&=
lt;IP_ADDRESS_OF_KAMAILIO&gt;;lr=3Don'&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: NOTICE: &lt;script&gt;: =3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3DLOOSE_ROUTE RETURNED TRUE =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: tm [t_lookup.c:1379]: DEBUG: t_newtran: msg =
id=3D3 , global msg id=3D2 , T on entrance=3D(nil)&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: tm [t_lookup.c:527]: t_lookup_request: start=
 searching: hash=3D15611, isACK=3D1&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: tm [t_lookup.c:485]: DEBUG: RFC3261 transact=
ion matching failed&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: tm [t_lookup.c:709]: DEBUG: t_lookup_request=
: no transaction found&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: tm [t_funcs.c:315]: SER: forwarding ACK &nbs=
p;statelessly &nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [msg_translator.c:206]: check_v=
ia_address(&lt;IP_ADDRESS_OF_SBCdevice&gt;, domain.ch, 0)&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [forward.c:609]: Sending: ACK s=
ip:&lt;IP_ADDRESS_OF_KAMAILIO&gt;;lr=3Don SIP/2.0^M Via: SIP/2.0/UDP &lt;=
IP_ADDRESS_OF_KAMAILIO&gt;;branch=3Dz9hG4bKcydzigwkX^M Via: SIP/2.0/UDP d=
omain.ch;received=3D&lt;IP_ADDRESS_OF_SBCdevice&gt;;branch=3Dz9hG4bKac144=
1389717^M Max-Forwards: 69^M From: "acc2" &lt;sip:acc2 at domain.ch&gt;;tag=3D=
1c254829012^M To: &lt;sip:acc1@&lt;IP_ADDRESS_OF_KAMAILIO&gt;;user=3Dphon=
e&gt;;tag=3D1c423881657^M Call-ID: 2547879162482012122242@&lt;IP_ADDRESS_=
OF_SBCdevice&gt;^M CSeq: 2 ACK^M Contact: &lt;sip:acc2 at domain.ch:5060&gt;=
^M Supported: em,timer,replaces,path,resource-priority^M Allow: REGISTER,=
OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE^M =
User-Agent: SBCdevice Content-Length: 0^M ^M .&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8588]: DEBUG: &lt;core&gt; [forward.c:611]: orig. len=3D59=
0, new_len=3D636, proto=3D1&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">...</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: &lt;core&gt; [parser/msg_parser.c:626]: &nbs=
p;method: &nbsp;&lt;ACK&gt;&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: &lt;core&gt; [parser/msg_parser.c:628]: &nbs=
p;uri: &nbsp; &nbsp; &lt;sip:&lt;IP_ADDRESS_OF_KAMAILIO&gt;;lr=3Don&gt;&n=
bsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: &lt;core&gt; [parser/msg_parser.c:630]: &nbs=
p;version: &lt;SIP/2.0&gt;&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: &lt;core&gt; [parser/parse_via.c:1286]: Foun=
d param type 232, &lt;branch&gt; =3D &lt;z9hG4bKcydzigwkX&gt;; state=3D16=
&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: &lt;core&gt; [parser/parse_via.c:2561]: end =
of header reached, state=3D5&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: &lt;core&gt; [parser/msg_parser.c:511]: pars=
e_headers: Via found, flags=3D2&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: &lt;core&gt; [parser/msg_parser.c:513]: pars=
e_headers: this is the first via&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">...</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: sl [sl_funcs.c:396]: DEBUG : sl_filter_ACK: =
to late to be a local ACK!&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">...</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: sanity [mod_sanity.c:255]: sanity checks res=
ult: 1&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: siputils [checks.c:106]: totag found&nbsp;</=
p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: INFO: &lt;script&gt;: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 ACK MSG, NEXT function: LOOSE_ROUTE() =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: rr [loose.c:108]: No Route headers found&nbs=
p;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: DEBUG: rr [loose.c:829]: There is no Route HF&nbsp;=
</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Aug 24 14:22:47 server /usr=
/sbin/kamailio[8589]: INFO: &lt;script&gt;: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3DLOOSE_ROUTE RETURNED FALSE =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">When I set alias=3Dserver.d=
omain.ch:5060, from_uri=3D=3Dmyself returns false (when determining if IN=
VITE should be authenticated,resulting in replying 100 trying instead of =
407 Proxy Auth Req) and loose_route() starts returning true and relays th=
e ACK correctly.</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">I can post more debug from =
this case also, but I didn't want to spam so much in one message.</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">If you would like to see it=
, please let me know.</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">So .. Shall I consider the =
loose_route() part fixed and assume that there MUST be a full name (hostn=
ame.domain:port) in the alias, when Kamailio is not used as a primary pro=
xy for the domain?</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">What about the from_uri=3D=3D=
myself part?</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">Martin</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">&nbsp;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">___________________________=
___________________________________<br />
&gt; Od: "Klaus Darilion" &lt;klaus.mailinglists at pernau.at&gt;<br />
&gt; Komu: "SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) =
- Users Mailing List" &lt;sr-users at lists.sip-router.org&gt;<br />
&gt; D&aacute;tum: 23.08.2012 15:04<br />
&gt; Predmet: Re: [SR-Users] Possible bug in authentication<br />
&gt;</p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">&gt; CC: miconda at gmail.com<=
/p>

<p style=3D"padding:0 0 0 0; margin:0 0 0 0;">The Route URI (sent by SBC)=
 must be identical to the Record-Route URI <br />
(inserted by Kamailio).<br />
<br />
To find out why loose_route returns FALSE increase log-level. <br />
loose_route uses the "ismyself" function to evaluate if the Route header =
<br />
addresses this Kamailio server. And the "ismyself" is very verbose when <=
br />
doing this check.<br />
<br />
regards<br />
Klaus<br />
<br />
On 23.08.2012 13:51, martian at centrum.sk wrote:<br />
&gt; Ok, so .. I have a session border controller device that is a contac=
t<br />
&gt; point for my SIP domain (SRV record in DNS set to its IP). All the<b=
r />
&gt; trafic goes through it and it does things like topology hiding etc..=
 The<br />
&gt; device forwards the INVITE messages to Kamailio, because of the rout=
ing.<br />
&gt;<br />
&gt; The loose_route was working strangely, because it did not behave as<=
br />
&gt; described in the documentation.<br />
&gt;<br />
&gt; Here is the sip message that it was suppose to pass:<br />
&gt;<br />
&gt; ACK sip:acc1 at domain.ch:5060 SIP/2.0<br />
&gt;<br />
&gt; Via: SIP/2.0/UDP domain.ch;branch=3Dz9hG4bKac386033013<br />
&gt;<br />
&gt; Max-Forwards: 70<br />
&gt;<br />
&gt; From: "acc2" &lt;sip:acc2 at domain.ch&gt;;tag=3D1c1749458918<br />
&gt;<br />
&gt; To: &lt;sip:acc1@&lt;IP_ADRESS_OF_KAMAILIO&gt;;user=3Dphone&gt;;tag=3D=
1c1892801634<br />
&gt;<br />
&gt; Call-ID: 17494024742382012111116@&lt;IP_ADDRESS_OF_SBC&gt;<br />
&gt;<br />
&gt; CSeq: 2 ACK<br />
&gt;<br />
&gt; Contact: &lt;sip:acc2 at domain.ch:5060&gt;<br />
&gt;<br />
&gt; Route: &lt;sip:&lt;IP_ADDRESS_OF_KAMAILIO&gt;;lr=3Don&gt;<br />
&gt;<br />
&gt; Supported: em,timer,replaces,path,resource-priority<br />
&gt;<br />
&gt; Allow:<br />
&gt; REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSC=
RIBE,UPDATE<br />
&gt;<br />
&gt; User-Agent: SBC_DEVICE<br />
&gt;<br />
&gt; Content-Length: 0<br />
&gt;<br />
&gt; As you can see, there is a Route header and a To_tag .. so the<br />
&gt; loose_route function should return true. But instead, it returned fa=
lse,<br />
&gt; then t_check_trans() also returned false and the routing logic exite=
d<br />
&gt; (exit;).<br />
&gt;<br />
&gt; This happens when the value of alias is not enclosed in double quote=
s.<br />
&gt;<br />
&gt; PS.: There is a "-" symbol in the domain name. Can't that be a probl=
em<br />
&gt; causing the need for the double quotes?<br />
&gt;<br />
&gt; PS2: Should there be only a domain name in the alias? or also the<br=
 />
&gt; hostname part? ... for example: &nbsp; domain.ch:5060 or server.doma=
in.ch:5060<br />
&gt;<br />
&gt; Martin<br />
&gt;<br />
&gt; ______________________________________________________________<br />
&gt; &nbsp;&gt; Od: "Daniel-Constantin Mierla" &lt;miconda at gmail.com&gt;<=
br />
&gt; &nbsp;&gt; Komu: "SIP Router - Kamailio (OpenSER) and SIP Express Ro=
uter (SER) -<br />
&gt; Users Mailing List" &lt;sr-users at lists.sip-router.org&gt;<br />
&gt; &nbsp;&gt; D&aacute;tum: 23.08.2012 12:21<br />
&gt; &nbsp;&gt; Predmet: Re: [SR-Users] Possible bug in authentication<br=
 />
&gt; &nbsp;&gt;<br />
&gt;<br />
&gt; Hello,<br />
&gt;<br />
&gt; On 8/23/12 11:54 AM, martian at centrum.sk &lt;mailto:martian at centrum.s=
k&gt; wrote:<br />
&gt;<br />
&gt; &nbsp; &nbsp; Hello to everybody.<br />
&gt;<br />
&gt; &nbsp; &nbsp; I am currently working with Kamailio 3.3.1 on RedHat.<=
br />
&gt;<br />
&gt; &nbsp; &nbsp; The "loose_route" function was not working correctly a=
nd I observed<br />
&gt; &nbsp; &nbsp; some very strange behaviour (not as one described in t=
he<br />
&gt; &nbsp; &nbsp; documentation of the function).<br />
&gt;<br />
&gt; &nbsp; &nbsp; I have found that there needs to be a port included in=
 the "alias"<br />
&gt; &nbsp; &nbsp; variable for the loose_route function to work correctl=
y.<br />
&gt;<br />
&gt; &nbsp; &nbsp; However, upon adding the port to alias, the INVITE mes=
sages were no<br />
&gt; &nbsp; &nbsp; longer authenticated (Kamailio just accepted them and =
didn't send<br />
&gt; &nbsp; &nbsp; proxy-auth header in 407 message).<br />
&gt;<br />
&gt; &nbsp; &nbsp; My alias:<br />
&gt;<br />
&gt; &nbsp; &nbsp; alias=3D"domain.ch:5060"<br />
&gt;<br />
&gt; &nbsp; &nbsp; Examining default routing logic, I found the problem h=
ere:<br />
&gt;<br />
&gt; &nbsp; &nbsp; if (is_method("REGISTER") || from_uri=3D=3Dmyself)<br =
/>
&gt;<br />
&gt; &nbsp; &nbsp; {<br />
&gt;<br />
&gt; &nbsp; &nbsp; # authenticate requests<br />
&gt;<br />
&gt; &nbsp; &nbsp; ...<br />
&gt;<br />
&gt; &nbsp; &nbsp; }<br />
&gt;<br />
&gt; &nbsp; &nbsp; The "from_uri=3D=3Dmyself" was no longer evaluated as =
true, because<br />
&gt; &nbsp; &nbsp; there was a port at the end of the alias.<br />
&gt;<br />
&gt; &nbsp; &nbsp; The FROM Header of the INVITE messages looks like:<br =
/>
&gt;<br />
&gt; &nbsp; &nbsp; From: "acc1" &lt;sip:acc1 at domain.ch&gt;;tag=3D12345<br=
 />
&gt;<br />
&gt; &nbsp; &nbsp; ..so .. no port number there.<br />
&gt;<br />
&gt; &nbsp; &nbsp; Btw, I have fixed this with replacing the "myself" lis=
t with my own<br />
&gt; &nbsp; &nbsp; defined variable MY_DOMAIN.<br />
&gt;<br />
&gt; &nbsp; &nbsp; #!define MY_DOMAIN ".*@domain.ch" &lt;mailto:.*@domain=
.ch&gt;<br />
&gt;<br />
&gt; &nbsp; &nbsp; So now the condition looks like this:<br />
&gt;<br />
&gt; &nbsp; &nbsp; if (is_method("REGISTER") || from_uri=3D~MY_DOMAIN)<br=
 />
&gt;<br />
&gt; &nbsp; &nbsp; {<br />
&gt;<br />
&gt; &nbsp; &nbsp; ...<br />
&gt;<br />
&gt; &nbsp; &nbsp; }<br />
&gt;<br />
&gt; &nbsp; &nbsp; I am not sure if this is a bug that needs to be fixed =
or not. I am<br />
&gt; &nbsp; &nbsp; just pointing my finger at it and I hope it will contr=
ibute to the<br />
&gt; &nbsp; &nbsp; development.<br />
&gt;<br />
&gt; &nbsp; &nbsp; Also, a valid description of this behavior (when using=
 port in<br />
&gt; &nbsp; &nbsp; alias) would be appreciated.<br />
&gt;<br />
&gt;<br />
&gt; if you enclose the value of the alias parameter in double quotes, th=
en<br />
&gt; it is taken as string value. If you want to set it to a host:port, t=
hen<br />
&gt; remove the double quotes:<br />
&gt;<br />
&gt; alias=3Ddomain.ch:5060<br />
&gt;<br />
&gt;<br />
&gt; Why do you say the loose_route() was working strangely? Do you add t=
he<br />
&gt; hostname as record-route, not the IP address? Detail more about what=
 you<br />
&gt; think is wrong with record routing/loose routing.<br />
&gt;<br />
&gt;<br />
&gt; Cheers,<br />
&gt; Daniel<br />
&gt;<br />
&gt; -- Daniel-Constantin Mierla -<a href=3D"http://www.asipto.comhttp//t=
witter.com/">http://www.asipto.comhttp://twitter.com/#</a>!/miconda &nbsp=
;-<a href=3D"http://www.linkedin.com/in/micondaKamailio">http://www.linke=
din.com/in/micondaKamailio</a> Advanced Training, Berlin, Nov 5-8, 2012 -=
<a href=3D"http://asipto.com/u/kat">http://asipto.com/u/kat</a><br />
&gt;<br />
&gt;<br />
&gt;<br />
&gt; _______________________________________________<br />
&gt; SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing l=
ist<br />
&gt; sr-users at lists.sip-router.org<br />
&gt; <a href=3D"http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-u=
sers">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><b=
r />
&gt;</p>


--_d32c_-------5621277849dcde159c8157e3b4652a48--

--_ca29_-------8a24849d3ce42c7fc7d7bdf187a05314--



More information about the sr-users mailing list