[Serusers] 487 Request cancelled. The UA is not able to recognize the 487

Tor Setane tor.setane at ella.no
Fri May 7 14:29:07 CEST 2004


Hi,

I just got a headache trying to figure out what is wrong with this picture... The call below is from user 38140298 to 
38140299 and get canceled. First I sent a complaint to our supplier of residential gateways, but then I figured that it 
probably has something to do with my ugly ser.cfg.

The call does get canceled and the phone stops ringing, but I must have done something wrong. The first thing I noticed 
was that 38140299 inserts a tag in To header field on cancel, which I thought it wasn't supposed to, since the original 
invite (the request to be canceled) does not have tag in To.

When I sent this trace to my friends at Allied, the rg producer, they gave me this answer:

//quote begin

what is strange in the trace you sent us is the 487 sequence.
At first sip server (10.100.10.118) sends to RG (10.5.6.86)  a 487 message containing the following tags:
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=7b6e241b740a185eb7506969073a84c4-dbba.

and after it receives a 487 messages from the other RG (10.5.5.142)    containing the following tags:
Via: SIP/2.0/UDP 10.100.10.118;branch=z9hG4bK295f.7009663.0,SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.

The issue is that the SS should send the 487 to 10.5.6.86,after it received the 487 from the 10.5.5.142,so that the tag 
in the 487 received from 10.5.6.86 would have the correct value.But for stange reason 10.100.10.118 generate a 487 
message for 10.5.6.86(with its' own tag=7b6e241b740a185eb7506969073a84c4-dbba) before it received the same massage from 
10.5.5.142 (with the correct tag=AACcBgAJQVeQTwxx).
But in this way 10.5.6.86 is not able to recognize the 487,doesn't respond to the multiple messages sent to it,and after 
a while sends again a Cancel.

I hope this is clear:the issue is not on Rg behaviour but on 10.100.10.118,why does it generate this 487 messages?

quote end//

The reason I blame the rg is because canceled calls from a Cisco IP-phone to IP-phone looks normal, and also calls from 
Cisco gateway to rg. It only happens with calls originating from rg's.

Below is the call trace and my ser.cfg.

I really appreciate if someone can give me some hints here..

interface: eth0 (10.100.10.0/255.255.255.0)
filter: ip and ( port 5060 )
match: 38140298
#####
U 10.5.6.86:5060 -> 10.100.10.118:5060
INVITE sip:38140299 at ipt-server1.ivisjon.no;transport=UDP SIP/2.0.
User-Agent: ATI-RG613TX/2-0-1_13.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Contact: <sip:38140298 at 10.5.6.86:5060;transport=UDP>.
Max-Forwards: 70.
Supported: 100rel,replaces,timer.
Content-Length: 210.
Content-Type: application/sdp.
.
v=0.
o=- 1767702530 1 IN IP4 10.5.6.86.
s=ATI-SIP Call.
c=IN IP4 10.5.6.86.
t=0 0.
m=audio 50600 RTP/AVP 8 13 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:13 CN/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 100 trying -- your call is important to us.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25844 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

#
U 10.100.10.118:5060 -> 10.5.5.142:5060
INVITE sip:38140299 at 10.5.5.142:5060;transport=UDP SIP/2.0.
Record-Route: <sip:38140299 at 10.100.10.118;ftag=AABdaQAN2gAAHwxx;lr>.
User-Agent: ATI-RG613TX/2-0-1_13.
Via: SIP/2.0/UDP 10.100.10.118;branch=z9hG4bK295f.7009663.0.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Contact: <sip:38140298 at 10.5.6.86:5060;transport=UDP>.
Max-Forwards: 69.
Supported: 100rel,replaces,timer.
Content-Length: 210.
Content-Type: application/sdp.
.
v=0.
o=- 1767702530 1 IN IP4 10.5.6.86.
s=ATI-SIP Call.
c=IN IP4 10.5.6.86.
t=0 0.
m=audio 50600 RTP/AVP 8 13 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:13 CN/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.

#
U 10.5.5.142:5060 -> 10.100.10.118:5060
SIP/2.0 180 Ringing.
User-Agent: ATI-RG623TX/2-0-1_13.
Via: SIP/2.0/UDP 10.100.10.118;branch=z9hG4bK295f.7009663.0,SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Supported: 100rel,replaces,timer.
Content-Length: 0.
.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 180 Ringing.
User-Agent: ATI-RG623TX/2-0-1_13.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Supported: 100rel,replaces,timer.
Content-Length: 0.
.

#
U 10.5.6.86:5060 -> 10.100.10.118:5060
CANCEL sip:38140299 at ipt-server1.ivisjon.no;transport=UDP SIP/2.0.
User-Agent: ATI-RG613TX/2-0-1_13.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 CANCEL.
Contact: <sip:38140298 at 10.5.6.86:5060;transport=UDP>.
Max-Forwards: 70.
Supported: 100rel,replaces,timer.
Content-Length: 0.
.

#
U 10.100.10.118:5060 -> 10.5.5.142:5060
CANCEL sip:38140299 at 10.5.5.142:5060;transport=UDP SIP/2.0.
Record-Route: <sip:38140299 at 10.100.10.118;ftag=AABdaQAN2gAAHwxx;lr>.
User-Agent: ATI-RG613TX/2-0-1_13.
Via: SIP/2.0/UDP 10.100.10.118;branch=z9hG4bK295f.7009663.0.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 CANCEL.
Contact: <sip:38140298 at 10.5.6.86:5060;transport=UDP>.
Max-Forwards: 69.
Supported: 100rel,replaces,timer.
Content-Length: 0.
.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 200 cancelling.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 CANCEL.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25874 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 487 Request cancelled.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=7b6e241b740a185eb7506969073a84c4-dbba.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25874 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

#
U 10.5.5.142:5060 -> 10.100.10.118:5060
SIP/2.0 200 OK.
User-Agent: ATI-RG623TX/2-0-1_13.
Via: SIP/2.0/UDP 10.100.10.118;branch=z9hG4bK295f.7009663.0,SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 CANCEL.
Supported: 100rel,replaces,timer.
Record-Route: <sip:38140299 at 10.100.10.118;lr;ftag=AABdaQAN2gAAHwxx>.
Content-Length: 0.
.

#
U 10.5.5.142:5060 -> 10.100.10.118:5060
SIP/2.0 487 Request Cancelled.
User-Agent: ATI-RG623TX/2-0-1_13.
Via: SIP/2.0/UDP 10.100.10.118;branch=z9hG4bK295f.7009663.0,SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Supported: 100rel,replaces,timer.
Content-Length: 0.
.

#
U 10.100.10.118:5060 -> 10.5.5.142:5060
ACK sip:38140299 at 10.5.5.142:5060;transport=UDP SIP/2.0.
Via: SIP/2.0/UDP 10.100.10.118;branch=z9hG4bK295f.7009663.0.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
CSeq: 1 ACK.
User-Agent: Sip EXpress router(0.8.12 (i386/linux)).
Content-Length: 0.
.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 487 Request cancelled.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=7b6e241b740a185eb7506969073a84c4-dbba.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25874 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 487 Request cancelled.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=7b6e241b740a185eb7506969073a84c4-dbba.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25874 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

#############
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 487 Request cancelled.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=7b6e241b740a185eb7506969073a84c4-dbba.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25874 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 487 Request cancelled.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=7b6e241b740a185eb7506969073a84c4-dbba.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25874 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

###############
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 487 Request cancelled.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=7b6e241b740a185eb7506969073a84c4-dbba.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25874 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 487 Request cancelled.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=7b6e241b740a185eb7506969073a84c4-dbba.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25874 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

#####
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 487 Request cancelled.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=7b6e241b740a185eb7506969073a84c4-dbba.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25874 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 487 Request cancelled.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=7b6e241b740a185eb7506969073a84c4-dbba.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 INVITE.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25874 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

##############
U 10.5.6.86:5060 -> 10.100.10.118:5060
CANCEL sip:38140299 at ipt-server1.ivisjon.no;transport=UDP SIP/2.0.
User-Agent: ATI-RG613TX/2-0-1_13.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 CANCEL.
Contact: <sip:38140298 at 10.5.6.86:5060;transport=UDP>.
Max-Forwards: 70.
Supported: 100rel,replaces,timer.
Content-Length: 0.
.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 200 ok -- no more pending branches.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 CANCEL.
Server: Sip EXpress router (0.8.12 (i386/linux)).
Content-Length: 0.
Warning: 392 10.100.10.118:5060 "Noisy feedback tells:  pid=25844 req_src_ip=10.5.6.86 req_src_port=5060
in_uri=sip:38140299 at ipt-server1.ivisjon.no;transport=UDP out_uri=sip:38140299 at 10.5.5.142:5060;transport=UDP via_cnt==1".
.

#####
U 10.5.6.86:5060 -> 10.100.10.118:5060
CANCEL sip:38140299 at ipt-server1.ivisjon.no;transport=UDP SIP/2.0.
User-Agent: ATI-RG613TX/2-0-1_13.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 CANCEL.
Contact: <sip:38140298 at 10.5.6.86:5060;transport=UDP>.
Max-Forwards: 70.
Supported: 100rel,replaces,timer.
Content-Length: 0.
.

#
U 10.100.10.118:5060 -> 10.5.5.142:5060
CANCEL sip:38140299 at 10.5.5.142:5060;transport=UDP SIP/2.0.
Record-Route: <sip:38140299 at 10.100.10.118;ftag=AABdaQAN2gAAHwxx;lr>.
User-Agent: ATI-RG613TX/2-0-1_13.
Via: SIP/2.0/UDP 10.100.10.118;branch=z9hG4bK295f.a009663.0.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 CANCEL.
Contact: <sip:38140298 at 10.5.6.86:5060;transport=UDP>.
Max-Forwards: 69.
Supported: 100rel,replaces,timer.
Content-Length: 0.
.

#
U 10.5.5.142:5060 -> 10.100.10.118:5060
SIP/2.0 481 Call Leg/Transaction Does Not Exist.
User-Agent: ATI-RG623TX/2-0-1_13.
Via: SIP/2.0/UDP 10.100.10.118;branch=z9hG4bK295f.a009663.0,SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 CANCEL.
Content-Length: 0.
.

#
U 10.100.10.118:5060 -> 10.5.6.86:5060
SIP/2.0 481 Call Leg/Transaction Does Not Exist.
User-Agent: ATI-RG623TX/2-0-1_13.
Via: SIP/2.0/UDP 10.5.6.86:5060;branch=z9hG4bKAwBdaQxx.
From: 38140298 <sip:38140298 at ipt-server1.ivisjon.no;user=phone>;tag=AABdaQAN2gAAHwxx.
To: <sip:38140299 at ipt-server1.ivisjon.no>;tag=AACcBgAJQVeQTwxx.
Call-ID: AQBdaQxx at 10.5.6.86.
CSeq: 1 CANCEL.
Content-Length: 0.
.
My ser.cfg:

#
# $Id: ser.cfg,v 1.21.2.1 2003/07/30 16:46:18 andrei Exp $
#
# simple quick-start config script
#

# ----------- global configuration parameters ------------------------

#debug=3         # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no	# (cmd line: -E)

/* Uncomment these lines to enter debugging mode
debug=7
fork=no
log_stderror=yes
*/
listen=10.100.10.118
alias=10.100.10.118
check_via=no	# (cmd. line: -v)
dns=no           # (cmd. line: -r)
rev_dns=no      # (cmd. line: -R)
#port=5060
#children=4
fifo="/tmp/ser_fifo"
fifo_mode=0666
# ------------------ module loading ----------------------------------

# Uncomment this if you want to use SQL database
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
#loadmodule "/usr/local/lib/ser/modules/vm.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/permissions.so"
loadmodule "/usr/local/lib/ser/modules/uri.so"
# loadmodule "/usr/local/lib/ser/modules/exec.so"
loadmodule "/usr/local/lib/ser/modules/group.so"

# ----------------- setting module-specific parameters ---------------
# -- acc params --
# set the reporting log level
# modparam("acc", "failed_transactions", 1)
# modparam("acc", "report_cancels", 1)
modparam("acc", "log_flag", 2)
modparam("acc", "db_flag", 2)
modparam("acc", "db_missed_flag", 3)
# modparam("acc", "log_fmt", "cfst" )
# -- usrloc params --
# modparam("usrloc", "db_mode",   0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 1)
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth_db", "password_column", "password")

# -- rr params --
# add value to ;lr param to make some broken UAs happy
# modparam("rr", "enable_full_lr", 1)
# modparam("tm", "fr_inv_timer", 60) # applies to all transactions
# modparam("tm", "fr_timer", 15)

# -------------------------  request routing logic -------------------
# modparam("rr", "append_fromtag", 0)
# main routing logic

route{
	# initial sanity checks -- messages with
	# max_forwards==0, or excessively long requests
	if (!mf_process_maxfwd_header("10")) {
		sl_send_reply("483","Too Many Hops");
		break;
	};
	if ( msg:len > max_len ) {
		sl_send_reply("513", "Message too big");
		break;
	};

	# we record-route all messages -- to make sure that
	# subsequent messages will go through our proxy; that's
	# particularly good if upstream and downstream entities
	# use different transport protocol
	setflag(2);
	setflag(3);
	record_route();
	# loose-route processing
	if (loose_route()) {
		t_relay();
		break;
	};

	# if the request is for other domain use UsrLoc
	# (in case, it does not work, use the following command
	# with proper names and addresses in it)
	if (uri==myself) {
	lookup("aliases");
		if (method=="REGISTER") {

# Uncomment this if you want to use digest authentication
			if (!www_authorize("ipt-server1.ivisjon.no", "subscriber")) {
				www_challenge("ipt-server1.ivisjon.no", "0");
				break;
			};

			save("location");
			break;
		};
#	};
	if (method=="INVITE") {
		if (!allow_routing()) {
		sl_send_reply("403", "Forbidden");
		break;
		};
	};
#	};
	if (is_user_in("Request-URI", "voicemail")) {
	setflag(4);
	};
	if (is_user_in("Request-URI", "block-anonymous")) {
	setflag(5);
	};
	if (uri=~ "^sip:\*[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]@*")
	|  (uri=~ "^sip:38140200*@"){
	log("Forward to Voicemail\n");
	rewritehostport("10.100.10.119:5060");
	t_relay();
	break;
	};
	if (search("From:.*Anonymous") && isflagset(5)) {
		rewritehostport("10.100.10.119:5060");
		prefix("8512");
		t_relay();
		break;
	};
	# Route all but local to gw
	if (!does_uri_exist()) && (!search("From:.*asterisk")) { # && (uri=~ "^sip:[0-9][0-9]*@10.100.10.118")
	if lookup("location") {
		t_relay();
		break;
	};
		if (method=="INVITE") && (!proxy_authorize("ipt-server1.ivisjon.no","subscriber")) && (!search("From:.*@10.100.10.120")) {
		proxy_challenge("ipt-server1.ivisjon.no", "0");
		break;
		};
		if (method=="INVITE") && (uri=~ "^sip:[0-3,5-8][0-9][0-9][0-9][0-9][0-9][0-9][0-9]@ipt-server1.ivisjon.no")
		|  (uri=~ "^sip:[0-3,5-8][0-9][0-9][0-9][0-9][0-9][0-9][0-9]@10.100.10.118")
		&& (!search("From:.*@10.100.10.120")) {
			if (!is_user_in("credentials","pstn")) {
			sl_send_reply("403", " no permission for pstn calls");
			break;
			};
		};
		if (method=="INVITE") && (uri=~ "^sip:[4,9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]@ipt-server1.ivisjon.no")
		|  (uri=~ "^sip:[4,9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]@10.100.10.118")
		&& (!search("From:.*@10.100.10.120")) {
			if (!is_user_in("credentials","mobil")) {
			sl_send_reply("403", " no permission for mobil calls");
			break;
			};
		};
		if (method=="INVITE") && (uri=~ "^sip:00[0-9][0-9]*@ipt-server1.ivisjon.no")
		|  (uri=~ "^sip:00[0-9][0-9]*@10.100.10.118")
		&& (!search("From:.*@10.100.10.120")) {
			if (!is_user_in("credentials","international")) {
			sl_send_reply("403", " no permission for international calls");
			break;
			};
		};
		log("Forward to PSTN\n");
		rewritehostport("10.100.10.120:5060");
		t_relay_to_udp("10.100.10.120", "5060");
		break;
		};

	if (!lookup("location")) {
		sl_send_reply("404", "Not Found");
		break;
	};
	if (method == "INVITE" && isflagset(4)) {
		append_branch();
		rewritehostport("10.100.10.119:5060");
		prefix("**");
		t_relay();
		break;
	};
};
	# forward to current uri now; use stateful forwarding; that
	# works reliably even if we forward from TCP to UDP
	if (!t_relay()) {
		sl_reply_error();
	};
}

If you read this line, you have been very kind, since you had the patience to read through all this..

  ;)

Thank You!
Tor.




More information about the sr-users mailing list