[Serusers] Problem : Forwarding Routine to a NAT'd endpoint.
Ricardo Martinez
rmartinez at redvoiss.net
Tue May 30 00:29:39 CEST 2006
Hello List
I have a problem forwarding a number for a NAT'd endpoint. The
problem presents as follow.
For incoming calls to my SER users i load via
avp_load_radius("callee") the "forward options" for my users.
For example if a user has set the Call Forward ON and the set the
forwarded number, these options are loaded via avp_radius.
So for a incoming call to a user with Call Forward ON, the call is
then redirected to a Asterisk Box to handle the call.
I have no problem with this if the user is not NAT'd, even if is
NAT'd but the user is not registered i can forward the call to my Asterisk
Box via a special route (route[8]) without any problem. But if the NAT'd
endpoint is REGISTERED in my ser BOX like this :
aor : '5507515800'
~~~Contact(0x404cb198)~~~
domain : 'location'
aor : '5507515800'
Contact : 'sip:5507515800 at 192.168.1.100:5061'
Expires : 595
q :
Call-ID : '17b73476-132fa250 at 192.168.1.100'
CSeq : 2
User-Agent: 'Linksys/PAP2-3.1.3(LS)'
received : 'sip:111.76.148.248:46139'
State : CS_NEW
Flags : 1
next : (nil)
prev : (nil)
I'm even using rewritehostport (as indicated in my ser.cfg snipet)
route[8] {
xlog("L_INFO", "[%Tf] : Ruta [8] Enviando llamada a asterisk\n");
rewritehostport("111.76.154.101:5060");
route(4);
route(1);
}
the call is re-routed to the "received" parameter indicated in the register
RECORD. Please check the next debug taken in my ser box.
111.76.148.237 : Caller Endpoint
111.76.148.246 : SER Box
111.76.148.101 : Asterisk Box
111.76.148.248 : Called Enpoint (NAT'd)
U 111.76.148.237:5060 -> 111.76.148.246:5060
INVITE sip:5507515800 at sipvoiss.desa.redvoiss.net:5060 SIP/2.0.
Via: SIP/2.0/UDP 111.76.148.237:5060;branch=z9hG4bKf50b1f9ca.
Max-Forwards: 70.
Content-Length: 304.
To: sip:5507515800 at sipvoiss.desa.redvoiss.net:5060.
From: sip:2408100 at 111.76.148.237:5060;tag=acee04f44a858c7.
Call-ID: 12524b29b2c08e262bc8daef67f6dcf0 at 111.76.148.237.
CSeq: 1032746828 INVITE.
Supported: timer.
Content-Type: application/sdp.
Contact: sip:2408100 at 111.76.148.237:5060.
Supported: replaces.
.
v=0.
o=MxSIP 0 26 IN IP4 111.76.148.237.
s=SIP Call.
c=IN IP4 111.76.148.237.
t=0 0.
m=audio 4978 RTP/AVP 18 4 4 101.
a=rtpmap:18 G729/8000.
a=rtpmap:4 G723/8000.
a=rtpmap:4 G723/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:18 annexb=no.
a=fmtp:101 0-15.
a=sendrecv.
m=image 4980 udptl t38.
a=sendrecv.
U 111.76.148.246:5060 -> 111.76.148.237:5060
SIP/2.0 100 trying -- your call is important to us.
Via: SIP/2.0/UDP 111.76.148.237:5060;branch=z9hG4bKf50b1f9ca.
To: sip:5507515800 at sipvoiss.desa.redvoiss.net:5060.
From: sip:2408100 at 111.76.148.237:5060;tag=acee04f44a858c7.
Call-ID: 12524b29b2c08e262bc8daef67f6dcf0 at 111.76.148.237.
CSeq: 1032746828 INVITE.
Server: Sip EXpress router (0.9.3 (i386/linux)).
Content-Length: 0.
Warning: 392 111.76.148.246:5060 "Noisy feedback tells: pid=22321
req_src_ip=111.76.148.237 req_src_port=5060
in_uri=sip:5507515800 at sipvoiss.desa.redvoiss.net:5060
out_uri=sip:75755507515800 at 111.76.154.101:5060 via_cnt==1".
.
U 111.76.148.246:5060 -> 111.76.148.248:46139
INVITE sip:75755507515800 at 111.76.154.101:5060 SIP/2.0.
Record-Route: <sip:111.76.148.246;ftag=acee04f44a858c7;lr=on>.
Via: SIP/2.0/UDP 111.76.148.246;branch=z9hG4bK38bc.f157bcd5.0.
Via: SIP/2.0/UDP 111.76.148.237:5060;branch=z9hG4bKf50b1f9ca.
Max-Forwards: 16.
Content-Length: 306.
To: sip:5507515800 at sipvoiss.desa.redvoiss.net:5060.
From: sip:2408100 at 111.76.148.237:5060;tag=acee04f44a858c7.
Call-ID: 12524b29b2c08e262bc8daef67f6dcf0 at 111.76.148.237.
CSeq: 1032746828 INVITE.
Supported: timer.
Content-Type: application/sdp.
Contact: sip:2408100 at 111.76.148.237:5060.
Supported: replaces.
.
v=0.
o=MxSIP 0 26 IN IP4 111.76.148.237.
s=SIP Call.
c=IN IP4 111.76.148.246.
t=0 0.
m=audio 35068 RTP/AVP 18 4 4 101.
a=rtpmap:18 G729/8000.
a=rtpmap:4 G723/8000.
a=rtpmap:4 G723/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:18 annexb=no.
a=fmtp:101 0-15.
a=sendrecv.
m=image 35070 udptl t38.
a=sendrecv.
Why SER is routing the call to the "received" ip address insted of the ip
address indicated in my route[8] by the
rewritehostport("111.76.154.101:5060"); ???
Hope that someone can help me here
Is there a way to avoid this ?
Thanks !
Ricardo Martinez
More information about the sr-users
mailing list