[SR-Users] min expires question
Fabian Borot
fborot at hotmail.com
Fri Aug 19 16:04:03 CEST 2011
Hi Daniel, thank you for looking into this. I understand what you are saying and what is happening is very similar.
The linksys is set to 10 secs, so around 8 secs it sends a new registration. Kamailio replies with 30 but the linksys
ignores it and keeps sending the registration every 8 secs. But the fact is that the AOR is being updated every
8 seconds, as you can see below [at the bottom of the email], which can be a problem with a lot of customers
and registration interval of 2-3 secs.
mysql> select username,contact,received,expires,cseq,last_modified,user_agent from location where username = '300';
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
| username | contact | received | expires | cseq | last_modified | user_agent |
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
| 300 | sip:300 at 192.168.1.6:41264 | NULL | 2011-08-19 07:47:54 | 21584 | 2011-08-19 07:47:24 | Linksys/PAP2T-5.1.6(LS) |
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
1 row in set (0.00 sec)
mysql> select username,contact,received,expires,cseq,last_modified,user_agent from location where username = '300';
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
| username | contact | received | expires | cseq | last_modified | user_agent |
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
| 300 | sip:300 at 192.168.1.6:41264 | NULL | 2011-08-19 07:48:02 | 21585 | 2011-08-19 07:47:32 | Linksys/PAP2T-5.1.6(LS) |
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
1 row in set (0.00 sec)
mysql> select username,contact,received,expires,cseq,last_modified,user_agent from location where username = '300';
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
| username | contact | received | expires | cseq | last_modified | user_agent |
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
| 300 | sip:300 at 192.168.1.6:41264 | NULL | 2011-08-19 07:48:10 | 21586 | 2011-08-19 07:47:40 | Linksys/PAP2T-5.1.6(LS) |
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
1 row in set (0.00 sec)
mysql> select username,contact,received,expires,cseq,last_modified,user_agent from location where username = '300';
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
| username | contact | received | expires | cseq | last_modified | user_agent |
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
| 300 | sip:300 at 192.168.1.6:41264 | NULL | 2011-08-19 07:48:18 | 21587 | 2011-08-19 07:47:48 | Linksys/PAP2T-5.1.6(LS) |
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
1 row in set (0.00 sec)
mysql> select username,contact,received,expires,cseq,last_modified,user_agent from location where username = '300';
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
| username | contact | received | expires | cseq | last_modified | user_agent |
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
| 300 | sip:300 at 192.168.1.6:41264 | NULL | 2011-08-19 07:48:26 | 21588 | 2011-08-19 07:47:56 | Linksys/PAP2T-5.1.6(LS) |
+----------+---------------------------+----------+---------------------+-------+---------------------+-------------------------+
1 row in set (0.00 sec)
REGISTER sip:192.168.1.194 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.6:41264;branch=z9hG4bK-9b668c64
From: 300 <sip:300 at 192.168.1.194>;tag=b5ca67bbbdf6bco0
To: 300 <sip:300 at 192.168.1.194>
Call-ID: f9529c78-63628117 at 172.31.196.45
CSeq: 21584 REGISTER
Max-Forwards: 70
Authorization: Digest username="300",realm="192.168.1.194",nonce="Tk5OZ05OTTsZu75W6fbHxQjiBwnTxMwHdJ7+cYA=",uri="sip:192.168.1.194",algorithm=MD5,response="14e9fb5fe39d959ad92fc08f0aed1539"
Contact: 300 <sip:300 at 192.168.1.6:41264>;expires=10
User-Agent: Linksys/PAP2T-5.1.6(LS)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.6:41264;branch=z9hG4bK-9b668c64
From: 300 <sip:300 at 192.168.1.194>;tag=b5ca67bbbdf6bco0
To: 300 <sip:300 at 192.168.1.194>;tag=b27e1a1d33761e85846fc98f5f3a7e58.c5d8
Call-ID: f9529c78-63628117 at 172.31.196.45
CSeq: 21584 REGISTER
Contact: <sip:300 at 192.168.1.6:41264>;expires=30
Server: kamailio (3.1.4 (x86_64/linux))
Content-Length: 0
REGISTER sip:192.168.1.194 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.6:41264;branch=z9hG4bK-5777b8c
From: 300 <sip:300 at 192.168.1.194>;tag=b5ca67bbbdf6bco0
To: 300 <sip:300 at 192.168.1.194>
Call-ID: f9529c78-63628117 at 172.31.196.45
CSeq: 21585 REGISTER
Max-Forwards: 70
Authorization: Digest username="300",realm="192.168.1.194",nonce="Tk5OZ05OTTsZu75W6fbHxQjiBwnTxMwHdJ7+cYA=",uri="sip:192.168.1.194",algorithm=MD5,response="14e9fb5fe39d959ad92fc08f0aed1539"
Contact: 300 <sip:300 at 192.168.1.6:41264>;expires=10
User-Agent: Linksys/PAP2T-5.1.6(LS)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.6:41264;branch=z9hG4bK-5777b8c
From: 300 <sip:300 at 192.168.1.194>;tag=b5ca67bbbdf6bco0
To: 300 <sip:300 at 192.168.1.194>;tag=b27e1a1d33761e85846fc98f5f3a7e58.7c3e
Call-ID: f9529c78-63628117 at 172.31.196.45
CSeq: 21585 REGISTER
Contact: <sip:300 at 192.168.1.6:41264>;expires=30
Server: kamailio (3.1.4 (x86_64/linux))
Content-Length: 0
REGISTER sip:192.168.1.194 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.6:41264;branch=z9hG4bK-e85319a5
From: 300 <sip:300 at 192.168.1.194>;tag=b5ca67bbbdf6bco0
To: 300 <sip:300 at 192.168.1.194>
Call-ID: f9529c78-63628117 at 172.31.196.45
CSeq: 21586 REGISTER
Max-Forwards: 70
Authorization: Digest username="300",realm="192.168.1.194",nonce="Tk5OZ05OTTsZu75W6fbHxQjiBwnTxMwHdJ7+cYA=",uri="sip:192.168.1.194",algorithm=MD5,response="14e9fb5fe39d959ad92fc08f0aed1539"
Contact: 300 <sip:300 at 192.168.1.6:41264>;expires=10
User-Agent: Linksys/PAP2T-5.1.6(LS)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.6:41264;branch=z9hG4bK-e85319a5
From: 300 <sip:300 at 192.168.1.194>;tag=b5ca67bbbdf6bco0
To: 300 <sip:300 at 192.168.1.194>;tag=b27e1a1d33761e85846fc98f5f3a7e58.a8fb
Call-ID: f9529c78-63628117 at 172.31.196.45
CSeq: 21586 REGISTER
Contact: <sip:300 at 192.168.1.6:41264>;expires=30
Server: kamailio (3.1.4 (x86_64/linux))
Content-Length: 0
this is how the AOR in memory looks like if the linksys is set to 3 secs, it sends it roughly every 1 sec
[root at mia-sbc-registrar1 sbin]# ./kamctl ul show
Domain:: location table=512 records=1 max_slot=1
AOR:: 300
Contact:: sip:300 at 192.168.1.6:41264 Q=
Expires:: 29
Callid:: f9529c78-63628117 at 172.31.196.45
Cseq:: 21798
User-agent:: Linksys/PAP2T-5.1.6(LS)
State:: CS_DIRTY
Flags:: 0
Cflag:: 0
Socket:: udp:192.168.1.194:5060
Methods:: 4767
[root at mia-sbc-registrar1 sbin]# ./kamctl ul show
Domain:: location table=512 records=1 max_slot=1
AOR:: 300
Contact:: sip:300 at 192.168.1.6:41264 Q=
Expires:: 29
Callid:: f9529c78-63628117 at 172.31.196.45
Cseq:: 21799
User-agent:: Linksys/PAP2T-5.1.6(LS)
State:: CS_DIRTY
Flags:: 0
Cflag:: 0
Socket:: udp:192.168.1.194:5060
Methods:: 4767
[root at mia-sbc-registrar1 sbin]# ./kamctl ul show
Domain:: location table=512 records=1 max_slot=1
AOR:: 300
Contact:: sip:300 at 192.168.1.6:41264 Q=
Expires:: 29
Callid:: f9529c78-63628117 at 172.31.196.45
Cseq:: 21800
User-agent:: Linksys/PAP2T-5.1.6(LS)
State:: CS_DIRTY
Flags:: 0
Cflag:: 0
Socket:: udp:192.168.1.194:5060
Methods:: 4767
[root at mia-sbc-registrar1 sbin]# ./kamctl ul show
Domain:: location table=512 records=1 max_slot=1
AOR:: 300
Contact:: sip:300 at 192.168.1.6:41264 Q=
Expires:: 30
Callid:: f9529c78-63628117 at 172.31.196.45
Cseq:: 21801
User-agent:: Linksys/PAP2T-5.1.6(LS)
State:: CS_DIRTY
Flags:: 0
Cflag:: 0
Socket:: udp:192.168.1.194:5060
Methods:: 4767
[root at mia-sbc-registrar1 sbin]# ./kamctl ul show
Date: Fri, 19 Aug 2011 13:04:29 +0200
From: miconda at gmail.com
To: sr-users at lists.sip-router.org
CC: fborot at hotmail.com
Subject: Re: [SR-Users] min expires question
Hello,
On 8/18/11 6:20 PM, Fabian Borot wrote:
Hello
This is how my registrar module is configured, hoping that
min-expires set to 30 wont allow registration attempts more
often than 30 seconds, but if I configure a UAC to register
every 15 seconds I see that kamailio allows it. Shouldn't it
reply with "422 Session Interval Too Small" or "423 Interval Too
Brief"?
it will not allow a REGISTER with Expires value less than 30sec. But
even the phone sends a REGISTER with Expires 3600 (for example), it
can send again in 10 sec another REGISTER with Expires 3600. In
order to see if there is something incorrect, send us full REGISTER
requests and the replies.
Cheers,
Daniel
# ----- registrar params -----
modparam("registrar", "default_expires", 120)
modparam("registrar", "min_expires", 30)
modparam("registrar", "method_filtering", 1)
/* uncomment the next line to disable parallel forking via
location */
# modparam("registrar", "append_branches", 0)
/* uncomment the next line not to allow more than 10 contacts
per AOR */
#modparam("registrar", "max_contacts", 10)
131.380336 192.168.1.6 -> 192.168.1.194 SIP Request:
REGISTER sip:192.168.1.194
131.381174 192.168.1.194 -> 192.168.1.6 SIP Status: 200
OK (1 bindings)
144.386014 192.168.1.6 -> 192.168.1.194 SIP Request:
REGISTER sip:192.168.1.194
144.387110 192.168.1.194 -> 192.168.1.6 SIP Status: 200
OK (1 bindings)
157.395358 192.168.1.6 -> 192.168.1.194 SIP Request:
REGISTER sip:192.168.1.194
157.396340 192.168.1.194 -> 192.168.1.6 SIP Status: 200
OK (1 bindings)
170.404905 192.168.1.6 -> 192.168.1.194 SIP Request:
REGISTER sip:192.168.1.194
170.405771 192.168.1.194 -> 192.168.1.6 SIP Status: 200
OK (1 bindings)
183.414375 192.168.1.6 -> 192.168.1.194 SIP Request:
REGISTER sip:192.168.1.194
183.415217 192.168.1.194 -> 192.168.1.6 SIP Status: 200
OK (1 bindings)
txs fborot
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110819/4fad6e07/attachment-0001.htm>
More information about the sr-users
mailing list