Hi,
When we receive an request, we do "
lookup("location") call to find if the uri is there or not.
There are two scenarios:
1. The aor is in the subscriber table but not in usrloc table
2. The aor is not in subscriber table
I would like to respond differently to the sender in each of these cases.
Right now, the lookup returns -1 for either case. Is there any other way
other than dipping into database each time?
Thanks
Krish Kura
Hello,
I'm trying to limit all subscriber's active call according to setting their
simultaneous use setting defined in database.
But having problem when one subscriber's INVITE message goes to
retransmission. When retranmission occures INVITE messages don't complete
with BYE and subscriber simultaneus use amount will hung.
My example code block is below.
Does anyone advice me for overcome INVITE retransmissions?
Thanks.
modparam("dialog", "db_url", "mysql://openser:openserrw@localhost/openser")
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "db_mode", 1)
modparam("dialog","profiles_with_value","callquota")
modparam("dialog", "default_timeout", 3600)
modparam("dialog", "dlg_match_mode",0)
modparam("dialog", "detect_spirals", 1)
route[QUOTA] {
if (is_method("INVITE") && $fU == $avp(s:username)) {
avp_db_query("select quota from subscriber where
username='$avp(s:username)'", "$avp(s:quota)");
$var(SIZE) = 0;
get_profile_size("callquota", "$avp(s:username)", "$var(SIZE)");
xlog("L_INFO", "CALL_OPENSER:Call originated from = $fd\n");
xlog("L_INFO", "Active call amount for $fU is $var(SIZE) ,
quota=$avp(s:quota)\n");
if( $var(SIZE) >= $avp(s:quota) ){
sl_send_reply("403", "Simultaneous calls limit reached");
xlog("L_INFO", "QUOTA:Limit of $var(SIZE) active calls has
been reached for user=$avp(s:username), quota=$avp(s:quota)\n");
exit;
}
set_dlg_profile("callquota","$avp(s:username)");
get_profile_size("callquota", "$avp(s:username)", "$var(SIZE)");
}
}
--
*Bayram KARAGÖZ*
Hi,
I am doing some testing and i have trouble understanding when does the
"mysql:driver_error" counter/statistics increase....
I stopped the mysqld process on the DB server and used sqlops. the
driver_error did still is on 0.
I use version 3.3.2.
Thanks,
Uri
Hello,
On 2/11/13 5:17 PM, Eduardo Lejarreta wrote:
> Good evening Daniel.
>
> You are right, calling engage_media_proxy() prior to dlg_manage() solves the
> issue (just before t_relay on INVITEs).
>
> I've done several test changing the order of things and now everything works
> fine.
great, thanks for reporting back. Perhaps dlg flag vs dlg_manage has to
be clarified a bit more in the next major release (4.1).
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
- http://conference.kamailio.com -
Hi,
i am using kamailio 3.3 version please help me with this issue.
1) Registered from SIP end point, kamailio added row in location table
2) Now using same SIP account details, pushed registration entry using *kamctl
ul add , * instead of overwriting the previous contact by new one it
inserts another new row in the location table
3) Total now 2 rows with same username are present in DB.
I am using save("location", "0x04") so before inserting new row it should
check whether already entry is there or not, if there should update the
same row.
I look forward to your reply.
Thanks
Ram
On 2/8/13 12:15 PM, Eduardo Lejarreta wrote:
> Yes it's the correct order. We call dlg_manage() prior to
> engage_media_proxy():
The correct order could be the other one, as mediaproxy might need some
callbacks from dialog module.
Usually the dlg_manage() should be executed just before relaying, when
is no other chance that the invite will get a negative reply from the
config.
Cheers,
Daniel
>
> route[INVITE_MANAGE] {
>
> if (is_method("INVITE")) {
>
> $dlg_var(si) = $si;
> $dlg_var(tU) = $tU;
> $dlg_ctx(timeout_bye) = 1;
>
> dlg_manage();
> ........
> ........
> }
> }
> .......
> .......
> route[RELAY] {
>
> if (is_method("INVITE")) {
> ........
> ........
> route(MEDIAPROXY); # route MEDIAPROXY
> t_on_failure(FAIL_ONE);
> t_on_reply(REPLY_ONE);
> }
>
> if (!t_relay()) {
> sl_reply_error();
> }
> exit;
> }
> ........
> ........
> route[MEDIAPROXY] {
>
> xlog("L_INFO", "Engage Media Proxy - M=$rm R=$ru F=$fu T=$tu
> IP=$si:$sp ID=$ci\n");
> engage_media_proxy();
> return;
> }
>
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
- http://conference.kamailio.com -
Hello,
Are there any plans for a Kamailio meet-up on one of the evenings this
year?
Regards,
Peter
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
I am looking for a way to integrate Java business logic with Kamailio to
influence routing decisions, add/remove/modify headers, record
accounting-related information, etc. A while back there was a project named
WeSIP, but it doesn't appear to active anymore.
Is anyone doing something like this now, or any ideas or suggestions?
Thanks,
Ron