Hi,I have some sip phones and using them to register at Kamailio which is located behind 2 asterisk servers. There 2 SIP trunks to my SIP provider on asterisk machines. Also I have rtpproxy running.
What I want to do is to put some of the calls directly from the phones to SIP Provider without involving asterisk. I think I need to use Dispatcher module - what is the best way of doing that?Thank you!
Hi,
I'm testing the p_usrloc module (Kamailio version 3.3.2, installed via ubuntu package) and it looks like it's working but for some reason a re-registration is causing a new entry being added to the distributed location table instead of updating the existing one.
The kamailio configuration looks like this:
#!define DBURL "mysql://openser:openserrw@localhost/openser"
loadmodule "p_usrloc.so"
modparam("p_usrloc", "db_mode", 3)
modparam("p_usrloc", "write_db_url", DBURL)
modparam("p_usrloc", "read_db_url", DBURL)
modparam("p_usrloc", "write_on_db", 1)
modparam("p_usrloc", "alg_location", 1)
modparam("p_usrloc", "reg_db_table", "locdb")
mysql> select * from locdb;
+----+----+-------------------------------------------+--------+--------+---------------------+-------+----+
| id | no | url | status | errors | failover | spare | rg |
+----+----+-------------------------------------------+--------+--------+---------------------+-------+----+
| 1 | 1 | mysql://root:secret@172.16.10.131/openser | 1 | 0 | 1900-01-01 00:00:01 | 0 | 0 |
| 1 | 2 | mysql://root:secret@172.16.10.132/openser | 1 | 0 | 1900-01-01 00:00:01 | 0 | 0 |
+----+----+-------------------------------------------+--------+--------+---------------------+-------+----+
When using the default usrloc functionality everything is working fine. The only difference I noticed is that the default usrloc is using MYSQL UPDATE to update the location entry and that p_usrloc is using MYSQL REPLACE.
Regards
Hans
Hi
I am using slqops to get some user related info from location table, I want
to use that info in rewritehost, however when I do use a variable in
rewritehost I get an error "Unable to resolve variable". Is it possible to
use a variable in rewritehost ? If not what is the workaround ?
Thanks
Hello Community,
I've recently started to use the Dialog module to manage the amount of incoming calls from our SIP provider allowed to pass through by using profiles_with_values and setting the size of these profiles to a certain amount.
Most of the time this works as it should, but sometimes the 'slots' available for a profile aren't cleared even though a dialog has finished. This seems to happen when an high amount of regular traffic is hitting kamailio.
Has anyone else experienced this? Are there perhaps any other ways to control the slots available for certain incoming SIP traffic?
Below parts of my configuration file. Perhaps I'm doing something wrong which causes this to happen.
In my route[WITHINDLG] -> loose_route -> is_method("BYE") I'm not calling dlg_manage(), could this be the problem?
Other comments are welcome too, as I'm fairly new to Kamailio.
modparam("dialog", "enable_stats", 1)
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "hash_size", 4096)
modparam("dialog", "profiles_with_value", "318005004");
modparam("dialog", "default_timeout", 43200)
modparam("dialog", "dlg_match_mode",2)
modparam("dialog", "detect_spirals", 1)
request_route {
# per request initial checks
route(REQINIT);
# handle requests within SIP dialogs
route(WITHINDLG);
### only initial requests (no To tag)
# CANCEL processing
if (is_method("CANCEL"))
{
if (t_check_trans())
t_relay();
exit;
}
t_check_trans();
# record routing for dialog forming requests (in case they are routed)
# - remove preloaded route headers
remove_hf("Route");
if (is_method("INVITE")) {
xlog("L_INFO", "Incoming request for $rU from $fU");
if ($rU == "318005004") {
route(DIALOG);
}
}
# handle registrations
route(REGISTRAR);
if ($rU==$null)
{
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}
# dispatch destinations
route(DISPATCH);
route(RELAY);
}
route[DIALOG] {
dlg_manage();
record_route();
$var(SIZE) = 0;
sql_query("vf", "exec dbo.SelectAvailableSlots '00$rU'", "ra");
$avp(s:limit) = $dbr(ra=>[0,7]);
xlog("L_INFO", "Maximum simultaneous calls is configured at $avp(s:limit) ....");
sql_result_free("ra");
if ($rU == "318005004") {
get_profile_size("318005004", "$rU", "$var(SIZE)");
}
xlog("L_INFO", "There are currently $var(SIZE) calls for $rU, excluding the current call");
if($var(SIZE) >= $avp(s:limit)) {
xlog("L_INFO", "Simultaneous calls limit of $avp(s:limit) reached for $rU: $var(SIZE)\n");
sl_send_reply("603", "Simultaneous calls limit reached");
exit;
}
if ($rU == "318005004") {
set_dlg_profile("318005004", "$rU");
}
if ($rU == "318005004") {
if(get_profile_size("318005004", "$var(SIZE)")) {
xlog("L_INFO", "There are currently $var(SIZE) calls for $rU, including the current call");
}
}
}
route[WITHINDLG] {
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
#Used for call transfer
if($fU == "318005004") {
if (is_method("UPDATE")) {
sl_send_reply("405","Method not allowed");
xlog("L_INFO", "Dropping UPDATE message...\n");
exit;
}
if (is_method("INVITE")) {
record_route();
}
if (is_method("BYE")) {
dlg_manage();
}
}
if (is_method("BYE")) {
setflag(1); # do accounting ...
setflag(3); # ... even if the transaction fails
}
route(RELAY);
} else {
if (is_method("SUBSCRIBE") && uri == myself) {
# in-dialog subscribe requests
route(PRESENCE);
exit;
}
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
# non loose-route, but stateful ACK;
# must be ACK after a 487 or e.g. 404 from upstream server
t_relay();
exit;
} else {
# ACK without matching transaction ... ignore and discard.
exit;
}
}
sl_send_reply("404","Not here");
}
exit;
}
}
Regards,
Grant
i tried to use kamailio built-in stun server, but failed, because it
supports only binding requests. my ua tried to send it "allocate request
lifetime" request, which failed with 600 global failure response.
what is the status of kamailio's stun server? is anyone interested in
developing it further or should we obsolete the server and start using
some external server?
-- juha
Hi All,
I was wondering if anyone would be kind enough to let me know if they have implemented anything like as follows in Kamailio?
We are looking to implement call fowarding, activating it as usual in usr_preferences table.
I was wondering if on the outbound leg its possible to write the username from usr_preferences with CFW active into the radacct table easily?
This is with Radius and opensips DBs in Mysql.
Many thanks
Jon
Hi,
I am trying to communicate 2 Jitsi clients in 2 separate private networks.
Both clients are behind NAT.
Kamailio Server is on Public IP.
Both Jitsi clients does register and presence works fine. And also text
messages works well.
But unable to call each other.
Had some one had the same issue before. I tried with many soft clients and
all failed with same result.
Same scenario works with IP Phones.
Can anybody point out what I miss there.
Regards,
Roy.
Hi,
Crocodile has just open-sourced our MSRP over WebSocket (see
http://tools.ietf.org/html/draft-pd-msrp-websocket) Javascript stack. The
project is hosted on Google Code: http://code.google.com/p/crocodile-msrp/
The stack is distributed using the MIT License and was developed and
tested along side the Kamailio MSRP over WebSocket implementation.
Regards,
Peter
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd
Dear All
I am looking at Kamailio's module, file, function that receives rtp and
rtcp port from rtp proxy.
Can somebody please let me know which file/function I need to check.
Thanks
Austin
Hi Roy,
Please keep emails on list.
Regards,
Peter
On Fri, 2012-12-14 at 09:31 -0800, Raj Roy Ghandhi wrote:
> Dear Peter,
>
> Thanks for all the support that you gave me during the Kamalio
> configuration with RTPProxy.
> Currently it works fine with IP Phones but not soft clients. (Jitsi)
>
>
> If I give you my server information would you be able to check that
> out for me.
>
>
> I was lost for that issue.
>
>
> Best Regards,
> Roy.
--
Peter Dunkley
Technical Director
Crocodile RCS Ltd