Aloha,
I'm experiencing this internal DNS problem with Kamailio, can't seem to
figure out what's causing it. Maybe someone can help.
Essentially, from time to time (one or two times a day) this situation
happens, starting with logs:
linux kamailio[773]: ERROR: uac [uac_reg.c:1163]: uac_reg_send(): failed to
send request for [some-uuid]
linux kamailio[773]: ERROR: <core> [core/resolve.c:1730]:
sip_hostport2su(): could not resolve hostname: "my.domain.net"
linux kamailio[773]: ERROR: tm [ut.h:309]: uri2dst2(): failed to resolve "
my.domain.net"
linux kamailio[773]: ERROR: tm [uac.c:480]: t_uac_prepare(): no socket found
# Do a Kamailio internal DNS lookup, no results found???
root@linux:~# kamcmd dns.lookup a my.domain.net
error: 400 - Not found
# Do a system DNS lookup. All good.
root@linux:~# dig my.domain.net
;; QUESTION SECTION:
;my.domain.net. IN A
;; ANSWER SECTION:
my.domain.net. 18000 IN A 192.168.0.1
# Delete internal Kamailio DNS record
root@linux:~# kamcmd dns.delete_a my.domain.net
# Lookup again right away. It's there, problem fixed. Why??
root@linux:~# kamcmd dns.lookup a my.domain.net
{
name: my.domain.net
type: A
size_bytes: 120
reference_counter: 2
permanent: no
expires: 7674
last_used: 0
negative_entry: no
records: {
{
rr_idx: 0
rr_ip: 192.168.0.1
rr_permanent: no
rr_expires: 7674
}
}
}
Hello,
I have some questions about dispatcher's behavior. I noticed that when I first ds_select_dst() a specific dispatcher group ID, ds_next_dst() will cycle through the active destinations in that group. When it reaches the end of the destinations in the group, it does not return "false", instead it starts to return destinations that are not a part of that group, ie. those destinations which are listed prior to the selected group in the dispatcher.list file. Is this the expected behavior? I've observed it on kamailio 5.3 and 5.5 releases.
My dispatcher.list:
# Group 1
1 sip:127.0.0.1:5071;transport=udp 8 0
# Group 2
2 sip:127.0.0.1:5072;transport=udp 8 0
# Group 3
3 sip:127.0.0.1:7010;transport=udp 8 0
3 sip:127.0.0.1:7011;transport=udp 8 0
3 sip:127.0.0.1:7012;transport=udp 8 0
# Group 4
4 sip:127.0.0.1:5071;transport=udp 8 0
4 sip:127.0.0.1:5072;transport=udp 8 0
I have the following in failure_route (excerpt):
$var(dsFoundDestination) = 0;
if (t_any_replied())
{
xavp_params_implode("_dsdst_", "$var(dsDestinations)");
xlog("L_INFO", "FAILURE ROUTE: Already have replies on this transaction. Selecting next destination from: [$var(dsDestinations)]");
if (ds_next_dst())
{
xavp_params_implode("_dsdst_", "$var(dsDestinations)");
xlog("L_INFO", "FAILURE ROUTE: Next destination selected: [$du] from [$var(dsDestinations)]");
$var(dsFoundDestination) = 1;
}
}
else if (ds_select_dst("3", "8")) // Dispatcher Group 3
{
xlog("L_INFO", "FAILURE ROUTE: Did not find any replies on this transaction. Selected destination: [$du]");
$var(dsFoundDestination) = 1;
}
if ($var(dsFoundDestination))
{
$var(logString) = "FAILURE ROUTE: Relayed to [" + $du + "]";
if (t_relay())
{
xlog("L_INFO", "$var(logString)");
}
}
Produces the following logs:
FAILURE ROUTE: Did not find any replies on this transaction. Selected destination: [sip:127.0.0.1:7012;transport=udp]
FAILURE ROUTE: Relayed to [sip:127.0.0.1:7012;transport=udp]
FAILURE ROUTE: Already have replies on this transaction. Selecting next destination from: [grp=3;uri=sip:127.0.0.1:7012;transport=udp;]
FAILURE ROUTE: Next destination selected: [sip:127.0.0.1:7011;transport=udp] from [grp=3;uri=sip:127.0.0.1:7011;transport=udp;]
FAILURE ROUTE: Relayed to [sip:127.0.0.1:7011;transport=udp]
FAILURE ROUTE: Already have replies on this transaction. Selecting next destination from: [grp=3;uri=sip:127.0.0.1:7011;transport=udp;]
FAILURE ROUTE: Next destination selected: [sip:127.0.0.1:7010;transport=udp] from [grp=3;uri=sip:127.0.0.1:7010;transport=udp;]
FAILURE ROUTE: Relayed to [sip:127.0.0.1:7010;transport=udp]
FAILURE ROUTE: Already have replies on this transaction. Selecting next destination from: [grp=3;uri=sip:127.0.0.1:7010;transport=udp;]
FAILURE ROUTE: Next destination selected: [sip:127.0.0.1:5072;transport=udp] from [grp=2;uri=sip:127.0.0.1:5072;transport=udp;]
FAILURE ROUTE: Relayed to [sip:127.0.0.1:5072;transport=udp]
FAILURE ROUTE: Already have replies on this transaction. Selecting next destination from: [grp=2;uri=sip:127.0.0.1:5072;transport=udp;]
FAILURE ROUTE: Next destination selected: [sip:127.0.0.1:5072;transport=udp] from [grp=2;uri=sip:127.0.0.1:5072;transport=udp;]
FAILURE ROUTE: Relayed to [sip:127.0.0.1:5072;transport=udp]
FAILURE ROUTE: Already have replies on this transaction. Selecting next destination from: [grp=2;uri=sip:127.0.0.1:5072;transport=udp;]
FAILURE ROUTE: Next destination selected: [sip:127.0.0.1:5071;transport=udp] from [grp=1;uri=sip:127.0.0.1:5071;transport=udp;]
FAILURE ROUTE: Relayed to [sip:127.0.0.1:5071;transport=udp]
I want to stop the loop once there are no more active destinations in group 3. Is the solution simply to check that the selected destination is part of the desired group and stop processing if it is not?
Thanks for your time.
Hello,
Kamailio SIP Server v5.7.2 stable release is out.
This is a maintenance release of the latest stable branch, 5.7, that
includes fixes since the release of v5.7.1. There is no change to
database schema or configuration language structure that you have to do
on previous installations of v5.7.x. Deployments running previous v5.7.x
versions are strongly recommended to be upgraded to v5.7.2.
For more details about version 5.7.2 (including links and guidelines to
download the tarball or from GIT repository), visit:
* https://www.kamailio.org/w/2023/09/kamailio-v5-7-2-released/
RPM, Debian/Ubuntu packages will be available soon as well.
Many thanks to all contributing and using Kamailio!
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - www.kamailioworld.com
Hello,
I am considering to release Kamailio v5.7.2 (out of branch 5.7) this
week (likely on Wednesday or Thursday, Sep 27/28, 2023). If anyone is
aware of issues not yet on the bug tracker, report them there asap in
order to have a better chance to be fixed.
Cheers,
Daniel
--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - www.kamailioworld.com
Hello Kamailio Community,
I'm currently working on a project that involves complex SIP routing and handling. I've encountered some difficulties while using change_reply_status, and append_hf functions in failure_route route in Kamailio. Although the documentation does provide guidance, the behaviors I am experiencing aren't aligning with the expected outcomes.
Issue 1: failure_route
I've set up a failure_route to handle specific SIP response codes (>4xx). However, I've observed that it get trigered and lunched, but I can't use change_reply_status or append_hf, I was using this first in onreply_route.
Issue 2: change_reply_status
I tried to use the change_reply_status function to modify the status of SIP replies, but it raises an error that this command cannot be executed here.
Issue 3: append_hf
I've also attempted to use append_hf in my failure_route block to add headers to replies, but the headers are not being added as expected.
As a workaround, I've been using send_reply and append_to_reply for adding custom headers, and they seem to be working as expected. However, I found some old messages in kamailio mailing list, I can summerize what I learned like this ```
#Functions and Context
- append_hf(): Adds a header to the currently processed SIP message. If you are in a route {...} block, then this adds the header to the request. If you are in an onreply_route, it adds the header to the reply. This function always acts on the message currently under scrutiny.
- append_to_reply(): This function is used to add a header to a reply that will be generated by Kamailio at a later time. This function only affects replies generated by Kamailio itself and is not applicable for messages that are simply being forwarded.
#Contexts
- route {...}: This is typically where the incoming SIP request gets processed. Here, append_hf() will add headers to that request, and append_to_reply() will add headers to any replies that Kamailio might generate for this request.
- onreply_route: This is where incoming SIP replies are processed. Here, append_hf() will act on the reply, not the request.
``` I'd like to know if there is a way to handle sip replies in failure_route, because send_reply make a new reply from kamailio, instead I want to keep some important headers from the original reply.
I'd appreciate any insights or guidance the community can offer.
Best regards,
Hello Kamailio,
Is it possible to use RTPengine with a single UDP port for all calls instead of a range of ports?
For example, when an invite is received or sent, the offered SDP for RTPengine is to receive RTP packets on a single port that is the same for all other calls, so that on firewalls only one port is to be opened.
Hello all,
I have my rtpengine configured to use ports 20000 - 50000 for RTP in
rtpengine.conf.
Now i want to able to select the port or the port range in a call by call
basis. Is that possible?
I've tried to use "media-address" flag on rtpengine_manage but i wasn't
successful.
Thanks in advance,
Cheers,
Duarte Rocha