Hi.
I'd like to use Kamailio as a SIP proxy routing calls to upstream SIP provider.
As far as I've understood the parameters I should set are:
pstn.gw_ip = "" desc "PSTN GW Address"
pstn.gw_port = "" desc "PSTN GW Port"
The problem is that my upstream provider uses dynamic IP for its server. How can I
use hostname instead of ip.
>From what I see in route[PSTN] example it seems like it should just work if I use
pstn.gw_ip = "sip.myprovider.lol" desc "My upstream SIP host"
But if so - why the confusing name? And if not - how do I make it work? Is there
pstn.gw_host or smth like that?
regards,
Max.
Hi All,
I had a working Kamailio with Siremis. I upgraded wanted a new cfg file
(big mistake, I know).
I defined the DBURL at kamailio.cfg and the server start without errors,
users can register but I can not make calls and Siremis missed calls table
is not updated.
What files and where should I update? Should I run kamdbctl?
Thanks,
Nir
Dear All,
I was trying to make such that rtpproxy is used for all calls in kamailio,
Part of Kamailio.cfg looks like following:
=============================
loadmodule "rtpproxy.so"
# ----- rtpproxy params -----
modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")
route[RELAY] {
# enable additional event routes for forwarded requests
# - serial forking, RTP relaying handling, a.s.o.
if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");
}
if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
rtpproxy_manage("co") ; # added amar 20151015
}
if (is_method("INVITE")) {
if(!t_is_set("failure_route"))
t_on_failure("MANAGE_FAILURE");
}
if (!t_relay()) {
sl_reply_error();
}
exit;
}
But when I run Kamailio start it gives error:
Error looks like following:
===================
Oct 15 16:13:42 smart kamailio[18472]: * Not starting Kamailio SIP server:
invalid configuration file!
Oct 15 16:13:42 smart kamailio[18472]: *
Oct 15 16:13:42 smart kamailio[18472]: * 0(18480) ERROR: <core>
[cfg.y:3299]: yyparse(): cfg. parser: failed to find command rtpproxy_manage
(params 1)
What could be the problem?
Hello,
I have a requirement to normalise a number to an international E164 inside Kamailio.
In my scenario I'm receiving a call from "a platform", and then making a call out to the same platform. I'm then adding some services to that call (e.g. recording it) on the way through.
The problem is that sometimes the number I receive in the FROM field in the initial invite from "A platform" has 44 at the front, but no +. "A Platform" is then rejecting the call back in from myself, because the FROM field isn't formatted correctly.
Scenario 1 - WORKS FINE - sometimes we see this.
PSTN -> FROM:07700900000 -> A PLATFORM -> FROM:07700900000 -> ME
Call Centre <- A PLATFORM <- FROM:07700900000 <- ME
Scenario 2 DOES NOT WORK - sometimes we see this.
PSTN -> FROM:447700900000 -> A PLATFORM -> FROM:447700900000 -> Aeriandi
Call Centre <- A PLATFORM <- FROM:447700900000 <- Aeriandi
Scenario 3 WORKS by fixing up the number by adding a +
PSTN -> FROM:447700900000 -> A PLATFORM -> FROM: 447700900000 -> Aeriandi
Call Centre <- A PLATFORM <- FROM:+447700900000 <- Aeriandi (ADD a PLUS)
So I'm investigating if it's possible to fix up the number and add the + in Kamailio. Clearly I could detect if the number starts with 44 and change this to +44, but this seems very brittle (what about other international numbers) - it there a proper way to do this, or a standard module?
Unfortunately asking "A platform" to send me the "FROM" in a consistent format is not an option.
Many Thanks,
Daniel
Hi,
I have a kamailio tls configuration which is working fine for calls &
messages
In the tls configuration i set these parameters to yes for the server and
client
verify_certificate = yes
require_certificate = yes
But when I use "kamctl fifo t_uac_dlg MESSAGE" to send a message I get the
following errors, when verify_certificate & require_certificate are set to
no the message is sent correctly.
Can somebody please help me resolve this issue.
tls [tls_server.c:1193]: tls_read_f(): TLS write:error:14090086:SSL
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
<core> [tcp_read.c:1326]: tcp_read_req(): ERROR: tcp_read_req: error
reading
tls [tls_server.c:1193]: tls_read_f(): TLS accept:error:14094418:SSL
routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
<core> [tcp_read.c:1326]: tcp_read_req(): ERROR: tcp_read_req: error
reading
Thanks
Ahmed
Hey Guys,
I was recently playing with "register_myself" setting of the domain
module (which I was the impression that I have used it successfully in
the past) and I have the feeling it does not longer behave.
I have the following config:
"""
modparam("domain", "db_url", DBURL)
modparam("domain", "register_myself", 1)
....
# block foreign domains here
if !is_uri_host_local() {
sl_send_reply("603","Only local domains accepted");
exit;
}
"""
Based on the register_myself setting I would expect that
is_uri_host_local passes the request but it does not although the
request is towards the IP address of my server.
Is this the intended behavior or am I just unlucky and hit a bug?
Ta,
DanB
Hi,
I evaluated the dmq_usrloc module, and it works pretty good if there are
two identical machines which replicate their location with each other. But
what I actually want to do is to send registrations to an extra machine
which is just there for writing the location into a central DB (in one
table for all the registrars), from where it can be accessed (by a web page
for example).
So for example, I have three machines, registrar 1 and registrar 2, and
receiver. receiver will never interact with customers. It is just there for
writing the location into the database.
I configured both registrars to send their packets to receiver, and I
configured the receiver to send its packets (which it actually never does)
to a dns name containing both registrars. But after reading the content of
some PING messages and reading something about "autodiscovery" of dmq on
the mailing list, I'm not sure whether my scenario will work the way I want
it to.
Can somebody explain whether I can use dmq_usrloc for this purpose? Or is
it only intended to be used for bidirectional replication?
Best Regards,
Sebastian
Hi,
I whenever I try to add rtpproxy to my config file
modparam("nathelper", "rtpproxy_sock", "udp:firsthost:12221
udp:secondhost:12221")
, I get this error.
0(45810) ERROR: <core> [modparam.c:139]: set_mod_param_regex():
parameter <rtpproxy_sock> of type <1> not found in module <nathelper>
0(45810) : <core> [cfg.y:3435]: yyerror_at(): parse error in config
file /usr/local/etc/kamailio/kamailio.cfg, line 423, column 82: Can't
set module parameter
ERROR: bad config file (1 errors)
0(45810) INFO: <core> [sctp_core.c:53]: sctp_core_destroy(): SCTP API
not initialized
I am having with_nat.
Secondly, I tried with dispatcher and it works for one way calls. ie.
User1 is able to call User2, but vice versa is not possible. Both RTP1
and RTP2 are in different machines and Kamailio sits on a different
machine. All have identical network setups. And no NAT.
Any idea. Can somebody guide me? thanks.
regards
Ganesh Kumar
Hello everyone!
Setup:
I am currently using a Kamailio 4.2.3 on an embedded device (low CPU and RAM). The device is not able to store the current date, so after a reboot its 1. Jan 1970 until NTP updates the date.
Problem:
If the date is updated after the Kamailio has started (a leap of 45 years) the Kamailio uses up all the CPU and renders the device useless for a very long time.
Notes:
There are no incomming requests at the time. (But the Kamailio is not responsive during that time anyway.)
Adjusting the internal Kamailio-time seems to take longer when the date update leap is bigger.
My questions:
1) Can I prevent the Kamailio from using up the entire CPU after a date update? Or maybe do the internal ticks-update more gracefully?
2) For my better understanding: What happens within the Kamailio after adjust_ticks has updated the internal date?
Thanks in advance for your help!
Best regards,
Stefan
Hi Guys,
Hope all are well?
sorry to post but Im just trying to get something working where Im trying to convert a php function script into the kamailio.cfg.
Im getting there but wonder how I can group results of sets of avps with another avp.
Say I have these variables;
$(avp(NTgrp)) = 'SB100_000361@1.2.3.4|SB100_000213@1.2.3.5|SB100_000225@1.2.3.6|SB100_000361@1.2.3.7|SB100_000213@1.2.3.8';$(avp(Prio)) = '1|1|1|2|2';$(avp(Wgt)) = '10000|10000|80000|30000|70000';$(avp(CInc)) = '0|0|1|0|1';$(avp(WTot))= '100000|100000|100000|100000|100000'; I then run a while script to split up their variables via the delimiter | in user;
$var(j)=0;while($var(j)<$var(count)) {$(avp(NTgrpP))=$(avp(NTgrp){s.select,$var(j),|});$(avp(PrioP))=$(avp(Prio){s.select,$var(j),|});$(avp(WgtP))=$(avp(Wgt){s.select,$var(j),|});$(avp(CIncP))=$(avp(CInc){s.select,$var(j),|});$(avp(WTotP))=$(avp(WTot){s.select,$var(j),|});xlog("L_INFO"," Now Each time we have $(avp(NTgrpP)) $(avp(PrioP)) $(avp(WgtP)) $(avp(CIncP)) $(avp(WTotP))\n");$var(j)=$var(j)+1;}
This then results in;INFO: <script>: Now Each time we have SB100_000223(a)1.2.3.4 1 10000 0 100000INFO: <script>: Now Each time we have SB100_000225(a)1.2.3.5 1 10000 0 100000INFO: <script>: Now Each time we have SB100_000386(a)1.2.3.6 1 80000 0 100000INFO: <script>: Now Each time we have SB100_000213(a)1.2.3.7 2 30000 0 100000INFO: <script>: Now Each time we have SB100_000361(a)1.2.3.8 2 70000 0 100000
Now what Id like to do is group them via priorities so I can do some further functional checks on them when in same priority group, as you can see there are 3 results at priority 1 and 2 at priority 2.
Is there away I can create something of a multi-array using the AVP $(avp(PrioP)) I just created so I can group by priority?
As in php I would do something like;
$multi_arr[$prio_arr[$p]][] = array( "ntgrp" => $ntgrp_arr[$p], "prio" => $prio_arr[$p], "wght" => $wght_arr[$p], "cinc" => $cinc_arr[$p], "wtot" => $wtot_arr[$p], ); }
Any help would be great.
Many thanks
Jon