Hi, ppl! I have installed OpenSER and radius server. OpenSER authorized all call through radius. How I can limit call duration by "Session-Timeout" attribute from radius ?
Nick 'TARANTUL' Novikov wrote:
Hi, ppl! I have installed OpenSER and radius server. OpenSER authorized all call through radius. How I can limit call duration by "Session-Timeout" attribute from radius ?
Try to use DIALOG module. Configure this module to use some AVP as "timeout_avp", mark needed dialog with "dlg_flag" then load AVP value from RADIUS response.
See at http://www.openser.org/docs/modules/1.2.x/dialog.html for more info about module params.
Sorry, I don't use this scenario but it must work in theory. I hope :-)
In openser 1.2 you cannot limit the duration of a call (openser will not disconnect a call). There is development effort to make this possible on openser 1.3, but not all the work has been completed.
Regards, Ovidiu Sas
On 8/27/07, Victor Gamov vit@lipetsk.ru wrote:
Nick 'TARANTUL' Novikov wrote:
Hi, ppl! I have installed OpenSER and radius server. OpenSER authorized all call through radius. How I can limit call duration by "Session-Timeout" attribute from radius ?
Try to use DIALOG module. Configure this module to use some AVP as "timeout_avp", mark needed dialog with "dlg_flag" then load AVP value from RADIUS response.
See at http://www.openser.org/docs/modules/1.2.x/dialog.html for more info about module params.
Sorry, I don't use this scenario but it must work in theory. I hope :-)
-- CU, Victor Gamov
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Tung,
first check using ngrep if the REGISTERs are replicated between the two servers.
regards, bogdan
Tung Tran wrote:
Hi all,
Please help me on this:
I want to deploy failover scenario using t_replicate function, here is apart of configuration SIP1:
######################################################################## # Request route 'REGISTER' ######################################################################## route[2] { xlog("L_INFO", "*-*- Jump to Route[2]: REGISTER procedure *-*-*\n"); sl_send_reply("100", "Trying"); if(src_ip=="SIP2 IP") {
xlog("L_INFO", "*-*-* Got REGISTER replication from peering,
Save location! \n"); save("location"); exit; }
if(nat_uac_test("19")) { fix_nated_register(); setbflag(6); xlog("L_INFO", "*-*-* Discovering UAC is behind NAT,
fix_nated_register - M=$rm RURI=$ru Contact=$ct bflag=$bF \n"); }
#if(!www_authorize("", "subscriber")) #{ # # www_challenge("", "0"); # exit; #} #consume_credentials(); if(!save("location")) { xlog("L_ERR", "*-*-* Saving contact failed - M=$rm RURI=$ru
F=$fu T=$tu IP=$si ID=$ci\n"); sl_reply_error(); exit; } add_rcv_param(); xlog("L_INFO", "*-*-* REPLICATE register to peering \n");
if(!t_replicate("sip:SIP2-IP:5060")) { xlog("L_ERR", "*-*-* Cannot contact to the peer, REPLICATION
failed\n"); };
xlog("L_INFO", "*-*-* Registration successful - M=$rm RURI=$ru
F=$fu T=$tu IP=$si ID=$ci\n"); xlog("L_INFO", "*-*-* End of Route[2]: REGISTER procedure *-*-*\n"); exit;
}
SIP2 config:
######################################################################## # Request route 'REGISTER' ######################################################################## route[2] { xlog("L_INFO", "*-*- Jump to Route[2]: REGISTER procedure *-*-*\n"); sl_send_reply("100", "Trying"); if(src_ip=="SIP1-IP") {
xlog("L_INFO", "*-*-* Got REGISTER replication from peering,
Save location! \n"); save("location"); exit; } if(nat_uac_test("19")) {
fix_nated_register(); setbflag(6); xlog("L_INFO", "*-*-* Discovering UAC is behind NAT,
fix_nated_register - M=$rm RURI=$ru Contact=$ct bflag=$bF \n"); }
#if(!www_authorize("", "subscriber")) #{ # # www_challenge("", "0"); # exit; #} #consume_credentials(); if(!save("location")) { xlog("L_ERR", "*-*-* Saving contact failed - M=$rm RURI=$ru
F=$fu T=$tu IP=$si ID=$ci\n"); sl_reply_error(); exit; }
add_rcv_param(); xlog("L_INFO", "*-*-* REPLICATE register to peering \n"); if (!t_replicate("sip:SIP1-IP:5060")) { xlog("L_ERR", "*-*-* Cannot contact to the peer, REPLICATION
failed\n"); };
xlog("L_INFO", "*-*-* Registration successful - M=$rm RURI=$ru
F=$fu T=$tu IP=$si ID=$ci\n"); xlog("L_INFO", "*-*-* End of Route[2]: REGISTER procedure *-*-*\n"); exit;
}
And here is the location table of both server:
SIP1;
mysql> select * from location; +----+-----------+--------+-----------------------------------------------+--------------------------+------+---------------------+-------+---------------------------------------------------+-------+---------------------+-------+--------+-----------------------------------+-----------------------+---------+ | id | username | domain | contact | received | path | expires | q | callid | cseq | last_modified | flags | cflags | user_agent | socket | methods | +----+-----------+--------+-----------------------------------------------+--------------------------+------+---------------------+-------+---------------------------------------------------+-------+---------------------+-------+--------+-----------------------------------+-----------------------+---------+ | 95 | 1016 | | sip:1016@192.168.1.202:5061;transport=udp | sip:203.190.172.49:44293 | NULL | 2007-08-28 11:28:31 | -1.00 | 0006d752-a91d0005-647e0f99-44142f0e@192.168.1.202 | 238 | 2007-08-28 11:27:31 | 0 | 64 | Cisco-CP7960G/8.0 | udp:116.193.69.3:5060 | NULL | | 98 | 1005 | | sip:1005@192.168.1.103:5060 | sip:203.190.172.49:41124 | NULL | 2007-08-28 11:28:41 | -1.00 | zxjvYGlwjx2VbuGu@192.168.1.103 | 22171 | 2007-08-28 11:27:41 | 0 | 64 | PA168S | udp:116.193.69.3:5060 | NULL | | 97 | 1001 | | sip:1001@192.168.1.66:8887 | sip:203.190.172.49:43767 | NULL | 2007-08-28 11:28:50 | -1.00 | a20a87250b56ff1b | 104 | 2007-08-28 11:27:50 | 0 | 64 | eyeBeam release 3004t stamp 16741 | udp:116.193.69.3:5060 | 5951 | | 99 | 841170047 | | sip:841170047@192.168.1.66:5080;transport=UDP | sip:203.190.172.49:39960 | NULL | 2007-08-28 11:28:47 | -1.00 | f6b2e2ce36244ddd9f967b5efbc39b16 | 47970 | 2007-08-28 11:27:47 | 0 | 64 | RTC/1.0.2299 | udp:116.193.69.3:5060 | 5423 | +----+-----------+--------+-----------------------------------------------+--------------------------+------+---------------------+-------+---------------------------------------------------+-------+---------------------+-------+--------+-----------------------------------+-----------------------+---------+ 4 rows in set (0.00 sec)
SIP2:
mysql> select * from location; +----+-----------+--------+-----------------------------------------------+--------------------------+------+---------------------+-------+---------------------------------------------------+-------+---------------------+-------+--------+-----------------------------------+-----------------------+---------+ | id | username | domain | contact | received | path | expires | q | callid | cseq | last_modified | flags | cflags | user_agent | socket | methods | +----+-----------+--------+-----------------------------------------------+--------------------------+------+---------------------+-------+---------------------------------------------------+-------+---------------------+-------+--------+-----------------------------------+-----------------------+---------+ | 46 | 1001 | | sip:1001@192.168.1.66:8887 | sip:203.190.172.49:43767 | NULL | 2007-08-28 11:28:53 | -1.00 | 8b3cbf617b787578 | 105 | 2007-08-28 11:27:53 | 0 | 64 | eyeBeam release 3004t stamp 16741 | udp:116.193.69.4:5060 | 5951 | | 47 | 1016 | | sip:1016@192.168.1.202:5061;transport=udp | sip:203.190.172.49:44293 | NULL | 2007-08-28 11:28:41 | -1.00 | 0006d752-a91d0005-647e0f99-44142f0e@192.168.1.202 | 239 | 2007-08-28 11:27:41 | 0 | 64 | Cisco-CP7960G/8.0 | udp:116.193.69.4:5060 | NULL | | 48 | 841170047 | | sip:841170047@192.168.1.66:5080;transport=UDP | sip:203.190.172.49:39960 | NULL | 2007-08-28 11:28:57 | -1.00 | f6b2e2ce36244ddd9f967b5efbc39b16 | 47971 | 2007-08-28 11:27:57 | 0 | 64 | RTC/1.0.2299 | udp:116.193.69.4:5060 | 5423 | | 44 | 1005 | | sip:1005@192.168.1.103:5060 | sip:203.190.172.49:41124 | NULL | 2007-08-28 11:28:56 | -1.00 | zxjvYGlwjx2VbuGu@192.168.1.103 | 22172 | 2007-08-28 11:27:56 | 0 | 64 | PA168S | udp:116.193.69.4:5060 | NULL | +----+-----------+--------+-----------------------------------------------+--------------------------+------+---------------------+-------+---------------------------------------------------+-------+---------------------+-------+--------+-----------------------------------+-----------------------+---------+ 4 rows in set (0.00 sec)
mysql>
Both tables have the information almost the same and snync BUT
When I use an UA1 registered to SIP1, calling UA2 register to SIP2, it does not work. Nothing happens on UA2.
Please help me how to fix them
Thanks in advanced
Regards TUng
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Tung Tran writes:
<div><SPAN style="font-size:10pt;">I think this t_replicate() function does not work with my case. Should you please suggest me another solution to make a failover system (one SIP server got failure, other one can handle).</SPAN></div>
you need to use sip phones that register with both of your sip servers.
-- juha
ps. is it possible to configure the mail server to reject html content?
you need to use sip phones that register with both of your sip servers.
An alternative is using usrloc db-mode=3 (db-only) and doing data replication in the database backend (e.g. MySQL cluster or master-master replication) for location sharing in combination with the Path extension for NAT traversal: http://osdir.com/ml/voip.openser.user/2006-03/msg00014.html
It's a bit more complicated to set up but works perfectly fine.
Regards, Andreas
Andreas Granig writes:
An alternative is using usrloc db-mode=3 (db-only) and doing data replication in the database backend (e.g. MySQL cluster or master-master replication) for location sharing in combination with the Path extension for NAT traversal: http://osdir.com/ml/voip.openser.user/2006-03/msg00014.html
andreas,
usrloc readme tells about mode 3:
The mode may be slower due the high number of DB operation. For example NAT pinging is a killer since during each ping cycle all nated contact are loaded from the DB; The lack of memory caching also disable the location watcher registration (in will not work with PA module) and disable the statistics exports.
is that not true regarding nat pinging or do you handle nat pinging by some other means?
-- juha
Juha Heinanen wrote:
usrloc readme tells about mode 3:
The mode may be slower due the high number of DB operation. For example NAT pinging is a killer since during each ping cycle all nated contact are loaded from the DB; The lack of memory caching also disable the location watcher registration (in will not work with PA module) and disable the statistics exports.
is that not true regarding nat pinging or do you handle nat pinging by some other means?
I've an extra NAT ping tool running on separated hosts, so this isn't an issue here.
Haven't used PA so far, so I can't tell anything about that. Since I have separated proxies and registrars (and possibly PA servers in the future), a possibility could be to operate PA servers in db_mode 0 and t_replicate from the registrars to the PA servers. Andreas