Hi!
I'm wondering if there is a way for the acc-module to notify/send an event to Kamailio (so I can pick it up from the config, similar to event_route) once the acc-module has performed a write?
As an example I'm using acc and db-mysql to store acc data in MySQL, but instead of having a service polling the MySQL for new acc's written I'd like to make Kamailio send an event once an acc-row has been written. I realize this could most likely be done by using MySQL triggers "ON INSERT", but I'm wondering if there is another (reliable) way to do this directly from within Kamailio?
I haven't tested it, but I would guess that if I tried to use for example event_route[dialog:end] there could be times where the event would hit Kamailio before the acc-module have written to missed_calls?
Thanks!
/Tobias
Hi all,
I am trying to execute external Perl script from the Kamailio config
file. My script accepts few command line parameters but if I try to pass
command line parameters like below, It is not working.
exec_msg("/root/test.pl 10000 '$var(env)' '$fU'"); # i tried with exec_avp
also
How to execute the external Perl scripts with few arguments.
Thank you in Advance.
--
View this message in context: http://sip-router.1086192.n5.nabble.com/Executing-perl-script-with-command-…
Sent from the Users mailing list archive at Nabble.com.
In the case below though TLS session is established between proxy1 and proxy2, invite is fwded on UDP.
1. How to force Kamailio to use existing tls session to communicate? (proxy1)
2. What is the command to look at if existing tls sessions are present from proxy1
a. kamcmd tls.list does it, but I need one which works from within config.
From: Pranathi Venkatayogi
Sent: Tuesday, January 24, 2017 11:02 AM
To: 'Kamailio (SER) - Users Mailing List' <sr-users(a)lists.sip-router.org>
Subject: How does Kamailio decide which protocol to use when fwding to another proxy?
Hi,
I have two instances of Kamailio acting as edge proxies. One on the customer side and one on the agent side.
Like: customer -> proxy1 -> proxy2 -> agent.
Both customer and agent are registered to proxy1/proxy2 via TLS.
However when proxy1 forwards to proxy2, it is using UDP. How can I force it to use TLS?
Attached is the result of nslookup on the domain: translation.sms-test.cyracom.com.
Thanks
Pranathi
[cid:image002.jpg@01D27654.0A627200]
Hi all,
I am using debian jessie, I just installed kamailio 4.4 from source and
trying to create kamailio database using kamdbctl but when i try to run the
kamdbctl create i am getting following charset error.
/usr/local/sbin/kamdbctl create
MySQL password for root:
INFO: creating database kamailio ...
ERROR 1115 (42000) at line 1: Unknown character set: 'ISO'
Mysql Version :
5.5.52
Thank you in advance
--
View this message in context: http://sip-router.1086192.n5.nabble.com/kamdbctl-error-tp155288.html
Sent from the Users mailing list archive at Nabble.com.
I'm following the latest Kamailio and Asterisk Realtime guide to offload
registrations from my FreePBX / Asterisk setup and possibly load balance
down the road. I'm running Kamailio 4.4.5 and Asterisk 11.6-cert15. I
realize FreePBX isn't realtime and will work around that with a database
view, etc.
I was excited to see Kamailio will handle multiple devices registering to
the same device/extension and placing / receiving calls works. I did run
into an issue when any device unregisters Kamailio always forwards the
register with expires 0 to Asterisk. To workaround this I modified the
route[REGFWD] and added the if($hdr(Expires)==$null) chunk of code. I
wanted to use caller->count, but ran into stale contact records with
expires set to deleted. I then tried enumerating the contacts, but don't
understand why ulc(caller->expires) is 10 when kamctl ul show shows expires
deleted. The code below works, but I was hoping for an explanation of the
expires = 10 or if there was a better way to handle this scenario.
Additionally I enabled presence (WITH_PRESENCE) but Kamailio responds 489
bad event for subscribe requests from devices registered to it. I was
hoping it would proxy these to Asterisk for BLF support. If somebody could
point me in the right direction it would be appreciated.
# Forward REGISTER to Asterisk
route[REGFWD] {
if(!is_method("REGISTER"))
{
return;
}
if($hdr(Expires)==$null)
{
reg_fetch_contacts("location", "$sel(contact.uri)",
"caller");
$var(i) = 0;
$var(j) = 0;
while($var(i) < $(ulc(caller=>count)))
{
if($(ulc(caller=>expires)[$var(i)])!=10)
{
$var(j) = $var(j) + 1;
}
$var(i) = $var(i) + 1;
}
if($var(j)>=1)
{
return;
}
}
$var(rip) = $sel(cfg_get.asterisk.bindip);
$uac_req(method)="REGISTER";
$uac_req(ruri)="sip:" + $var(rip) + ":" +
$sel(cfg_get.asterisk.bindport);
$uac_req(furi)="sip:" + $au + "@" + $var(rip);
$uac_req(turi)="sip:" + $au + "@" + $var(rip);
$uac_req(hdrs)="Contact: <sip:" + $au + "@"
+ $sel(cfg_get.kamailio.bindip)
+ ":" + $sel(cfg_get.kamailio.bindport) +
">\r\n";
if($sel(contact.expires) != $null)
$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$sel(contact.expires) + "\r\n";
else
$uac_req(hdrs)= $uac_req(hdrs) + "Expires: " +
$hdr(Expires) + "\r\n";
uac_req_send();
}
Thanks,
Ryan
Hi Guys,
Im using a keepalived solution between 2 kamailio boxes, with
net.ipv4.ip_nonlocal_bind
=1 .
On the "non master" I pretty much constantly get these logs in syslog.
What Im looking for is a way to suppress these because they are expected in
my configuration.
is there any way to tell kamailio to not log this... ( or at least, not at
CRIT and ERROR )
*Jun 25 10:32:53 lb2 /usr/sbin/kamailio[24869]: ERROR: tm
[../../forward.h:208]: msg_send(): udp_send failed*
*Jun 25 10:32:53 lb2 /usr/sbin/kamailio[24869]: ERROR: <core>
[udp_server.c:576]: udp_send():
sendto(sock,0x7fc0732d5ab0,380,0,xxx.xxx.xxx.xxx:5060,16): Invalid
argument(22)*
*Jun 25 10:32:53 lb2 /usr/sbin/kamailio[24869]: CRITICAL: <core>
[udp_server.c:581]: udp_send(): invalid sendtoparameters#012one possible
reason is the server is bound to localhost and#012attempts to send to the
net*
--
Sincerely
Jay
Hi,
I am using Kamailio behind NAT, unable to figure how to make it put “public ip” in Record-route header, I am manually inserting the hard-coded header myself as below.
However now I am having trouble choosing the right port number in all scenarios.
$var(dstPort) = 5061;
if (dst_port==5060)
{
$var(dstPort) = 5060;
}
insert_hf("Record-Route: <sip:MY_PUBLICIP_ADDR:$var(dstPort);transport=tls;lr;nat=yes>\r\n", "Record-Route");
In one scenario I see the conflicting port numbers in “via” header vs “Record route”.
The ACK is being set to port 5060 based on Record route header and is not being received by the callee.
2017-01-23 14:52:49.970233 [blink.exe 2780]: SENDING: Packet 11, +0:00:36.411867
10.0.27.108:58217 -(SIP over TLS)-> 172.31.211.31:5061
SIP/2.0 180 Ringing
Via: SIP/2.0/TLS 63.149.103.72:5061;received=172.31.211.31;branch=z9hG4bK4799.7067bd2a48063748a4c353fa408eaefa.0
Via: SIP/2.0/UDP 10.0.16.52;rport=5060;branch=z9hG4bK4799.935a27c6ef5ad112225964cbe7c1be44.0;i=2
Via: SIP/2.0/TLS 10.11.200.12:51793;rport=51793;received=10.11.200.12;branch=z9hG4bKPj49f6aeca3f9b4155ab4c5304b544aa4d;alias
Record-Route: <sip:63.149.103.72:5060;transport=tls;lr;nat=yes>
Record-Route: <sip:10.0.16.52:5061;transport=tls;lr;nat=yes>
Call-ID: 09ce10efa6a946bf9445ccc21857393e
From: "cust1" <sip:cust1@devtranslation.sms-test.cyracom.com>;tag=95082caabecc42548c2fec5ccd29e5de
To: <sip:spanish@translation.sms-test.cyracom.com>;tag=ec365cc8489b48a7bc5725d21b7d97a1
CSeq: 17422 INVITE
Server: Blink 3.0.0 (Windows)
Contact: <sip:20745891@10.0.27.108:58216;transport=tls>
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Content-Length: 0
Questions:
1. How can I let in-built record-route function automatically choose “public ip” so I can get rid of my manual insertion altogether.
2. If no option, what is the right way to choose the port on which packet is being received, so it is same as what is on “VIA”.
3. Any other pointers to improve the logic here?
Hello, everyone!
I'm trying to enable dns_srv_lb but I'm stuck just before I can get there.
If I don't enable use_dns_failover, lookups work and calls route but always
to the first host. We need to load balance, so that doesn't work very well.
If I enable use_dns_failover, the lookups stop working completely and we
get a dns lookup failure like so:
ERROR: tm [ut.h:296]: uri2dst2(): ERROR: uri2dst: failed to resolve "
redacted.hostname.here.com" :unresolvable A or AAAA request (-7)
This works:
use_dns_cache=on
dns_use_search_list=no
dns_try_naptr=on
# use_dns_failover=on
This breaks it:
use_dns_cache=on
dns_use_search_list=no
dns_try_naptr=on
use_dns_failover=on
I have checked to see that use_dns_failover is compiled in:
version: kamailio 4.4.2 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 4.9.2
Hi
I am running Kamailio 4.4 and have come across a strange SBC which is
sending DTMF within the SDP body of a NOTIFY with a Content-Type
audio/telephone-event.
Has anybody come across this before?
The content itself comes through on a tcpdump/ngrep trace as four dots
"...." and Kamailio puts an empty string into the logs if I try to log the
contents of $rb, however Wireshark manages to decode it as something
readable "\005\000\a\320" and usable. (essentially the digit 5)
Is there any way I can get access to this decoded version within Kamailio
at all? Even if I have to pass it out to an external program?
Many thanks for any help anyone can offer!
Pete
Hi,
What is the best way to get a complete dump of incoming/outgoing SIP messages of Kamailio server?
I encountered “SIPTrace” module, but it writes to database. Is there a way we can write to syslog instead?
Thanks
Pranathi