[OpenSIPS-Users] INVITE not forwarded, call fails

lorenzo asymmetric at autistici.org
Wed Nov 25 18:31:59 CET 2009


On 24/11/09 14:59, Jeff Pyle wrote:
> Yes.  Trying adding this to the reply route:
> 
>         if (client_nat_test("1")) {
>                 fix_contact();
>         }
> 
> For reasons I can't remember, the only test that works for the reply route
> is "1", so you shouldn't change it.
> 
> Make sure you arm the reply route with t_on_reply() before t_relay.
> 
> 
> - Jeff

hi jeff, i tried following your solution (apart from the fact that the
parameter 1 isn't gonna work in my case, as the via header in the
packets i get doesn't have a private address), but it didn't work out..

maybe i'm not configuring it right.. here's the relevant sections (the
rest is unchanged):

### main request route

...	
if (is_method("REGISTER"))
{
	t_on_reply("8");
	t_relay();

	if (!save("location"))
		sl_reply_error();
	exit;
}

...


onreply_route[3] {
	if (client_nat_test("8")) {
		xlog("natted request rcvd from $fu\n");
		fix_contact();
	}
}

by examining the opensips log, i've concluded that i do enter the
onreply_route[3], but it's as if fix_contact() didn't update the user's
contact field, causing the INVITEs to get relayed to the wrong port.

moreover, with this cfg i'm now sometimes getting this error:
ERROR:core:udp_send: sendto(sock,0xb5f4ca58,1281,0,0xb5f00f0c,16):
Invalid argument(22)

it goes away if i run opensips with t_on_reply("n") commented out. strange..

does the fix_contact() feature require that i use a DB? 'cause i'm not.

thanks again,
lrnz



More information about the Users mailing list