Hello All,
I have a need to save the Record-Route header from the INVITE and
use it as a route header in requests like BYE.
PROXY --> Kamailio(as PROXY) --> Asterisk
I am using rr module to add a record_route when passing the INVITE to Asterisk.
Thanks,
Jignesh Gandhi
Im trying to enable Kamailio TLS but the configuration is not running at
all when I cahnge it liike this as follow.
Kamailio 3.3 ubuntu 12.04 LTS
#!define WITH_TLS
#!ifdef WITH_TLS
enable_tls=yes
#!endif
#!ifdef WITH_TLS
loadmodule "tls.so"
#!endif
#!ifdef WITH_TLS
# ----- tls params -----
modparam("tls", "config", "/etc/kamailio/tls.cfg")
#!endif
Please help
--
Kethzer Docteur
Hi,
I would like to append a header to a 'winning' negative reply in
failure_route and let the Kamailio do the default action (state fully
forward the winning reply).
When I use append_to_reply("Foo: bar\r\n"); and then call exit; in
failure_route nothing is appended.
When I use same append_to_reply then t_relay("505","Error"); and exit; the
header is appended.
When I use append and t_reply with dialog modul turned on I got a bug I'm
solving here '[SR-Users] t_reply in failure route with dialog module'.
So my question is how to put a header into a reply when I don't want to
alter its code or text?
I'm using Kamilio 4.0.4 on Debian 7.1
Thanks for an answer
Efelin
Hi All,
I have build Kamailio 4.0.1 from source in CentOS 5.8(i386
architecture).I followed all instructions from
http://www.kamailio.org/wiki/install/4.0.x/git.(Though Modules_k directory
is not generated).I then edit kamailio.config file for websocket support as
described in webocket.cfg file in exmples directory.But while starting
kamailio it gives following error
ERROR: load_module: could not open module : libunistring.so.0: cannot
open shared object file: No such file or directory
0(30270) : [cfg.y:3567]: parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 318, column 12-57: failed to
load module
I checked websocket.so file in the specified directory and it is
already there.Can you please help me what's wrong with it?
please help.
Rupayan Dutta
Hello,
First, i have 7 years experience with Asterisk, but I started a project
with Kamailio, forgive me in advance if I say silly things...! ;-)
I set up a classic Asterisk / Kamailio configuration:
sip phones -> kamailio -> asterisk -> sip trunks/pstn.
When a call comes from the PSTN side, if I configure Asterisk as follows:
[012345678]
type = friend
username = 012345678
secret = xxxxxxx
host = dynamic
fromdomain = sip.mydomain.com
fromuser = 012345678
Standard mode:
exten => 012345678, 1, Dial(SIP/012345678) -> The call is redirected on the
phone by Kamailio ! :-)
------------------------------------------------------------------------------------------------------------------------------------------------
Trunk mode:
[mytrunk]
type = friend
username = mytrunkUser
secret = xxxxxxx
host = dynamic
fromdomain = sip.mydomain.com
fromuser = mytrunkUser
exten => 012345678, 1, Dial(SIP/mytrunk/012345678) -> The call is rejected
by Kamailio....
exten => 012345679, 1, Dial(SIP/mytrunk/012345679) -> The call is rejected
by Kamailio ....
My question is how to allow the routing of multiple numbers (trunk mode) in
a SIP account with Kamailio?
Best regards,
Mickael
Hello,
I have configured the SNMPstats module fine in my machine because I get the
SNMP information with the new KAMAILIO MIBS but I don't understand why the
value of kamailio dialogs is always 0:
KAMAILIO-MIB::kamailioCurNumDialogs.0 = Gauge32: 0
KAMAILIO-MIB::kamailioCurNumDialogsInProgress.0 = Gauge32: 0
KAMAILIO-MIB::kamailioCurNumDialogsInSetup.0 = Gauge32: 0
KAMAILIO-MIB::kamailioTotalNumFailedDialogSetups.0 = Counter32: 0
However I can see the transactions:
KAMAILIO-SIP-COMMON-MIB::kamailioSIPSummaryTotalTransactions.0 = Counter32:
54797
Should I configure an specific parametr of the SNMPstats module?
Regards,
Hello everyone,
My name is Bruno, I'm a student from Portugal studying IMS at the moment. I've been following tutorials online, trying to get Kamailio to work as an IMS core - I'm pretty much a newbie in this field.
Unfortunantly I've been getting several errors and I can't seem to properly configure everything. I was wondering if there is a All-in-One VM that can be downloaded, with Kamailio ready to be used as an IMS core?
Thanks in advance. Best regards,
Bruno C.
Hi all,
I need to modify the host part of a contact header. I'm trying
something like:
route {
.....
if (remove_hf("Contact")){
if
(insert_hf("Contact: rn", "Contact"))
xlog("Contact modified");
}
if (!t_relay("YYY.YYY.YYY.YYY","5060")) {
sl_reply_error();
}
......
}
When i look SIP DUMP on YYY.YYY.YYY.YYY side i see older
Contact field.
I try subst_hf with regexp, subst and simply remove
Contact, all this does not work.
What i am doing wrong?
--
С
уважением Зуев Михаил
Hello,
3 crashes occurred today (we never seen crashes on this server before)
during a period of 20 minutes.
I had a look to the coredumps. Here is a quick overview of the first entries
of "bt full":
core.27671 : #0 0x00007f5577048d65 in run_trans_callbacks_internal
(cb_lst=0x7f5560abbd50, type=2, trans=0x7f5560abbce0, params=0x7fff3712acb0)
at t_hooks.c:286
core.27656 : #0 0x00007f557700a048 in free_cell (dead_cell=0x7f5560abbce0)
at h_table.c:175
core.27685 : #0 0x00007f5577048d65 in run_trans_callbacks_internal
(cb_lst=0x7f5560abbd50, type=2, trans=0x7f5560abbce0, params=0x7fff3712acb0)
at t_hooks.c:286
core.27689 : #0 0x00007f5577048d65 in run_trans_callbacks_internal
(cb_lst=0x7f5560abbd50, type=2, trans=0x7f5560abbce0, params=0x7fff3712acb0)
at t_hooks.c:286
core.27691 : #0 0x00007f5577048d65 in run_trans_callbacks_internal
(cb_lst=0x7f5560abbd50, type=2, trans=0x7f5560abbce0, params=0x7fff3712acb0)
at t_hooks.c:286
core.31977 : #0 0x00007f038e66fdee in free_cell (dead_cell=0x7f037811ebe0)
at h_table.c:157
core.31994 : #0 0x00007f038e6ab65a in t_forward_nonack (t=0x7f037811ebe0,
p_msg=0x7f038fdca438, proxy=0x0, proto=0) at t_fwd.c:1762
core.3700 : #0 0x000000000061697a in fm_insert_free (qm=0x7f19861fa000,
frag=0x7f19864d53e8) at mem/f_malloc.c:245
core.3727 : #0 0x00000000006167a4 in fm_extract_free (qm=0x7f19861fa000,
frag=0x7f19864f4cc8) at mem/f_malloc.c:208
I don't know how to proceed now. Can you help me to highlight the issue
here? Thank you.
Regards,
Igor.
I'm trying to set up kamailio dispatcher to distribute calls to 2 asterisk
servers. So far, the failover case seems ok, but I cannot get the
dispatcher to distribute load. All calls are going to the last destination
entry in the dispatcher table even if I have set the maxload attributes.
I'm using algorithm 10 for load distribution. The number of calls sent to
one asterisk is well above the maxload. Hope someone more experienced in
dispatcher can review my config and give me some recommendations. Thanks in
advance.
Here is the content of dispatcher table in postgresql db.
select * from dispatcher;
id | setid | destination | flags | priority | attrs
| description
----+-------+--------------------+-------+----------+---------------------------+-------------
1 | 1 | sip:10.0.1.31:5061 | 0 | 0 |
duid=asterisk1;maxload=25 | Asterisk1
2 | 1 | sip:10.0.1.33:5061 | 0 | 0 |
duid=asterisk2;maxload=25 | Asterisk2
(2 rows)
Here are the dispatcher sections in kamailio.cfg.
# ----- dispatcher params -----
#!ifdef WITH_DISPATCHER
modparam("dispatcher", "db_url", DBASTURL)
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "force_dst", 1).
# If flag 2 is set, then failover support is enabled.
modparam("dispatcher", "flags", 3)
# the last address in destination set is used as a final option to send the
request to
modparam("dispatcher", "use_default", 1)
# load balancing fail over
modparam("dispatcher", "dst_avp", "$avp(dsdst)")
modparam("dispatcher", "grp_avp", "$avp(dsgrp)")
modparam("dispatcher", "cnt_avp", "$avp(dscnt)")
modparam("dispatcher", "dstid_avp", "$avp(dsdstid)")
modparam("dispatcher", "attrs_avp", "$avp(dsattrs)")
# PVs for hashing
modparam("dispatcher", "hash_pvar", "$fU@$ci")
# PVs to store results when calling ds_is_from_list
modparam("dispatcher", "setid_pvname", "$var(setid)")
modparam("dispatcher", "attrs_pvname", "$var(attrs)")
# method to probe the gateways
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_from", "sip:dispatcher@localhost")
modparam("dispatcher", "ds_ping_interval", 30)
modparam("dispatcher", "ds_probing_threshhold", 10)
modparam("dispatcher", "ds_ping_reply_codes",
"class=2;code=403;code=404;code=484;code=488;class=3")
modparam("dispatcher", "ds_probing_mode", 1)
# size of hash table storing data for call load dispatching, power of two
modparam("dispatcher", "ds_hash_size", 10)
# expiration time in seconds to remove the load on a destination if no BYE
was received
modparam("dispatcher", "ds_hash_expire", 3600)
# expiration time in seconds to remove the load on a destination if no 200
OK for INVITE was received
# and state updated with ds_load_update
modparam("dispatcher", "ds_hash_initexpire", 60)
modparam("dispatcher", "ds_hash_check_interval", 30)
#!endif
route[WITHINDLG] {
if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
#!ifdef WITH_DISPATCHER
if(is_method("BYE|CANCEL") && ds_is_from_list("1", "3"))
ds_load_update();
#!endif
......
}
}
route[FROMASTERISK] {
#!ifdef WITH_DISPATCHER
if(ds_is_from_list("1", "3")) {
xlog("L_DBG","$rm from $fU@$si:$sp: Call from Asterisk cluster\n");
return 1;
}
return -1;
#!else
if ($si==$sel(cfg_get.asterisk.bindip)) {
return 1;
}
return -1;
#!endif
}
onreply_route[MANAGE_REPLY] {
xdbg("incoming reply\n");
#!ifdef WITH_DISPATCHER
if(is_method("INVITE") && ds_is_from_list("1", "3")) {
if(status=~"2[0-9][0-9]") {
ds_load_update();
}
else if(status=~"[3-7][0-9][0-9]") {
ds_load_unset();
}
}
#!endif
if(status=~"[12][0-9][0-9]")
route(NATMANAGE);
}
#!ifdef WITH_DISPATCHER
failure_route[RTF_DISPATCH] {
if (t_is_canceled()) {
exit;
}
# next DST - only for 500 or local timeout
if (t_check_status("500") or (t_branch_timeout() and !t_branch_replied())) {
# mark the destination Inactive and Probing
ds_mark_dst("IP");
# select the new destination
if(ds_next_dst()) {
t_on_failure("RTF_DISPATCH");
route(RELAY);
exit;
}
else {
# last available node failed to reply, no other
destinations available
send_reply("404", "No destination");
exit;
}
}
}
#!endif
route[TOASTERISK] {
#!ifdef WITH_DISPATCHER
# ds_mark_dst("IP");
# Call load distribution
if(!ds_select_dst("1", "10")) {
sl_send_reply("500", "Service Unavailable");
xlog("L_INFO","$rm from $fU@$si:$sp: No destinations available for $rd\n");
exit;
}
xlog("L_DBG", "--- SCRIPT: going to <$ru> via <$du>\n");
t_on_failure("RTF_DISPATCH");
#!else
$du = "sip:" + $sel(cfg_get.asterisk.bindip) + ":"
+ $sel(cfg_get.asterisk.bindport);
#!endif
route(RELAY);
exit;
}
# Dispatcher detects a destination goes down
event_route[dispatcher:dst-down] {
xlog("L_ERR", "Destination down: $rm $ru ($du)\n");
}
# Dispatcher detects a destination comes up
event_route[dispatcher:dst-up] {
xlog("L_ERR", "Destination up: $rm $ru\n");
}