I've installed 2 Freeswitch on different servers and would like to have
Kamailio load balance between them.
I've installed Kamailio following:
http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git
I've created dispatcher.list and added:
loadmodule "dispatcher.so"
modparam("dispatcher", "list_file", "../etc/dispatcher.list")
in the kamailio.cfg.
But looking at:
http://kamailio.org/docs/modules/3.1.x/modules_k/dispatcher.html
I'm having difficulties to placing:
ds_select_dst("1", "0");
in the kamailio.cfg that was created originally.
Can anyone help me?
Hello,
Just want to announce the availability of an ebuild for version 3.1.5
(kamailio and ser flavours) on Gentoo Portage Overlays.
Here the git link:
*
http://git.overlays.gentoo.org/gitweb/?p=user/caio.git;a=tree;f=net-misc/si…
The unofficial overlays portage website:
* http://gpo.zugaina.org/net-misc/sip-router
Important, this is not an official ebuild, and neither it's not at official
gentoo portage tree.
You can use *layman* to add this overlay.
Also at pkg/ser/gentoo path of sip-router project you can find the latest
version.
If you need any guidance to probe this ebuild under your gentoo linux do not
hesitate to contact me or provide some feedback here at the lists.
Best regards,
Claudio
Hi,
I'm having some problems accounting missed serial forked calls to mysql
database.
I have following setup. Each user can have up to two contacts: telephone
number (routed to asterisk) and SIP URI. Users can specify which contact has
higher priority - which one should ring first. There is also SEMS voicemail
which is forked as 3rd serial call leg if there is no answer at first two
contacts.
For example, I have two users: oz(a)abc.hr and pero(a)abc.hr. pero(a)abc.hr also
has set telephone number as alternative number if he is not reachable at
sip:pero@abc.hr. Moreover, pero(a)abc.hr has voicemail turned on. When
oz(a)abc.hr calls pero(a)abc.hr, first pero(a)abc.hr's SIP client rings, then if
there is no answer and after the timeout telephone number rings and finally,
if there is no answer at telephone and after the timeout INVITE is forked to
SEMS.
There are two interesting scenarios accounting-wise which can happened:
1. oz(a)abc.hr calls pero(a)abc.hr, there are no answers and call is forked to
voicemail.
2. oz(a)abc.hr calls pero(a)abc.hr, there is no answer at SIP client, but pero
answers call at telephone.
When scenario 1 happens, I want to have only one log (row) in missed_calls
table.
When scenario 2 happens, I don't want to have a log in missed_calls table.
To accomplish this,* I want to log only the 2nd branch of the forked call.
However, there is either a bug in acc module or I'm doing something wrong,
and I can't get Kamailio to log only the 2nd branch*. I think that I am
setting the FLT_ACCMISSED flag correctly - after the 2nd branch is handled
and prior to calling the RELAY route. Logs show that FLT_ACCMISSED flag is
set prior to calling t_relay(), and there are no errors in debug log. I am
using $ru = "something" to rewrite URI prior to forking request.
I can easily set up logging of every call (two missed calls for serially
forked call to two locations) by setting FLT_ACCMISSED flag for each INVITE.
I can set up logging of every call's 1st branch, by reseting FLT_ACCMISSED
flag when handling 2nd branch of the call. Interestingly, logging of only
the 2nd branch of the serial forked call works when there is no forking to
voicemail!
Any ideas how to solve this problem?
Bellow are important parts of my config file. I'm running kamailio 3.1.4.
Cheers
Ozren
# ----- acc params -----
/* what special events should be accounted ? */
modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 1)
modparam("acc", "report_cancels", 0)
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "log_missed_flag", FLT_ACCMISSED)
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
modparam("acc",
"log_extra","src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
/* enhanced DB accounting */
#!ifdef WITH_ACCDB
modparam("acc", "db_flag", FLT_ACC)
modparam("acc", "db_missed_flag", FLT_ACCMISSED)
modparam("acc", "db_url", DBURL)
modparam("acc", "db_extra",
"src_user=$fU;src_domain=$fd;dst_user=$tU;dst_domain=$td;src_ip=$si")
#!endif
...
# Main SIP request routing logic
# - processing of any incoming SIP request starts with this route
route {
# per request initial checks
route(REQINIT);
if (src_ip != ****) {
# NAT detection
route(NAT);
}
# 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();
# authentication
route(AUTH);
# record routing for dialog forming requests (in case they are
routed)
# - remove preloaded route headers
remove_hf("Route");
if (is_method("INVITE|SUBSCRIBE"))
record_route();
# account only INVITEs
if (is_method("INVITE"))
{
setflag(FLT_ACC); # do accounting
}
# dispatch requests to foreign domains
route(SIPOUT);
### requests for my local domains
# handle presence related requests
route(PRESENCE);
# handle registrations
route(REGISTRAR);
if ($rU==$null)
{
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}
# dispatch destinations to PSTN
route(PSTN);
if ( is_method("INVITE") ) {
route(DBALIASES);
#check for user defined forking priorities and timers
route(FORK);
}
# user location service
route(LOCATION);
route(RELAY);
}
#check for user defined forking priorities and timers
route[FORK]{
sql_query("con", "select * from usr_pref_custom where uuid='$tu'",
"pref");
$avp(uuid)=$dbr(pref=>[0,0]);
$avp(email)=$dbr(pref=>[0,1]);
$avp(prio1)=$dbr(pref=>[0,2]);
$avp(prio2)=$dbr(pref=>[0,3]);
$avp(timer1)=$dbr(pref=>[0,5]);
$avp(timer2)=$dbr(pref=>[0,6]);
if (strlen($avp(prio1))>5) {
# user has multiple contacts, do serial forking
setflag(FLT_USRPREF);
# set counter
if (!$avp(prio)) {
$avp(prio) = 1;
}
# overwrite request URI with highest priority contact
if ($avp(prio1) =~ "^sip:00") {
$ru = $avp(prio1) + "@host";
xlog("L_INFO","PRIO 1 is tel number, RURI set:
$ru");
}
else {
$ru = $avp(prio1);
xlog("L_INFO","PRIO 1 is SIP URI, RURI set: $ru");
}
}
}
route[RELAY] {
#!ifdef WITH_NAT
if (check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
if (isflagset(FLT_NATS) || isbflagset(FLB_NATB)) {
route(RTPPROXY);
}
#!endif
/* example how to enable some additional event routes */
if (is_method("INVITE")) {
t_on_reply("REPLY_ONE");
t_on_failure("FAIL_ONE");
#if users have priorities set, use FAIL_FORK failure route
if ( isflagset(FLT_USRPREF) ) {
t_on_failure("FAIL_FORK");
}
}
if (isflagset(FLT_ACCMISSED)) xlog("L_INFO","RELAY, $rm $ru,
ACCMISSED FLAG IS SET");
else xlog("L_INFO","RELAY, $rm $ru, ACCMISSED FLAG IS NOT SET");
if (!t_relay()) {
sl_reply_error();
}
exit;
}
# Handle requests within SIP dialogs
route[WITHINDLG] {
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
xlog("L_INFO","WITHINDLG, loose_route()");
if (is_method("BYE")) {
xlog("L_INFO","WITHINDLG, BYE, DO
ACCOUNTING");
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... 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() ) {
# no loose-route, but stateful ACK;
# must be an 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;
}
}
# USER location service
route[LOCATION] {
#skip if $ru is telephone number
if ($ru =~ "^sip:00") {
xlog("L_INFO","SKIP lookup...");
}
else {
if (!lookup("location")) {
switch ($rc) {
case -1:
case -3:
t_newtran();
t_reply("404", "Not Found");
exit;
case -2:
sl_send_reply("405", "Method Not
Allowed");
exit;
}
}
}
# when routing via usrloc, log the missed calls also, but only if
user doesn't have prios set
if ( is_method("INVITE") && !(isflagset(FLT_USRPREF))) {
setflag(FLT_ACCMISSED);
}
}
# Failure route for forked calls
failure_route[FAIL_FORK] {
#!ifdef WITH_NAT
if (is_method("INVITE") && (isbflagset(FLB_NATB) ||
isflagset(FLT_NATS))) {
unforce_rtp_proxy();
}
#!endif
if ($avp(prio) >= 1) {
$avp(prio) = $avp(prio) + 1;
# handle 2nd branch
if ( ($avp(prio) == 2) && ( isflagset(FLT_USRPREF) )) {
t_on_failure("FAIL_FORK");
if ($avp(prio2) =~ "^sip:00") {
xlog("L_INFO","FAIL FORK, PRIO 2 is tel
number");
$ru = $avp(prio2) + "@host";
}
else {
xlog("L_INFO","FAIL FORK, PRIO 2 is SIP
URI");
$ru = $avp(prio2);
route(LOCATION);
}
setflag(FLT_ACCMISSED);
}
else {
$avp(prio) = 0;
$ru = $(avp(uuid));
rewritehostport("host:port");
xlog("L_INFO","FAIL FORK, VOICEMAIL
email:$avp(email), ru:$ru, br: $br");
append_hf("P-App-Name: voicemail\r\n");
append_hf("P-App-Param:
Email-Address=$avp(email)\r\n");
}
route(RELAY);
}
if (t_is_canceled()) {
exit;
}
}
Hi all,
I try to compile Kamailio with IMS extensions from OpenIMSCore available in carstenbock/ims branch in the GIT repository.
I have some problems with the modules "Client_Ro" and "pcscf" that do not compile:
CC (gcc) [M Client_Ro.so] ims_ro.o
ims_ro.c: In function 'send_ccr_interim':
ims_ro.c:594: error: 'AVP_EPC_User_Equipment_Info_Type_MAC' undeclared (first use in this function)
ims_ro.c:594: error: (Each undeclared identifier is reported only once
ims_ro.c:594: error: for each function it appears in.)
ims_ro.c: In function 'send_ccr_stop':
ims_ro.c:749: error: 'AVP_EPC_User_Equipment_Info_Type_MAC' undeclared (first use in this function)
ims_ro.c: In function 'Ro_Send_CCR':
ims_ro.c:831: error: 'struct dlg_binds' has no member named 'get_dlg'
ims_ro.c:835: error: 'struct dlg_binds' has no member named 'unref_dlg'
ims_ro.c:886: error: 'AVP_EPC_User_Equipment_Info_Type_MAC' undeclared (first use in this function)
CC (gcc) [M pcscf.so] pcc_avp.o
pcc_avp.c:1459: error: 'AVP_IMS_Subscription_Id_Type_E164' undeclared (first use in this function)
pcc_avp.c:1459: error: (Each undeclared identifier is reported only once
pcc_avp.c:1459: error: for each function it appears in.)
pcc_avp.c:1461: error: 'AVP_IMS_Subscription_Id_Type_SIP_URI' undeclared (first use in this function)
Does anybody have encountered these problems?
Is there a stable version tagged of the branch carstenbock/ims available in the GIT repository ?
Best regards,
Loïc.
********************************************************************************
IMPORTANT.Les informations contenues dans ce message electronique y compris les fichiers attaches sont strictement confidentielles
et peuvent etre protegees par la loi.
Ce message electronique est destine exclusivement au(x) destinataire(s) mentionne(s) ci-dessus.
Si vous avez recu ce message par erreur ou s il ne vous est pas destine, veuillez immediatement le signaler a l expediteur et effacer ce message
et tous les fichiers eventuellement attaches.
Toute lecture, exploitation ou transmission des informations contenues dans ce message est interdite.
Tout message electronique est susceptible d alteration.
A ce titre, le Groupe France Telecom decline toute responsabilite notamment s il a ete altere, deforme ou falsifie.
De meme, il appartient au destinataire de s assurer de l absence de tout virus.
IMPORTANT.This e-mail message and any attachments are strictly confidential and may be protected by law. This message is
intended only for the named recipient(s) above.
If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message.
Any unauthorized view, usage or disclosure ofthis message is prohibited.
Since e-mail messages may not be reliable, France Telecom Group shall not be liable for any message if modified, changed or falsified.
Additionally the recipient should ensure they are actually virus free.
********************************************************************************
Hi to all on this list =)
jUSt a tiny user question aboUt pike module(at least kamailio doc). are these values for sampling_time_unit seconds or minutes ? it's not in the doc. same 4 remove_latency.
thanks for helping me out
sorry to bother you
best regards
Toni
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
Hi,
I have this code:
if ( is_user_in("From", "blocked") && is_method("INVITE")) {
xlog("L_INFO", "XLOG: [number_and_ruri_checks] NOTICE:
Account ($fu) to ($ru) is blocked");
sl_send_reply("403", " Account blocked ");
exit;
}
I would like to account also this answer to Radius, now I have it only in
application xlog.
Thanks,
Mino
Hello,
a kind reminder for everyone to add to the wiki page hints for migration
from v3.1.x to v3.2.0. Especially to developers that know what kind of
major changes they did to existing modules in 3.1.x. The wiki is open
for anyone:
* http://sip-router.org/wiki/install/3.1.x-to-3.2.x
I just updated the section related to database structure changes. If you
spot errors/missing parts, go ahead and fix it.
Thanks,
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
On 9/22/11 9:04 PM, Krishna Kurapati wrote:
> Thanks Daniel,
>
> Here it is...
>
> [...]
It looked ok for my eye. Can you run kamailio with higher debug level
(debug=4 in config file) and send the log messages related to parsing
the URI for AoR?
Cheers,
Daniel
>
>
> On Thu, Sep 22, 2011 at 1:44 PM, Daniel-Constantin Mierla
> <miconda(a)gmail.com <mailto:miconda@gmail.com>> wrote:
>
> Hello,
>
> can you grab such REGISTER with ngrep (or wireshark) and past it here?
>
> Cheers,
> Daniel
>
>
> On 9/22/11 8:07 PM, Krishna Kurapati wrote:
>> Sep 22 09:49:53 siptest /usr/sbin/kamailio[3160]: ERROR:
>> registrar [common.c:75]: failed to parse Address of Record
>> Sep 22 09:49:53 siptest /usr/sbin/kamailio[3160]: ERROR:
>> registrar [save.c:822]: failed to extract Address Of Record
>>
>> Is there a problem when AoR contains "_"
>>
>> for example is AoR krish_kura(a)sip.org <mailto:krish_kura@sip.org>
>> is not allowed?
>>
>> Thanks
>> Krish Kura
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users(a)lists.sip-router.org <mailto:sr-users@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
>
>
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
Hello,
On 9/15/11 4:02 PM, Timo Klecker wrote:
> Hi Daniel,
>
> I managed to get a log with debug 4 from one call. I had to take out all
> IP-Addresses and Usernames, hope you can use it.
the log confirmed what I expected:
Sep 15 15:32:33 vux896 /sbin/kamailio[31594]: DEBUG: siptrace
[siptrace.c:954]: no uas msg, local transaction
Sep 15 15:32:33 vux896 /sbin/kamailio[31594]: DEBUG: tm [t_fwd.c:1242]:
DEBUG: e2e_cancel: e2e cancel proceeding
Because a new CANCEL is generated from scratch, incoming message is lost
and no longer available to check the sip trace flag.
Now, the question is how to decide whether the cancel is to be
siptraced. I can lookup for incoming CANCEL and check if it has the
siptrace flag set, but there are CANCELs in case of local timeout or
parallel forking, so I think it is better to actually lookup the INVITE
transaction and if the siptrace flag is set for it, record the cancel.
If there is no INVITE transaction anymore, the cancel is forwarded
stateless and can be captured in onsend route, although it should be
normally discarded if it is known that the proxy works in statefull mode
only.
Any other opinions?
Cheers,
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
Hi,
I have a problem with configuring the carrierroute module, I do not clearly
understand how it should work from the documentation. What I would like to
do is that I have 2 gateways (A.A.A.A and B.B.B.B), lots of scan_prefixes
with different rewrite prefixes. The traffic should be sent to the 1
gateway, and if it fails (5xx,4xx codes) it should go to the another. I have
only one SIP domain (domain.com). The question is, how the tables
(domain_name, carrierroute, carrierfailroute) should be filled? Can I
achieve this scenario with the carrierroute module ?
Thanks.
Mino