Hi guys,
I've implemented an rpc call that closes all WS connections:
void ws_rpc_close_all(rpc_t *rpc, void *ctx)
{
ws_connection_t **list = NULL, **list_head = NULL;
ws_connection_t *wsc = NULL;
int ret;
list_head = wsconn_get_list();
if(!list_head)
return;
list = list_head;
wsc = *list_head;
while(wsc) {
LM_WARN("Closing connection\n");
ret = close_connection(&wsc, LOCAL_CLOSE, 1000,
str_status_normal_closure);
wsc = *(++list);
}
wsconn_put_list(list_head);
}
Please take a look. Can I call close_connection() and perform list
iterations in this function not using WSCONN_LOCK?
Thanks,
Andrey
Today, I use Asterisk as a SIP/RTP PROXY
I proxy from customers Asterisks to a VOIP provider, in a multi-homed
server.
Now, I want to move to Kamailio without any rupture in customer's
configuration.
As anyone can imagine I am kind of lost.
USER ACCOUNTS
In Asterisk, I create a dynamic host account named ACCOUNT1 and I receive
in *FROM HEADER sip:ACCOUNT1@customer_ip_address*
In Kamailio, I have to define the account's domain like *kamctl add
ACCOUNT1(a)mydomain.com <ACCOUNT1(a)mydomain.com> password. *Kamailio just
accepts a REGISTER/INVITE from *ACCOUNT1(a)mydomain.com
<ACCOUNT1(a)mydomain.com>*
SIP/RTP PROXY
In Asterisk, I just dialout to the VOIP PROVIDER like *dial
(SIP/VOIP_ACCOUNT/${EXTENSION})*
Asterisk does all the magic (it is a B2BUA). It bridges the new call and
media to the original call. Moreover, user don't know anything about how
call are completed, nor how credentials are setup and soon.
In Kamailio, I guess that I have to use nat, tm and rtpproxy modules and
maybe uac. I am not sure how to setup it.
Can someone send me a clue?
Thank you,
Valter
I have been using the following version of kamailio
Version: kamailio 5.1.6 (x86_64/linux)
Default config: /usr/local/etc/kamailio/kamailio.cfg
Default paths to modules: /usr/local/lib64/kamailio/modules
Compile 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
MAX_RECV_BUFFER_SIZE=262144
MAX_URI_SIZE=1024
BUF_SIZE=65535
DEFAULT PKG_SIZE=8MB
DEFAULT SHM_SIZE=64MB
ADAPTIVE_WAIT_LOOPS=1024
TCP poll methods: poll, epoll_lt, epoll_et, sigio_rt, select
Source code revision ID: unknown
Compiled with: gcc 4.8.5
Compiled on: 11:48:33 Oct 11 2018
and I noticed today that the Kamailio service is crashing.
[root@kamailiostandby /]# gdb core.17805
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
[New LWP 17805]
Core was generated by `/usr/local/sbin/kamailio -P /run/kamailio/kamailio.pid -f /usr/local/SIP'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f636559e54b in ?? ()
"/core.17805" is a core file.
Please specify an executable to debug.
(gdb) list
No symbol table is loaded. Use the "file" command.
(gdb) bt
#0 0x00007f636559e54b in ?? ()
#1 0x00007f63a9571810 in ?? ()
#2 0x0000000000000000 in ?? ()
Regards
Hamid R. Hashmi
Hi,
We deploy kamailio in the cluster containing two nodes (Active and
Passive). When Active node becomes Passive, our websocket clients continue
sending REGISTER to this node. Passive node routes these requests to the
Active node through the UDP, that causes the following warning message:
2018-11-14T04:43:31.070005-08:00 qapbx-ca1-1 kamailio[25597]: WARNING:
<core> [core/forward.c:231]: get_send_socket2(): protocol/port
mismatch (forced udp:64.78.52.88:5060, to ws:10.9.3.116:20033)
Every registered client should be stored in the 'location':
$var(save_val) = save("location", 0, "sip:$au@$td");
if ($var(save_val) <= 0) {
xlog("L_ERR", "[$fU,R,$ci]: Registration saving failed, contact $ct");
sl_reply_error();
} else if ($var(save_val) == 3) {
xlog("L_INFO", "[$fU,R,$ci]: Unregistration accepted. Login: $fU; ua: $ua;
s-ip: $si; s-port: $sp; 3d parm: sip:$au@$td");
} else {
xlog("L_INFO", "[$fU,R,$ci]: Registration accepted. Login: $fU; ua: $ua;
s-ip: $si; s-port: $sp; 3d parm: sip:$au@$td");
}
Log output of the Avtive node:
2018-11-14T04:43:31.063376-08:00 qapbx-ca1-2 kamailio[24722]: INFO:
<script>: [54004221,R,ibca3ujmr0q81nn0l5puen]: REGISTER received with
R-URI: sip:64.78.52.90, ct:
<sip:vu2o757j@si7ofk7i8cs7.invalid;transport=ws>;+sip.ice;
reg-id=1;+sip.instance="<urn:uuid:00ff4c8d-2a5e-4614-b80a-d7c14c0e41e3>";expires=600,
cseq=1, s-ip: 64.78.52.88, s-port: 5060
2018-11-14T04:43:31.063947-08:00 qapbx-ca1-2 kamailio[24722]: INFO:
<script>: Our node is active
2018-11-14T04:43:31.064323-08:00 qapbx-ca1-2 kamailio[24722]: INFO:
<script>: [54004221,R,ibca3ujmr0q81nn0l5puen]: Authorization headers
are empty in REGISTER command. Send 401 Unauthorized to 64.78.52.88
2018-11-14T04:43:31.285967-08:00 qapbx-ca1-2 kamailio[24716]: INFO:
<script>: [54004221,R,ibca3ujmr0q81nn0l5puen]: REGISTER received with
R-URI: sip:64.78.52.90, ct:
<sip:vu2o757j@si7ofk7i8cs7.invalid;transport=ws>;+sip.ice;
reg-id=1;+sip.instance="<urn:uuid:00ff4c8d-2a5e-4614-b80a-d7c14c0e41e3>";expires=600,
cseq=2, s-ip: 64.78.52.88, s-port: 5060
2018-11-14T04:43:31.286564-08:00 qapbx-ca1-2 kamailio[24716]: INFO:
<script>: Our node is active
2018-11-14T04:43:31.286943-08:00 qapbx-ca1-2 kamailio[24716]: INFO:
<script>: [54004221,R,ibca3ujmr0q81nn0l5puen]: Registration accepted.
Login: 54004221; ua: JsSIP 3.2.11; s-ip: 64.78.52.88; s-port: 5060; 3d
parm: sip:54004221@qapbx-ca1.qaserverdata.net
but in this scenario the save() method stores null value in the 'received'
row. How can I fix it?
Thank you,
Andrey
Hello all,
I have the following issue (I think) with RTP engine. An INVITE comes in,
and rtpengine will rewrite the SDP accordingly, as configured in
kamailio.cfg. After some time a reINVITE is sent out in the opposite
direction, for session refresh purposes. As I use rtcp-mux-offer in
kamailio.cfg for this direction, RTPengine will inject the rtcp-mux
parameter, and this reINVITE is forwarded to the UAC that sent the original
INVITE.
However, the SDP in the reINVITE is exactly the same as the SDP in the 200
OK to the original INVITE, with the exception of the rtcp-mux parameter.
Since the SDP offered from the same end has changed, shouldn't session
version be incremented as well?
Does this sound like something that should be reported as a bug to
rtpengine? Or am I missing something here?
Thanks!
Best regards,
George Diamantopoulos
Greetings,
I have my core parameter listen like this :
listen=udp:eth0
children=12
Like this and the other settings, my kamailio has 21 threads and 20 Sql
connections.
If I add more listens,
listen=udp:eth0
listen=udp:eth0:5072
listen=udp:eth0:5074
Now I have 45 threads and 45 Sql connections.
Why does this happen and can i set a a number of threads and/or sql
connections that doesn't change with the number of "listen" parameters that
i have ?
Best Regards,
Duarte Rocha
Hi All:
I have a project that requires that I record the audio streams from an ongoing phone call. It seems that rtp_proxy module should do that, but I can't seem to get it to work.
My config file:
*if(nat_uac_test("8")) { //rtpproxy_manage("co"); xlog("L_INFO",
"rtpproxy Call is going to private IPv4 Media Server Engage RTPProxy
Now\n"); rtpproxy_manage("crwie","10.1.1.2"); } else {
//rtpproxy_manage("cor"); xlog("L_INFO", "rtpproxy Call is coming from a
private IPv4 Media Server Engage RTPProxy Now\n");
rtpproxy_manage("crwei","10.1.1.2"); } *There appears to be conversations going on with rtpproxy on both legs of the call. But I seem to be missing the step that records the audio*. *Anybody have an example of how to do this.
TIA, Bill
**
Hello,
Is it possible to set an algorithm like the following?
fs1 - Priority 10 - maxload 20 calls
fs2 - Priority 10 - maxload 20 calls
fs3 - Priority 9 - maxload 20 calls
fs4 - Priority 8 - maxload 20 calls
fs5 - Priority 7 - maxload 20 calls
So that, whenever any new call comes in, fs1 and fs2 would be used, meaning
the fs with the highest priority would be use UNLESS there's 20 calls on
that server, in which case, the next server with the highest priority would
be used.
Thanks!,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
ᐧ
Hello,
i try to get content from Invite request but it gives boundary error. it is not multipart or mixed content but it checks boundary and gives error.
Thanks.
My message
INVITE
Content-Type: application/resource-lists+xml
<resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists">
<list>
<entry uri="100?Call-ID=$calli&From=$fromtag&To=$toTag&Session-ID=1"/>
<entry uri="103?Call-ID=$calli2&From=$fromtag2&To=$toTag2&Session-ID=2"/>
</list>
</resource-lists>
static int ki_get_body_part_helper(sip_msg_t* msg, str* ctype, pv_spec_t *dst,
int mode)
{
...
if(get_boundary(msg, &boundary)!=0) {
LM_ERR("Cannot get boundary. Is body multipart?\n");
return -1;
}
....
int get_boundary(struct sip_msg* msg, str* boundary)
params.s = memchr(msg->content_type->body.s, ';',msg->content_type->body.len);
if (params.s == NULL)
{
LM_INFO("Content-Type hdr has no params <%.*s>\n",
msg->content_type->body.len, msg->content_type->body.s);
return -1;
}