Hello!
Is it possible to find out the name of the onreply_route that was set
before?
Something like this:
t_on_reply("MANAGE_REPLY");
...
if ( t_is_set("onreply_route") ) {
get_onreply_route_name();
...
}
--
BR,
Denys Pozniak
Hello Brothers,
I've installed kamailio throw "apt install" on Debian and it's installed version: kamailio 5.6.3 (x86_64/linux).
Now I've a big problem that kamailio cannot running with TLSv1 and it has to be TLSv1.2+ as tls.cfg doc said:
# We do not enable anything else than TLSv1.2+
# over the public internet. Clients do not have
# to present client certificates by default.
How could I avoid this restriction please to enable TLSv1?
Thank you,
Hi
I am running kamailio 5.4 on debian
I have carrierfailureroute configured incase of primary service provider
fails. I also have Stirshaken configured to add Identity header on outbound
calls. Issue is when call fail overs to carrierfailureroute,
http_async_query changes $ru to the primary carrier
From the debug logs, when primary carrier sends a 488 (primary carrier
expects SIP TLS but my call is UDP - to test the failover scenario)
39(285) DEBUG: {1 18398 INVITE 8EmmsLqNuMRYBduMqFgX3w4JHAn4C2xn} tmx
[t_var.c:561]: pv_get_tm_reply_code(): reply code is <488>
39(285) DEBUG: {1 18398 INVITE 8EmmsLqNuMRYBduMqFgX3w4JHAn4C2xn}
carrierroute [cr_func.c:178]: set_next_domain_on_rule(): searching for
matching routing rules39(285) INFO: {1 18398 INVITE
8EmmsLqNuMRYBduMqFgX3w4JHAn4C2xn} carrierroute [cr_func.c:197]:
set_next_domain_on_rule(): next_domain is 47987
Carrier route rewrites the failover carrier
39(285) INFO: {1 18398 INVITE 8EmmsLqNuMRYBduMqFgX3w4JHAn4C2xn}
carrierroute [cr_func.c:706]: cr_do_route(): uri 14371234567 was rewritten
to sip:14371234567@sip.primaryprovider.com, carrier 1, domain 47987
Before http_async_query rd and ru are still the failover carrier
39(285) INFO: {1 18398 INVITE 8EmmsLqNuMRYBduMqFgX3w4JHAn4C2xn} <script>:
[callid: 8EmmsLqNuMRYBduMqFgX3w4JHAn4C2xn] - [cfg:2976] - Debug testing
----- rd is sip.primaryprovider.com ----- ru is
sip:14371234567@sip.primaryprovider.com
39(285) DEBUG: {1 18398 INVITE 8EmmsLqNuMRYBduMqFgX3w4JHAn4C2xn}
http_async_client [async_http.c:469]: async_send_query(): transaction
suspended [5261:1830449764]
39(285) DEBUG: {1 18398 INVITE 8EmmsLqNuMRYBduMqFgX3w4JHAn4C2xn}
http_async_client [async_http.c:625]: async_push_query(): query sent [
https://authn-uat.ccid.neustar.biz/ccid/authn/v2/identity?apiKey=randomkey]
(0x7fdcad097e60) to worker 1
However, when the route is being called after the http_async_query it
changes to the primary one:
26(272) DEBUG: tm [t_lookup.c:1612]: t_lookup_ident_filter(): transaction
found
26(272) DEBUG: http_async_client [async_http.c:235]: async_http_cb():
resuming transaction (5261:1830449764)
26(272) DEBUG: tm [t_lookup.c:1612]: t_lookup_ident_filter(): transaction
found
26(272) INFO: <script>: [callid: 8EmmsLqNuMRYBduMqFgX3w4JHAn4C2xn] -
[cfg:2995] - Debug testing ----- rd is 1.2.3.4 ----- ru is
sip:14371234567@1.2.3.4:5061;transport=TLS
Due to this, call keeps going to the primary and it fails
if ( http_async_query(STIRSHAKEN_AS_URL, "AS_RESPONSE") == -1 ) {
xlog("L_ERR ", "[cfg:$cfg(line)] Failed to connect AS service for token $fu
-> $tu \n");
return;
}
route[AS_RESPONSE] {
xlog("L_INFO", "[callid: $ci] - [cfg:$cfg(line)] - Debug testing ----- rd
is $rd ----- ru is $ru\n");
if ($http_ok) {
xlog("L_INFO", "[cfg:$cfg(line)] Resuming outbound call transaction for $fu
-> $tu Received - $http_rb \n");
# Add identity and Date headers
if (jansson_get("identity", $http_rb, "$var(identity)")) {
insert_hf("Identity: $var(identity)\n", "Content-Length");
}
if (jansson_get("date", $http_rb, "$var(date)")) {
if ($hdr(Date) != $null){
remove_hf("Date");
}
insert_hf("Date: $var(date)\n", "Identity");
}
} else {
xlog("L_ERR", "[cfg:$cfg(line)] Resuming outbound call transaction. Error -
$http_err)\n");
}
route(RELAY);
exit;
}
Please help to understand why rd / ru changes to primary carrier.
Regards,
Maharaja Azhagiah
I have kamailio behind a TLS termination proxy so the sockets are correctly
deduced to be TCP. However the clients only talk TLS to the proxy and are
confused when the top Via header added by Kamailio is TCP. Is there a way
for Kamailio to forcibly pretend its protocol is TLS? Like
advertised_address but "advertised_protocol" instead.
(With pjsip testing: it has a flag use_tls which ignores TCP from Kamailio
and continues to use the persistent TLS transport to proxy. Linphone fails
because it tries to honor TCP in Via and is unable to establish TCP
transport).
BTW I am using t_relay_to_tcp so Kamailio will return traffic to the proxy
as TCP even though the contact addresses specify transport=TLS.
Hi everyone,
I am trying to assign environment variable as follows
listen=udp:0.0.0.0:5060 advertise $env(MY_IP):5060
Looks like using the environment variable as above is an invalid
configuration.
Is there a way to use IP from env var to advertise. Even better, is there a
way to use result in a stun query as an advertised address?
Thank you,
Pavan Kumar
Hello!
I have a problem when sending a response sl_send_reply("415", "The other party does not support video calling!"); in route[HTTP_REPLY].
When I make a request using http_async_query() to send a push notification to a mobile device, I need to process the response from the push server and respond with a SIP message to the client. Before sending the request I do $http_req(suspend) = 0;
What am I doing wrong? Why are $fU and $ru equal to null ?
#processing HTTP responses
route[HTTP_REPLY] {
if ($http_ok && $http_rs == 200) {
xlog("L_INFO", "route[HTTP_REPLY]: status $http_rs\n");
xlog("L_INFO", "route[HTTP_REPLY]: body $http_rb\n");
} else if($http_rs == 415 || $http_rs == "415") {
xlog("L_ERR", "route[HTTP_REPLY]: caller: $fU phone: $ru error: $http_err)\n");
send_reply("415", "The other party does not support video calling!");
} else {
xlog("L_ALERT", "route[HTTP_REPLY]: error $http_err)\n");
}
#exit;
}
Hi all,
i have a problem with my Kamailio SIP Server.
I set up a Kamailio SIP server in a virtual machine on a private network and i connect to this with a WireGuard VPN.
The problem is that i can connect to the SIP server throught different clients and users and i can call the other users, the devices ring and i can answer to the calls but unfortunatly there is no audio during the call :(
I can't understand why, it seems all si OK, a year ago i set up another SIP server with the same configuration and all works correctly with it.
Can anyone help me to understand why? I can copy and paste here all the config files if you need it.
Thank you so much in advance
Christian
Hi
I've an issue with serial call forking and I hope somebody can help me...
What I'm trying to reach:
We are using Kamailio in a dynamic network with multiple nodes. The
dialplan is implemented using the KEMI interface. The call routing is
completely dynamic. At the moment, we are having call groups, which may
contain 1 or more recipients. If the number of this call group is called,
Kamailio is doing a parallel forking to all group participants. Now I'm
trying to extend the feature, that if nobody hooks up, the call is
forwarded to another number. This has been implemented with serial forking.
So the dialplan adds branches for all call group members with a q value of
1 and the last branch is the failover number with a lower q value. The
branching and failure route works fine.
The problem:
* I have a call group (G Bob 900101), with one participant (Bob 200102).
* The group has a fail over number (if Bob doesn't hook up), which points
again to Bob. I know that this use case doesn't make much sense, but it has
been simplified to show the problem. The failover number can be anything
also another call group which may contain one or more recipients from the
first group again.
* Alice (200101) calls the call group
* The first node (10.0.1.1/10.64.0.1) receives the call and forks it to
branch 1 Bob (202102) with q value 1.0 and to a second branch Bob (202102)
with q value 0.5. fr_timer is set to 10s
* The call is forwarded to node 2 (10.0.2.1/10.64.0.2), where Bob is
registered.
* The call is forwarded to Bobs device (Grandstream GXV3350) and the phone
is ringing.
* After 10s, the first node detects the 408 Request Timeout and switches to
the second branch
* The invite is sent to node 2 and Bobs device again.
* Node 1 also sends a CANCEL to node 2 and Bobs device for the first branch.
* The call in Bobs device is terminated
* Now the problem, the device does not react to the second INVITE. And
after the fr_inv_timer expires, the call is terminated with a 408 Request
Timeout.
I can see that the second INVITE contains another branch ID <ID>.1 compared
to the first INVITE, which had <ID>.0. The CANCEL is also sent with <ID>.0.
I've also tried with a Cisco 8861 3PCC and it doesn't work either. Compared
to the Grandstream, the Cisco device returns an error 500 upon the second
INVITE. Since both devices do not accept what I'm trying, I guess I'm doing
something wrong...
At the moment I'm a bit lost, what the problem could be.
Does somebody have an idea what it is and how I could solve it?
Following two SIP dumps from node 1 and node 2:
Node 1:
|Time | 10.0.1.128 | 10.64.0.1
|
| | | 10.0.1.1 | |
10.0.2.1 |
|2024-01-31 14:17:07.792784| INVITE SDP (g711A g7 |
| |SIP INVITE From: "Alice" <
sips:200101@10.0.1.1:5061> To:<sips:900101@10.0.1.1:5061>
Call-ID:2102072978-5060-296@BA.A.B.BCI CSeq:2950
| |(47276) ------------------> (5061) | |
|
|2024-01-31 14:17:07.793060| 407 Proxy Authentica |
| |SIP Status 407 Proxy Authentication
Required
| |(47276) <------------------ (5061) | |
|
|2024-01-31 14:17:07.796613| ACK | |
| |SIP ACK From: "Alice" <
sips:200101@10.0.1.1:5061> To:<sips:900101@10.0.1.1:5061> CSeq:2950
| |(47276) ------------------> (5061) | |
|
|2024-01-31 14:17:07.799045| INVITE SDP (g711A g7 |
| |SIP INVITE From: "Alice" <
sips:200101@10.0.1.1:5061> To:<sips:900101@10.0.1.1:5061>
Call-ID:2102072978-5060-296@BA.A.B.BCI CSeq:2951
| |(47276) ------------------> (5061) | |
|
|2024-01-31 14:17:07.836471| 100 trying -- your c |
| |SIP Status 100 trying -- your call is
important to us
| |(47276) <------------------ (5061) | |
|
|2024-01-31 14:17:07.865219| | |
INVITE SDP (g711A g7 |SIP INVITE From: "Alice" <
sips:200101@10.0.1.1:5061> To:<sips:900101@10.0.1.1:5061> CSeq:2951
| | | |(5061)
------------------> (5061) |
|2024-01-31 14:17:08.036334| | |
100 trying -- your c |SIP Status 100 trying -- your call is
important to us
| | | |(5061)
<------------------ (5061) |
|2024-01-31 14:17:08.084421| | |
180 Ringing |SIP Status 180 Ringing
| | | |(5061)
<------------------ (5061) |
|2024-01-31 14:17:08.096834| 180 Ringing |
| |SIP Status 180 Ringing
| |(47276) <------------------ (5061) | |
|
|2024-01-31 14:17:18.099644| | |
INVITE SDP (g711A g7 |SIP INVITE From: "Alice" <
sips:200101@10.0.1.1:5061> To:<sips:900101@10.0.1.1:5061> CSeq:2951
| | | |(5061)
------------------> (5061) |
|2024-01-31 14:17:18.100099| | |
CANCEL | |SIP CANCEL From: "Alice" <
sips:200101@10.0.1.1:5061> To:<sips:900101@10.0.1.1:5061> CSeq:2951
| | | |(5061)
------------------> (5061) |
|2024-01-31 14:17:18.259375| | |
100 trying -- your c |SIP Status 100 trying -- your call is
important to us
| | | |(5061)
<------------------ (5061) |
|2024-01-31 14:17:18.274841| | |
200 canceling |SIP Status 200 canceling
| | | |(5061)
<------------------ (5061) |
|2024-01-31 14:17:18.296942| | |
487 Request Terminat |SIP Status 487 Request Terminated
| | | |(5061)
<------------------ (5061) |
|2024-01-31 14:17:18.298630| | |
ACK | |SIP ACK From: "Alice" <
sips:200101@10.0.1.1:5061> To:<sips:900101@10.0.1.1:5061> CSeq:2951
| | | |(5061)
------------------> (5061) |
|2024-01-31 14:17:20.281602| | |
408 Request Timeout |SIP Status 408 Request Timeout
| | | |(5061)
<------------------ (5061) |
|2024-01-31 14:17:20.283433| | |
ACK | |SIP ACK From: "Alice" <
sips:200101@10.0.1.1:5061> To:<sips:900101@10.0.1.1:5061> CSeq:2951
| | | |(5061)
------------------> (5061) |
|2024-01-31 14:17:20.307343| 408 Request Timeout |
| |SIP Status 408 Request Timeout
| |(47276) <------------------ (5061) | |
|
|2024-01-31 14:17:20.309097| ACK | |
| |SIP ACK From: "Alice" <
sips:200101@10.0.1.1:5061> To:<sips:900101@10.0.1.1:5061> CSeq:2951
| |(47276) ------------------> (5061) | |
|
Node 2:
|Time | 10.64.0.1 | 10.64.0.2
|
| | | 10.0.2.1 | |
10.0.2.128 |
|2024-01-31 14:17:07.869305| INVITE SDP (g711A g7 |
| |SIP INVITE From: "Alice" <
sips:200101@10.0.1.1:5061> To:"Bob" <sips:900101@10.0.1.1:5061>
Call-ID:2102072978-5060-296@BA.A.B.BCI CSeq:2951
| |(54454) ------------------> (5061) | |
|
|2024-01-31 14:17:08.036009| 100 trying -- your c |
| |SIP Status 100 trying -- your call is
important to us
| |(5061) <------------------ (5061) | |
|
|2024-01-31 14:17:08.050848| | |
INVITE SDP (g711A g7 |SIP INVITE From: "Alice" <
sips:200101@10.0.1.1:5061> To:"Bob" <sips:900101@10.0.1.1:5061> CSeq:2951
| | | |(5061)
------------------> (5060) |
|2024-01-31 14:17:08.054357| | 100 Trying|
| |SIP Status 100 Trying
| | |(5061)
<-------------------------------------- (5060) |
|2024-01-31 14:17:08.075422| | 180 Ringing
| |SIP Status 180 Ringing
| | |(5061)
<-------------------------------------- (5060) |
|2024-01-31 14:17:08.083887| 180 Ringing |
| |SIP Status 180 Ringing
| |(5061) <------------------ (5061) | |
|
|2024-01-31 14:17:18.100359| INVITE SDP (g711A g7 |
| |SIP INVITE From: "Alice" <
sips:200101@10.0.1.1:5061> To:"Bob" <sips:900101@10.0.1.1:5061>
Call-ID:2102072978-5060-296@BA.A.B.BCI CSeq:2951
| |(54454) ------------------> (5061) | |
|
|2024-01-31 14:17:18.258947| 100 trying -- your c |
| |SIP Status 100 trying -- your call is
important to us
| |(5061) <------------------ (5061) | |
|
|2024-01-31 14:17:18.273819| | |
INVITE SDP (g711A g7 |SIP INVITE From: "Alice" <
sips:200101@10.0.1.1:5061> To:"Bob" <sips:900101@10.0.1.1:5061> CSeq:2951
| | | |(5061)
------------------> (5060) |
|2024-01-31 14:17:18.274460| CANCEL | |
| |SIP Request CANCEL CSeq:2951
| |(54454) ------------------> (5061) | |
|
|2024-01-31 14:17:18.274550| | |
CANCEL | |SIP CANCEL From: "Alice" <
sips:200101@10.0.1.1:5061> To:"Bob" <sips:900101@10.0.1.1:5061> CSeq:2951
| | | |(5061)
------------------> (5060) |
|2024-01-31 14:17:18.274615| 200 canceling |
| |SIP Status 200 canceling
| |(5061) <------------------ (5061) | |
|
|2024-01-31 14:17:18.277438| | 200 OK |
| |SIP Status 200 OK
| | |(5061)
<-------------------------------------- (5060) |
|2024-01-31 14:17:18.279335| | 487 Request
Terminated | |SIP Status 487 Request Terminated
| | |(5061)
<-------------------------------------- (5060) |
|2024-01-31 14:17:18.280785| | |
ACK | |SIP ACK From: "Alice" <
sips:200101@10.0.1.1:5061> To:"Bob" <sips:900101@10.0.1.1:5061> CSeq:2951
| | | |(5061)
------------------> (5060) |
|2024-01-31 14:17:18.296312| 487 Request Terminat |
| |SIP Status 487 Request Terminated
| |(5061) <------------------ (5061) | |
|
|2024-01-31 14:17:18.298900| ACK | |
| |SIP ACK From: "Alice" <
sips:200101@10.0.1.1:5061> To:"Bob" <sips:900101@10.0.1.1:5061> CSeq:2951
| |(54454) ------------------> (5061) | |
|
|2024-01-31 14:17:20.280965| 408 Request Timeout |
| |SIP Status 408 Request Timeout
| |(5061) <------------------ (5061) | |
|
|2024-01-31 14:17:20.283730| ACK | |
| |SIP ACK From: "Alice" <
sips:200101@10.0.1.1:5061> To:"Bob" <sips:900101@10.0.1.1:5061> CSeq:2951
| |(54454) ------------------> (5061) | |
|
At the moment, I'm using Kamailio 5.5.4, but I also did a short try with a
newer version (I guess it was 5.7.4). Both versions showed the same issue.
Best regards
Mathias