<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I think you might be better off with standard NAT-handling functions
from nathelper module, i.e. fix_nated_contact()<br>
g-)<br>
<br>
ravi reddy wrote:
<blockquote
 cite="midcfbb389b0609120603l75e2d3cex931e1d179e7c041@mail.gmail.com"
 type="cite">Hi&nbsp; Ricardo ,<br>
  <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I too need the same process which you had done by subst();
function. two weeks back i had posted a mail to ser-users . regarding
this issue.<br>
  <br>
&nbsp;&nbsp;&nbsp; because one call-shop with the small sip-proxy using private
ip-adress controls the remaing phones .&nbsp;&nbsp; and with one username i am
giving access to all phones so that&nbsp; i can bill for one account only .
  <br>
  <br>
&nbsp; but when a sip-phone registered to that callshop make call it
forwards to my SER with contact id <br>
as eg: <a href="mailto:12345@192.168.2.101">12345@192.168.2.101</a>
.so, the call comes in as it just requires authorise but when we hung
the phone the "BYE" messages are not recieving by both end parties
because SER is sending "BYE" messages to that contact-id that is
private ip so call became "idle" for 30-40 seconds and after it shut
down.
  <br>
  <br>
so now i need to rewrite the contact part of that private ip-address
and just use NAT ipadress<br>
of that sip-proxy(call-shop)<br>
  <br>
&nbsp;i saw your subst(); funct. in your mail but i dont know where and how
to use that,(I am not a programmer)
  <br>
  <br>
&nbsp;&nbsp; So how you suggest me to do that for rewriting any private
ip-adresss and replacing NAT-address so that the call will ends when it
recieve "BYE" message .<br>
  <br>
  <br>
below is the trace of that:<br>
  <br>
U <a
 style="color: rgb(255, 102, 102); background-color: rgb(255, 102, 102);"
 href="http://82.102.69.105:39871/" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">82.102.69.105:39871</a>
-&gt; <a href="http://81.21.33.35:5060/" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">
81.21.33.35:5060</a><br>
INVITE <a class="moz-txt-link-abbreviated" href="mailto:sip:99106883@81.21.33.35:5060">sip:99106883@81.21.33.35:5060</a> SIP/2.0.<br>
To: "99106883"&lt;<a href="mailto:sip:99106883@81.21.33.35"
 target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">sip:99106883@81.21.33.35
  </a> :5060&gt;.<br>
From: "12345"<a class="moz-txt-link-rfc2396E" href="mailto:sip:12345@81.21.33.35:5060">&lt;sip:12345@81.21.33.35:5060&gt;</a>;tag=c86b66ad8b9187c8.<br>
Via: SIP/2.0/UDP <a href="http://192.168.1.100:5060/" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">
192.168.1.100:5060</a>;branch=z9hG4bK-d87543-bcf89635
  <div>ebeba2e78782465686dfaf52-1--d87543-;rport. <br>
Via: SIP/2.0/UDP <a href="http://192.168.1.102/" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">
192.168.1.102
  </a>;branch=z9hG4bKf638e18b56022ea3.<br>
Call-ID: <a href="mailto:a78d5c993a9dd6b4@192.168.1.102"
 target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">a78d5c993a9dd6b4@192.168.1.102</a>.<br>
CSeq: 47344 INVITE.
  <br>
Record-Route: &lt;sip:<a href="http://192.168.1.100:5060/"
 target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">192.168.1.100:5060</a>&gt;.<br>
Contact: <span style="color: rgb(255, 0, 0);">&lt;sip:</span>
  <a style="color: rgb(255, 0, 0);" href="http://192.168.1.100:5060/"
 target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"><span
 style="background-color: rgb(51, 255, 51);">192.168.1.100:5060</span></a><span
 style="color: rgb(255, 0, 0);">&gt;.</span><br>
Max-Forwards: 69.<br>
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, OPTIONS, INFO,
SUBSCRIBE. <br>
Content-Type: application/sdp.<br>
Supported: replaces.<br>
User-Agent: Grandstream BT110 <a href="http://1.0.8.23/"
 target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
1.0.8.23</a><span></span> .<br>
Content-Length: 361.<br>
  <br>
Ricardo here i need to replace <br>
  <br>
&nbsp; contact&lt;sip:<a href="http://192.168.1.100">192.168.1.100</a>&gt;
with above NAT ip address<br>
  </div>
  <br>
that is with <a
 style="color: rgb(255, 102, 102); background-color: rgb(255, 255, 255);"
 href="http://82.102.69.105:39871/" target="_blank"
 onclick="return top.js.OpenExtLink(window,event,this)">82.102.69.105:39871</a><br>
&nbsp;<br>
how ??/ <br>
  <br>
please assist me so that i can solve my problem.<br>
  <br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Thank You.<br>
  <br>
Regards,<br>
Ravi. &nbsp;&nbsp;&nbsp; <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Serusers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Serusers@lists.iptel.org">Serusers@lists.iptel.org</a>
<a class="moz-txt-link-freetext" href="http://lists.iptel.org/mailman/listinfo/serusers">http://lists.iptel.org/mailman/listinfo/serusers</a>
  </pre>
</blockquote>
</body>
</html>