Thanx...Bogdan ..It is working fine now.<br><br><br><br><div class="gmail_quote">On Fri, Aug 17, 2012 at 3:38 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a 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"><u></u>
<div bgcolor="#ffffff" text="#000000">
<tt>ah...so you have preloaded Route - try to take a look at the
opensips default script to see how the loose_route() function is
used in normal sequential routing (when you have a TO tag) and in
a preloaded initial request.<br>
<br>
Also I recommend you these short webinars:<br>
<a href="http://www.opensips.org/Resources/Webinars#toc12" target="_blank">http://www.opensips.org/Resources/Webinars#toc12</a><br>
<a href="http://www.opensips.org/Resources/Webinars#toc9" target="_blank">http://www.opensips.org/Resources/Webinars#toc9</a><br>
<br>
Regards,<br>
</tt><div class="im">
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<br></div><div><div class="h5">
On 08/16/2012 08:58 PM, Gomtesh Jain wrote:
<blockquote type="cite">Hi Bogdan,<br>
I put some more log messages...and found that if there are 2
routes in INVITE It execute <br>
<br>
<font size="1">if (loose_route()) {<br>
# mark routing logic in request<br>
xlog("L_NOTICE", "HERE OPENSIP CONF Loose Route
method ($rm) \n");<br>
route(1);<br>
exit;<br>
};</font><br>
piece of script and exit.<br>
<br>
while In case of 1 route this piece of script does not execute.<br>
<br>
Here I give you part of script ....<br>
<br>
<br>
<font size="1">route{<br>
# max_forwards==0, or excessively long requests<br>
xlog("L_NOTICE", "HERE OPENSIP CONF STARTS method
($rm) \n");<br>
if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br>
exit;<br>
};<br>
<br>
if (msg:len >= 2048 ) {<br>
sl_send_reply("513", "Message too big");<br>
exit;<br>
};<br>
<br>
if (nat_uac_test("1")) {<br>
fix_nated_contact();<br>
};<br>
# subsequent messages withing a dialog should take the<br>
# path determined by record-routing<br>
if (loose_route()) {<br>
# mark routing logic in request<br>
xlog("L_NOTICE", "HERE OPENSIP CONF Loose Route
method ($rm) \n");<br>
route(1);<br>
exit;<br>
};<br>
<br>
if (!((to_uri=~"@<a href="http://208.109.191.123" target="_blank">208.109.191.123</a>")||(to_uri=~"@.+<a href="http://3clogic.com" target="_blank">3clogic.com</a>")||(src_ip==50.16.212.126)))<br>
{<br>
sl_send_reply("403", "Relaying not allowed");<br>
exit;<br>
<br>
}<br>
# we record-route all messages -- to make sure that<br>
# subsequent messages will go through our proxy; that's<br>
# particularly good if upstream and downstream entities<br>
# use different transport protocol<br>
<br>
if (!method=="REGISTER")<br>
{<br>
xlog("L_NOTICE", "Before Add Record Route TCP
OPENSIPS \n");<br>
record_route();<br>
xlog("L_NOTICE", "Add Record Route TCP OPENSIPS
\n");<br>
}<br>
<br>
<br>
Thanx,<br>
Gomtesh<br>
</font><br>
<div class="gmail_quote">On Thu, Aug 16, 2012 at 7:37 PM,
Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#ffffff" text="#000000"> <tt>Well, that means
your script execution does not get there....try to place
more xlogs in the beginning of the script to see what's
the exec path in there.<br>
<br>
Regards,<br>
Bogdan<br>
</tt>
<div>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<br>
</div>
<div>
<div> On 08/16/2012 01:58 PM, Gomtesh Jain
wrote:
<blockquote type="cite">Hi Bogdan,<br>
I put 2 log messages before and after record_route
to make sure it gets executed.<br>
But I dont's see those messages in log 1st scenario
(2 route headers) while I can see both the message in
log in 2nd scenario (1 route header).<br>
<br>
Here I give INVITE messages in 1st scenario...<br>
<br>
<font size="1"><br>
</font><font><font size="1">INVITE <a href="http://sip:aa1@management.3clogic.com:5506" target="_blank">sip:aa1@management.3clogic.com:5506</a>
SIP/2.0<br>
Via: SIP/2.0/TCP
192.168.3.134:1323;rport;branch=z9hG4bKPj564512b7c47d4f1c91bf69b2616eea18<br>
Max-Forwards: 70<br>
From: <a>sip:aa1@management.3clogic.com:5506;tag=9fa0b4f78ee640dba4c6e0522c9c63a8</a><br>
To: <a href="http://sip:aa1@management.3clogic.com:5506" target="_blank">sip:aa1@management.3clogic.com:5506</a><br>
Contact: <a><sip:aa1@192.168.3.134:1321;transport=TCP;ob></a><br>
Call-ID: 8ba1014b656e4cdc968bcf4a9c92ae66<br>
CSeq: 3514 INVITE<br>
<b>Route: <a><sip:23.20.79.160:7060;transport=TCP;lr></a><br>
Route: <a><sip:208.109.191.105:8060;lr></a></b><br>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE,
SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS<br>
Supported: replaces, 100rel, timer, norefersub<br>
Session-Expires: 300<br>
Min-SE: 90<br>
User-Agent: WebAstra<br>
X-Info:
normal;;P=;L=;S=Out;A=aa1;CI=;CS=1;PI=1;CP=1<br>
Content-Type: application/sdp<br>
Content-Length: 259</font><br>
</font><br>
TCP Proxy fwds ...<br>
<font size="1"><br>
INVITE <a href="http://sip:aa1@management.3clogic.com:5506" target="_blank">sip:aa1@management.3clogic.com:5506</a>
SIP/2.0<br>
Via: SIP/2.0/UDP
23.20.79.160:7060;branch=z9hG4bK9618.b76ba1d3.0;i=fe<br>
Via: SIP/2.0/TCP
192.168.3.134:1323;received=115.252.66.182;rport=1323;branch=z9hG4bKPj564512b7c47d4f1c91bf69b2616eea18<br>
Max-Forwards: 69<br>
From: <a>sip:aa1@management.3clogic.com:5506;tag=9fa0b4f78ee640dba4c6e0522c9c63a8</a><br>
To: <a href="http://sip:aa1@management.3clogic.com:5506" target="_blank">sip:aa1@management.3clogic.com:5506</a><br>
Contact: <a><sip:aa1@115.252.66.182:1323;transport=TCP;ob></a><br>
Call-ID: 8ba1014b656e4cdc968bcf4a9c92ae66<br>
CSeq: 3514 INVITE<br>
Route: <a><sip:208.109.191.105:8060;lr></a><br>
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE,
SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS<br>
Supported: replaces, 100rel, timer, norefersub<br>
Session-Expires: 300<br>
Min-SE: 90<br>
User-Agent: WebAstra<br>
X-Info: normal;;P=;L=;S=Out;A=aa1;CI=;CS=1;PI=1;CP=1<br>
Content-Type: application/sdp<br>
Content-Length: 25</font><br>
<br>
<br>
Thanx,<br>
Gomtesh<br>
<br>
<br>
<div class="gmail_quote">On Thu, Aug 16, 2012 at 4:05
PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#ffffff" text="#000000"> <tt>You
say you do record_route(), but no RR header is
added to the request ? this is a bit hard to
believe ....are you sure your script ends to
the RR function ?<br>
<br>
Regards,<br>
</tt>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
<div>
<div> <br>
On 08/16/2012 01:23 PM, Gomtesh Jain wrote:
<blockquote type="cite">Hi Bogdan,<br>
I am doing ...<br>
<br>
if (!method=="REGISTER")<br>
{<br>
xlog("L_NOTICE", "Before Add
Record Route TCP OPENSIPS \n");<br>
record_route();<br>
xlog("L_NOTICE", "Add Record
Route TCP OPENSIPS \n");<br>
}<br>
<br>
in my config .<br>
<br>
<br>
But in 1st scenario it does not add record
route .So UA1 tries to send ACK directly
to "Other proxy". Which is wrong.<br>
<br>
<br>
While it adds record route in 2nd
scenario and all signalling works fine.<br>
<br>
<br>
Thanx,<br>
Gomtesh<br>
<br>
<br>
<br>
<br>
<div class="gmail_quote">On Thu, Aug 16,
2012 at 3:43 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Gomtesh,
<div><br>
<br>
On 08/14/2012 04:10 PM, Gomtesh Jain
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi,<br>
<br>
I am running opensips 1.6 as TCP
proxy. I am facing problem when I
use multiple proxy in my N/w.<br>
<br>
UA1------> TCP proxy(opensips
1.6)------->Other
Proxy--------> UA2<br>
<br>
UA1 adds 2 Route headers in
INVITE.<br>
In this scenario TCP proxy does
not add Record Route in INVITE.<br>
</blockquote>
</div>
How comes ?? don;t you do
record_route() on the opensips ??
<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
<br>
<br>
UA1------> TCP proxy(opensips
1.6)------------> UA2<br>
<br>
UA1 add only 1 Route header.<br>
In this scenario It works fine
with the same conf.<br>
</blockquote>
</div>
What "fine" means ? It means opensips
adds on route ? or ?<br>
<br>
Regards,<br>
Bogdan<br>
</blockquote>
</div>
<br>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
</div></div></div>
</blockquote></div><br>