Hi,
I was wondering what is the recommended approach to implement a failover on several destination SIP servers:
1) using DNS SRV records
2) using dispatcher list
3) combination of both.
Thanks,
AL
Hello Members,
Kamailio acc module is not inserting cdr into MySQL DB, sometimes it works
and sometimes didn't, the number of parameters/values are similar in failed
as well success scenario. I also check with tcpdump for MySQL requests,
unfortunately, Kamailio didn't issue insert query toward DB server, so it
is clear to me that the MySQL server is nothing to do with failed queries.
Please guide me on what I should do to find and fix the issue.
Kamailio Installed version :
kamailio -v
…
[View More]version: kamailio 5.4.1 (x86_64/linux) 2ca223
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, 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, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 2ca223
compiled on 12:51:24 Sep 21 2020 with gcc 6.3.0
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_logic.c:691]: tmcb_func(): acc callback called for t(0x7fe29b2a7870)
event type 512, reply code 200
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_logic.c:413]: should_acc_reply(): probing acc state - code: 200 flags:
0x6
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_logic.c:446]: should_acc_reply(): acc is on
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 0
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 1
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 2
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 4
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 5
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 6
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 7
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 8
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 9
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 10
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 11
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 12
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 13
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 16
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 17
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 19
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 20
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 22
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 26
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 28
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 29
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 32
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 6, index i 33
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: tm
[t_hooks.c:256]: run_trans_callbacks_internal(): DBG: trans=0x7fe29b2a7870,
callback type 512, id 0 entered
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 0
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 1
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 2
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 3
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 4
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 5
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 8
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 9
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 11
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 12
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 14
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 18
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 20
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 21
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 24
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 25
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: ERROR: acc
[acc_cdr.c:267]: db_write_cdr(): failed to insert into database
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 0
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 1
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 2
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 3
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 4
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 5
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 8
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 9
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 11
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 12
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 14
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 18
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 20
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 21
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 24
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: acc
[acc_extra.h:63]: free_strar_mem(): Freeing memory, type is 2,
message_index 3, index i 25
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: ERROR: acc
[acc_cdr.c:682]: cdr_on_end_confirmed(): failed to write cdr!
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103637]: DEBUG: tm
[t_reply.c:1758]: cleanup_uac_timers(): RETR/FR timers reset
Jan 28 13:38:29 /root/mykamailio/sbin/kamailio[103682]: DEBUG: tm
[timer.c:634]: wait_handler(): finished transaction: 0x7fe29727ba88
(p:0x7fe294d27288/n:0x7fe294d27288)
--
Regards
M Arqum
[View Less]
Hi there!
Go ahead I apologize for my English.
I have a Kamailio 5.4 with the DISPATCHER module and UAC enabled (for
remote REGISTER), the DISPATCHER has several SETIDs, and they have one
or more Asterisk balanced behind it.
In Kamalio script, when an endpoint does REGISTER, I enable the REGISTER
of the UAC module. And when it expires or expires=0 I disable the
REGISTER in the UAC module.
In the UACREG table in the database, L_UUID (unique key), L_USERNAME,
R_USERNAME, and …
[View More]AUTH_USERNAME have the same value. For example CST100EXT100.
Knowing that the DISPATCHER and UAC modules have no relationship, but
that when a SETID has several balanced Asterisks, how can I make the UAC
module send the REGISTER to all the Asterisks of a SETID?
Clarifications;
1.- I cannot update the Asterisk, which are currently in version 11.
They do not support PATH.
2.- I can modify the content of the UACREG table so that l_uuid has a
suffix '_X'.
3.- Call jsonrpc_exec several times to enable the REGISTER in the UAC
module.
(diff emulated)
< jsonrpc_exec ('{"id": 1, "jsonrpc": "2.0", "method": "uac.reg_enable",
"params": ["l_uuid", "s: $ au"]}') ;
> jsonrpc_exec ('{"id": 1, "jsonrpc": "2.0", "method":
"uac.reg_enable", "params": ["l_uuid", "s: $ au_1"]}') ;
> jsonrpc_exec ('{"id": 1, "jsonrpc": "2.0", "method":
"uac.reg_enable", "params": ["l_uuid", "s: $ au_2"]}') ;
> jsonrpc_exec ('{"id": 1, "jsonrpc": "2.0", "method":
"uac.reg_enable", "params": ["l_uuid", "s: $ au_3"]}') ;
But I want to know if there is any more elegant way to do this.
Cheers, JV
--
Logo <http://www.voiper.es/>
Javier Valencia | CTO
Centro de Negocios Martín Buendía
Camino de las Cañadas, nº 1C, Portal 1, 2ºG
29649 Mijas (Málaga)
# 951562080 (T) <tel:951562080> | 687486759 (M) <tel:687486759>
# www.voiper.es <http://www.voiper.es/>
------------------------------------------------------------------------
AVISO LEGAL
-----------
Este mensaje contiene información confidencial destinada para ser leída
exclusivamente por el destinatario. Queda prohibida la reproducción,
publicación, divulgación, total o parcial del mensaje así como el uso no
autorizados por el emisor. En caso de recibir el mensaje por error, se ruega
su comunicación al remitente lo antes posible. Por favor, indique
inmediatamente si usted o su empresa no aceptan comunicaciones de este tipo
por Internet.
Las opiniones, conclusiones y demás información incluida en este mensaje que
no esté relacionada con asuntos profesionales de SMART RECARGAS, S.L, se
entenderá que nunca se ha dado, ni está respaldado por el mismo.
Responsable del Tratamiento de Datos
------------------------------------
SMART RECARGAS , SL
Camino de las Cañadas, 1C PORTAL 1 2º G
29651 MIJAS COSTA (MALAGA)
[View Less]
Is it possible to send arbitrary text messages triggered by an external
application (evapi/http) to registered SIP clients via websocket?
The following doesn't seem to do anything.
KSR.corex.send_data("sip:user@example.com", "Message at $Ts");
--
--
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee, you should not
disseminate, distribute or copy this email. Please notify the sender
immediately by email if you …
[View More]have received this email by mistake and delete
this email from your system. Email transmission cannot be guaranteed to be
secure or error-free, as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender,
therefore, does not accept liability for any errors or omissions in the
contents of this message which arise as a result of email transmission. If
verification is required, please request a hard-copy version.
[View Less]
Hi there,
I was wondering if there's a way to log various core error events in some
DB.
For example, below error occurred
Jan 29 11:43:56 kamailio[11076]: {1 11440 INVITE
28b653bd-8f62-4085-a5ef-f2a4ac0f393d } ERROR: <core>
[core/parser/sdp/sdp_helpr_funcs.c:499]: extract_mediaip(): no `IP[4|6]'
address in `c=' field
Jan 29 11:43:56 kamailio[11076]: {1 11440 INVITE
28b653bd-8f62-4085-a5ef-f2a4ac0f393d } ERROR: <core>
[core/parser/sdp/sdp.c:430]: parse_sdp_session(): can't …
[View More]extract common
media IP from the message
Thanks in advance. Regards,
--Sergiu
[View Less]
Hello community,
Please your support, I tell you that I am integrating Kamailio with
MsTeams, after some time reviewing this, I finally achieved the connection
from my Kamailio server to MsTeams and I can validate that the connection
to MsTeams is in AP.
[root @ kamailio-server kamailio] # kamcmd dispatcher.list | egrep "URI |
FLAGS"
URI: sip: sip.pstnhub.microsoft.com;
transport = tls
FLAGS: AP
However, from the …
[View More]admin panel of MsTeams (Direct Routing) I see that the
connection to my sbc "sbc.netvoiceperu.com" is with TLS connectivity status
in "Active" but the SIP options status is in "Warning".
I have made calls from MsTeams thinking that the SIP options status would
change to "active" but it is still in "Warning" state. On the other hand, I
have enabled a siptrace in Kamailio and verify that the SIP OPTIONS from
kamailio are being sent in the following format to MsTeams.
OPTIONS sip: sip.pstnhub.microsoft.com; transport = tls SIP / 2.0
Via: SIP / 2.0 / TLS 161.35.44.66:5061
;branch=z9hG4bKea07.52224687000000000000000000000000.0
To: <sip: sip.pstnhub.microsoft.com; transport = tls>
From: <sip: sbc.netvoiceperu.com>; tag =
d3569c818b500aeb8c373426e76c2884-81763c71
CSeq: 10 OPTIONS
Call-ID: 13ea237a751e0c48-9148(a)161.35.44.66
Max-Forwards: 70
Content-Length: 0
User-Agent: kamailio (5.4.0 (x86_64 / linux))
As you can see, the SIP OPTIONS sent from Kamailio to MsTeams does not
contain the "Contact" field, which in theory said "Contact" field should
have been added by Kamailio according to the configuration added in
kamailio.cfg
event_route [tm: local-request] {
sip_trace ();
if (is_method ("OPTIONS") && $ ru = ~ "pstnhub.microsoft.com") {
append_hf ("Contact: <sip: sbc.netvoiceperu.com: 5061;
transport = tls> \ r \ n");
}
xlog ("L_INFO", "Sent out tm request: $ mb \ n");
}
As additional information, I inform you that I also managed to observe the
SIP OPTIONS that MsTeams sends to Kamailio.
OPTIONS sip: sbc.netvoiceperu.com: 5061; transport = tls SIP / 2.0
FROM: <sip: sip-du-a-eu.pstnhub.microsoft.com: 5061>; tag =
f1bdeb5f-662f-4544-a436-e9aa9ad78da4
TO: <sip: sbc.netvoiceperu.com>
CSEQ: 1 OPTIONS
CALL-ID: c47e2782-16c3-49cb-8931-24e9709d260a
MAX-FORWARDS: 70
VIA: SIP / 2.0 / TLS 52.114.75.24:5061;branch=z9hG4bK48b0e6be
CONTACT: <sip: sip-du-a-eu.pstnhub.microsoft.com: 5061>
CONTENT-LENGTH: 0
USER-AGENT: Microsoft.PSTNHub.SIPProxy v.2021.1.15.7 i.EUWE.10
ALLOW: INVITE, ACK, OPTIONS, CANCEL, BYE, NOTIFY
However I don't see the 200 OK SIP responses from Kamailio to MsTeams.
I think this may be the reason why I see the SIP OPTIONS status in
"Warning" from the MsTeams panel. Maybe the contact field is not being
added in the SIP OPTIONS messages that Kamailio sends to MsTeams and for
that reason I don't see 200OK responses from MsTeams.
Could you help me solve this please.
Cheers
Saludos Cordiales
--
*Willy Valles Rios*
*Unified Communications Specialist*
phone: +51955747343
em@il: willyvalles17(a)gmail.com
[View Less]
Hello,
I am trying to configure Kamailio as both an inbound and outbound proxy. Inbound requests flow Sip Trunk -> Kamailio -> Asterisk. Outbound requests flow Asterisk -> Kamailio -> Sip Trunk. Inbound traffic is sent to port 5060 on kamailio which listens on the PRIVATE_IP:5060 and advertises PUBLIC_IP:5060. How can we ensure that when messages are sent to the Sip Trunk they have Record-Route headers with the PUBLIC_IP and when messages are sent to asterisk they have Record-…
[View More]Route headers with the PRIVATE_IP?
[View Less]