Hello,
https://lists.kamailio.org/pipermail/sr-users/2020-October/110792.html
I read this thread very carefully and I think I managed to implement all
the steps described by Daniel. Thank you so much for the detailed
description.
But it looks like I'm stuck on the last step. I can't delete records from
htable when an incoming call cannot reach the registered device (e.g., no
more internet access, power off at the device). I try to do this from
failure route but looks like i kamailio has not access to htable from it.
failure_route[INTERNAL_TO_EXTERNAL_FAILURE] {
if (t_check_status("408")) {
xlog("L_WARN", "$ci|log| hello \n");
xlog("L_WARN", "$ci|log| mid reg token -
$sht(mid_reg_token=>$fU::$si::$sp) \n");
}
}
I do not see xlog message with mid reg token but i see 'hello'.
Yes, htable record exists in case i check using:
kamcmd htable.dump mid_reg_token
Also I need a way to remove registration at the registrar (Freeswitch in my
case). This means I need to send api request from kamailio or just run some
script that will do this. What is the best way ? module exec ?
Please advice,
Thanks
Hi All,
I am facing an issue in understanding how the min_se should be working in
kamailio. As per the SST documentation, it seems like if the min_se is
configured as 500, then any value of Session-Expires OR MIN-SE if lower
than 500, can be responded to by a 422.
However, I strangely see the reverse happening. To investigate further, I
looked in to the ki_sst_check_min() code in the master, and these seems
like a potential issue.
Ref Code: Inside ki_sst_check_min(), there is an if condition like below:
if (sst_min_se < MIN(minse, se.interval)) {
However, shouldn't it be the other way around? ie
if (sst_min_se > MIN(minse, se.interval)) {
because we need to send 422 if the received value(in INVITE etc) is
smaller than the sst configure min_se value?
I also found a different documentation, at
https://git.sgu.ru/oldssu/ex-opensips/blob/cb9df8d59dbb254a9d862569fd5d11f6…
where
the check is as below?
if (sst_min_se > MIN(minse, se.interval)) {
Can someone confirm if this is broken, or my understanding is incorrect?
Regards,
Harneet
--
"Once you eliminate the impossible, whatever remains, no matter how
improbable, must be the truth" - Sir Arthur Conan Doyle
Hi
The http_client module support the somehow old fashioned way to submit
credentials as part of the URL.
Our 'held' server developer would love to use either JWT or a Bearer
Token in the Auth-Header or a 'cookie-jar' to authenticate the
requests.
Is this somehow possible?
--
Mit freundlichen Grüssen
-Benoît Panizzon- @ HomeOffice und normal erreichbar
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________
Hi,
*sip_provider_proxy1[* uac module-register] ---> *kamailio* [dispatcher
Module] ----> *Asterisk1*
----> *Asterisk 2*
in my configuration kamailio register to the sip provider using *uac module*,
sip information are stored in database (uacreg).
when a incoming call(INVITE) come to kamailio it will dispatch call to
Asterisk using* "dispatcher module".*
Here i have couple of questions
1. If my SIP provider has a secondary proxy as a failover server
(sip_provider_proxy2), can I configure Kamailio with the uac module to use
the secondary proxy if the primary proxy fails?
2. Since my application is inbound-only, registration failure is only
identified when the registration expires (3600 seconds = 1 hour). Can I use
the dispatcher module to select the SIP proxy and switch the registration
to the secondary proxy if the primary proxy is not reachable (using
OPTIONS)?
Hello kamailio community,
i know its an unusual query but i would like to know if there is a cleaner/proper.right way to disable some (or all) media streams in SDP.
i have come with a solution by sdpops module with subst_body function like this.
route[SDP_DISABLE_UNAUTHORIZED_MEDIA]{
# disable text,media and video media streams
subst_body('#^m=(video|text|audio)[ ]+[0-9/]+(.*)$#m=\1 0 \2#ig');
# update originator ip address
subst_body('#^o=([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)$#o=\1 \2 \3 \4 \5 7.7.7.7#ig');
# 1 2 2 4 5 6
# name sid snumber network net-type addr
# update connection ip address
subst_body('#^c=([^ ]+)[ ]+([^ ]+)[ ]+([^ ]+)$#c=\1 \2 7.7.7.7#ig');
# 1 2 3
# network net-type addr
#remove all media attributes
sdp_remove_line_by_prefix("a=fmtp");
sdp_remove_line_by_prefix("a=X-");
sdp_remove_line_by_prefix("a=rtcp");
sdp_remove_line_by_prefix("a=ssrc");
sdp_remove_line_by_prefix("a=sendrecv");
sdp_remove_line_by_prefix("a=sendonly");
sdp_remove_line_by_prefix("a=recvonly");
sdp_remove_line_by_prefix("a=inactive");
sdp_remove_line_by_prefix("b=");
}
is it the right way to do it. if not can someone provide me an alternative solution.
Thanks :)
Hello
(added sr-users, as its probably more a usage question).
The SIP message (the BYE) cannot be parsed apparently. From the log it looks that there is an invalid character in the first line.
Do a network trace to analyse the packets that its actually send and try to get some more clues from that.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
> -----Original Message-----
> From: aaron.soto(a)dialapplet.com <aaron.soto(a)dialapplet.com>
> Sent: Freitag, 26. Mai 2023 10:44
> To: sr-dev(a)lists.kamailio.org
> Subject: [sr-dev] Troubles with outbound kamailio call to other server
>
> Hi everyone,
> I'm having the following errors in kamailio when i try to make an outbound call to
> other server, I don't know what does it mean, if some one can help me
>
> 11(25) ERROR: <core> [core/receive.c:310]: receive_msg(): core parsing of SIP
> message failed (XX.XX.XX.XX.5060/1)
> 13(27) ERROR: <core> [core/parser/parse_fline.c:271]: parse_first_line():
> parse_first_line: bad message (offset: 65)
> 13(27) ERROR: <core> [core/parser/msg_parser.c:681]: parse_msg(): ERROR:
> parse_msg: message=<BY
> sip:asterisk@10.0.5.158:4080;alias=10.0.5.158~44730~1 SIP/2.0
> Via: SIP/2.0/UDP 84.127.226.15:5060;branch=z9hG4bK3bc90b47;rport
> Route: <sip:34.252.151.179:4060;r2=on;lr;ftag=5c7f862f-9692-4028-8af0-
> ebc224ba0e2a;vsf=AAAAAAAAAAAAAAAAAAAJCQABGgUAAAMJLjE4ODo1MDYw;
> nat=yes>,<sip:10.0.5.40:4070;r2=on;lr;ftag=5c7f862f-9692-4028-8af0-
> ebc224ba0e2a;vsf=AAAAAAAAAAAAAAAAAAAJCQABGgUAAAMJLjE4ODo1MDYw;
> nat=yes>
> Max-Forwards: 70
> From: <sip:692598435@kamailio.voip.svc.cluster.local>;tag=as6f32aa26
> To: <sip:963441038@192.168.123.66:4060>;tag=5c7f862f-9692-4028-8af0-
> ebc224ba0e2a
> Call-ID: b9a49c52-7829-4cdf-a88c-0064cc5bb438
> CSeq: 102 BYE
> User-Agent: Asterisk PBX 11.2-cert3
> X-Asterisk-HangupCause: No user responding
> X-Asterisk-HangupCauseCode: 18
> Content-Length: 0
>
> >
> _______________________________________________
> Kamailio (SER) - Development Mailing List To unsubscribe send an email to sr-dev-
> leave(a)lists.kamailio.org
Hi Kamailio list,
I hope you are all well?
I am looking for some assistance on a specific error I am trying to work around.
Kamailio 5.5.3 - Ubuntu 20.04
Kemi Python script (but I think this is more default failure_route behaviour)
Dispatcher module which hunts to a group of FreeSWITCH that I have configured to send 503 responses on.
My scenario is fairly simple, I am trying to respond back to a carrier for huntable responses (503 specifically) by calling a failure route below:
def ksr_failure_manage(self, msg):
if KSR.tm.t_any_timeout()>0 :
self.ksr_send_reply_clear_rtpengine(msg, 503, "Timeout to destination")
KSR.err("Timeout to Invite for %s from IP %s" % (KSR.pv.get("$ci"),KSR.pv.get("$si")))
return 1
else:
self.ksr_send_reply_clear_rtpengine(msg, 503, "Unknown error failover to next node")
KSR.err("Failed but not timeout for %s from IP %s" % (KSR.pv.get("$ci"),KSR.pv.get("$si")))
return 1
This works and a 503 with the correct message is sent if the invite doesn't get a response after 2 seconds. (My specific test case here)
# Timers for call setup 2 minutes for any 1xx provisional response received
# If no invite response received in 2 seconds end the call as per failure route.
KSR.tm.t_set_fr(120000, 2000)
self.ksr_route_relay(msg)
KSR.tm.t_on_failure("ksr_failure_manage")
return -255
The issue is after a few more milliseconds after my initial 503 a 408 is sent. Also after the failover if the carrier tries the same Kamailio again it gets a 500 rather than a 408.
408:
[cid:image001.png@01D98F15.CD07DCB0]
500:
[cid:image002.png@01D98F15.CD07DCB0]
My steps to get around this have been to change the default tm code to 503 below, but this has not changed the default response and the above behaviour unfortunately:
# ----- tm params -----
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3)
# setting default reason code and response for general errors to allow failover.
modparam("tm", "default_code", 503)
modparam("tm", "default_reason", "Unknown reason try next node")
My question is: How can I make sure my failure route is the final response here. Or if I cannot make sure of this, how can I change the default mapped response to be a consistent SIP response (503 specifically)
Many thanks in advance as I am scratching my head on this one a bit.
John.
Using 5.6.x, a scenario designed for a public IP now needs to support life
in the cloud behind NAT. I'd like to avoid having two listeners to separate
on-net from off-net traffic. In a HA scenario, it would be nice to have
only one floating IP.
Is it possible to use the same local address and port for external/public
and internal/private traffic?
Should set_advertised_address() override the listen advertise address?
Initial testing did not produce the expected result. I want to make sure
I'm following a sane pattern before going down a rabbit hole. The idea is
to toggle the advertised address by checking if the sender or recipient
is rfc1918().
For the dispatcher module, is it possible to use socket names like
below? In testing it appeared that only one of the two names was valid.
listen=udp:10.0.0.10:5060 name "onnet"
listen=udp:10.0.0.10:5060 advertise 11.11.11.11:5060 name "offnet"
Hi gang
In 2024, Switzerland will start using NG112 (NG911) procedures to
transmit the caller location via Geolocation URL via LIS Server to a
PSAP.
So time to start testing this on my devel plattform. Kamailio ships
with the lost module which looks promising.
In short, the Procedure is as follows:
Customer calls emergency number.
Kamailio performs a http request to our inhouse HELD server with the
identification of the calling customer.
HELD server looks up the location of the caller and pushes a HELD XML
object to the Swiss LIS Server, which then is queried by the emergency
PSAP receiving the call. LIS server return and URL.
HELD server returns the URL to Kamailio.
Kamailio adds Geolocation Header with that URL and relays the call.
This takes some time and as the call is not yet being relayed while
waiting for the held request to complete, there is no 100 trying being
sent and the emergency call is bound to time out.
So, shall I call t_reply("100","Performing HELD lkup") before
calling the lost module? Or is there a better way?
Mit freundlichen Grüssen
-Benoît Panizzon-
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web http://www.imp.ch
______________________________________________________