No, I'm not. I'm not sure what to do to completely remove the contact. Am I doing something wrong?<div><br></div><div>In a related problem... if I use remove_hf and insert_hf, it leaves the partial header without the "Contact" bit and angle brackets, and inserts a properly formatted Contact header. The call still completes. However, the 200 OK that comes back never seems to "work". The call never sets up. I'm not sure there is any point in troubleshooting without the headers being right. Right now I'm only doing this fix on INVITEs coming from the inside network.</div>
<div><br></div><div><br><div class="gmail_quote">On Wed, Nov 5, 2008 at 2:24 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Brett,<br>
<br>
are you doing any other changes on Contact hdr? like calling fix_nated_contact() or other function that might change the contact?<div class="Ih2E3d"><br>
<br>
Regards,<br>
Bogdan<br>
<br>
Brett Nemeroff wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="Ih2E3d">
Ok, I feel really silly. I've tried a dozen ways to rewrite the contact header.. Over and over it doesn't work. First I tried to replace the contact header (which is how I wanted to do it):<br>
subst('/^Contact: <sip:([0-9]+)@(.*)$/Contact: <sip:\1@64.174.184.141:5060;maddr=\2>/ig');<br>
<br>
That mostly worked, but produced a header that looks like this:<br></div>
Contact: <sip:5122033884@64.174.184.141:5060;maddr=<a href="http://10.10.67.190" target="_blank">10.10.67.190</a> <<a href="http://10.10.67.190" target="_blank">http://10.10.67.190</a>>><a href="http://sip:5125551212@10.10.67.190:5060" target="_blank">sip:5125551212@10.10.67.190:5060</a> <<a href="http://sip:5125551212@10.10.67.190:5060" target="_blank">http://sip:5125551212@10.10.67.190:5060</a>><div class="Ih2E3d">
<br>
<br>
In other words, it removed the angle braces from the original header, and put the substituted text before it. But it didn't remove the header, which matches the pattern<br>
<br>
I've even tried doing: subst('/^Contact:.*$//');<br>
and<br>
remove_hf("Contact");<br>
<br>
Both just removed the header field, but left the contents, WITHOUT the angle braces (see the line without a header FIELD):<br></div>
Call-ID: <a href="mailto:19380521914112008222455@10.10.67.190" target="_blank">19380521914112008222455@10.10.67.190</a> <mailto:<a href="mailto:19380521914112008222455@10.10.67.190" target="_blank">19380521914112008222455@10.10.67.190</a>>.<br>
CSeq: 1 INVITE.<br>
<a href="http://sip:5125551212@10.10.67.190:5060" target="_blank">sip:5125551212@10.10.67.190:5060</a> <<a href="http://sip:5125551212@10.10.67.190:5060" target="_blank">http://sip:5125551212@10.10.67.190:5060</a>><div class="Ih2E3d">
<br>
Supported: em,100rel,timer,replaces,path,early-session,resource-priority.<br>
Allow: REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE.<br>
<br>
I'm sure I must be doing something wrong. Is there a "right way" to change the contact header? Perhaps it's not something I can change with the standard toolset?<br>
<br>
-Brett<br>
<br></div><div class="Ih2E3d">
On Thu, Oct 30, 2008 at 10:22 AM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>> wrote:<br>
<br>
Hi Brett,<br>
<br>
Not sure you can do anything about - they detect you as behind nat<br>
because of the private IP in Contact....<br>
<br>
What you can do is to try (before sending the INVITE to the<br>
provider) to save the current contact IP in a uri param and to<br>
replace the contact IP with your own....Something like maddr<br>
<br>
When you get a sequential request , before loose_route(), replace<br>
the RURI IP with the value from param.<br>
<br>
Something like:<br>
<br>
INVITE : Contact: <sip:user@privIP> -> Contact:<br>
<sip:user@server_pub_IP;maddr=privIP><br>
<br>
BYE: RURI= sip:user@server_pub_IP;maddr=privIP -><br>
RURI=sip:user@privIP<br>
<br>
<br>
Regards,<br>
Bogdan<br>
<br>
Brett Nemeroff wrote:<br>
<br>
We're actually getting this problem sending calls to multiple<br>
providers.. is there possibly anything I'm dong that could be<br>
causing this?<br>
Thanks all,<br>
Brett<br>
<br>
<br>
<br>
On Thu, Oct 30, 2008 at 11:08 AM, Alex Hermann<br>
<<a href="mailto:alex@speakup.nl" target="_blank">alex@speakup.nl</a> <mailto:<a href="mailto:alex@speakup.nl" target="_blank">alex@speakup.nl</a>><br></div><div class="Ih2E3d">
<mailto:<a href="mailto:alex@speakup.nl" target="_blank">alex@speakup.nl</a> <mailto:<a href="mailto:alex@speakup.nl" target="_blank">alex@speakup.nl</a>>>> wrote:<br>
<br>
On Thursday 30 October 2008, Iņaki Baz Castillo wrote:<br>
> 2008/10/30 Brett Nemeroff <<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a><br>
<mailto:<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a>><br></div>
<mailto:<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a> <mailto:<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a>>>>:<div><div></div><div class="Wj3C7c">
<br>
<br>
> > Please note, the provider isn't sending the BYE to the<br>
internal address.<br>
> > The provider sends it to OpenSIPs Public address. Which is<br>
correct..<br>
><br>
> No, that's not correct, the RURI of the BYE from provider<br>
*MUST* be<br>
> the same as the RURI in the INVITE Contact the provider<br>
received.<br>
> The BYE is sent back to the public IP, of course, but<br>
it's routed<br>
> thanks to "Route" header (loose route).<br>
><br>
> This is the INVITE OpenSIPS sends to the provider:<br>
><br>
> U <a href="http://62.175.182.141:5060" target="_blank">62.175.182.141:5060</a> <<a href="http://62.175.182.141:5060" target="_blank">http://62.175.182.141:5060</a>><br>
<<a href="http://62.175.182.141:5060" target="_blank">http://62.175.182.141:5060</a>> -><br>
<a href="http://195.62.163.131:5060" target="_blank">195.62.163.131:5060</a> <<a href="http://195.62.163.131:5060" target="_blank">http://195.62.163.131:5060</a>><br>
<<a href="http://195.62.163.131:5060" target="_blank">http://195.62.163.131:5060</a>><br>
<br>
> INVITE sip:17475551212@195.62.163.131:5060;transport=udp<br>
SIP/2.0.<br>
> Contact: <<a href="http://sip:15125551234@10.10.67.190:5060" target="_blank">sip:15125551234@10.10.67.190:5060</a><br>
<<a href="http://sip:15125551234@10.10.67.190:5060" target="_blank">http://sip:15125551234@10.10.67.190:5060</a>><br>
<<a href="http://sip:15125551234@10.10.67.190:5060" target="_blank">http://sip:15125551234@10.10.67.190:5060</a>>>.<br>
<br>
><br>
> And this is the BYE the provider sends to OpenSIPS:<br>
><br>
> BYE <a href="http://sip:15125551234@62.175.182.141:5060" target="_blank">sip:15125551234@62.175.182.141:5060</a><br>
<<a href="http://sip:15125551234@62.175.182.141:5060" target="_blank">http://sip:15125551234@62.175.182.141:5060</a>><br>
<<a href="http://sip:15125551234@62.175.182.141:5060" target="_blank">http://sip:15125551234@62.175.182.141:5060</a>> SIP/2.0.<br>
<br>
<br>
Most probably the provider does wrong NAT detection. ie it does<br>
the equivalent<br>
of:<br>
<br>
if (nat_uac_test("1")) {<br>
fix_nated_contact();<br>
}<br>
t_relay();<br>
<br>
<br>
--<br>
Met vriendelijke groet,<br>
<br>
<br>
Alex Hermann<br>
SpeakUp<br>
T: 088-SPEAKUP (088-7732587)<br>
F: 088-7732588<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>><br>
<mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>>><br>
<br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
</div></div></blockquote>
<br>
</blockquote></div><br></div>