Hi
I know that this is not question too much close to the kamialio users but
mostly losed to the RFC specifiacations but this community looks like
pretty much close to it that is why I want to ask this question here,
that's why sorry and thanks for help in this question:
I have a situation when provider sends me 200 response with Request-Route
header and changed contact header:
Means response comes from
1.1.1.1:5060
Request-Route contains:
1.1.1.1:5060
But Contact contains:
1.1.1.1:5061
My …
[View More]ACK (handled by kamailio) goes to the 1.1.1.1:5060 as it setted up at
the Route Hedaer of ACK (because of Request-Route)
but provider says me that i should use Contact for the ACK
I was surprised because of
https://tools.ietf.org/html/rfc3261#section-12.2.1.1
and
https://tools.ietf.org/html/rfc3261#section-8.1.2
Says that I should use Route header for reaching destination
But I was surprised second time when tested this scenario with FreeSwitch
and another softphone (as UA) because of it both sends ACK to the based on
Contact address and ignores Route
I just wanna ask if I missed some scenario in the RFC when it is described
to ignore Route header for the UA
(I know that I use kamailio on my case as proxy server but should
understand finally who should make changes with packet handling)
Thanks one more time for the resonses and sorry one more time for the goal
of this question that belongs to the kamailio just partially
[View Less]
Hi,
I am trying to configure kamailio to play early media and i am using
rtpproxy_stream2uac(), but the audio file plays only after the call is
connected.
How to use rtpproxy_stream2uac() to play only the early media.
Thank you
vinod.M.N
Hi,
I would like to setup up my SIP server / PBX for my business, now we have
some candidates:
1. Open source solution:
- Asterisk PBX,
- Freeswitch PBX
- Kamailio
- OpenSIPS
2. Business solution:
- Brekeke PBX(https://www.brekeke.com
- Vodia PBX(https://www.vodia.com)
- 3CX PBX(https://www.3cx.com)
- PortSIP PBX(https://www.portsip.com/portsip-pbx)
*Below features are mandatory for our project:*
- Video call recording (For the finance …
[View More]industry, the video recording is
necessary)
- Push notifications for mobile app
- Multi-tenant support
- Both Linux and Windows support (at 1st stage, we would like to run it
on Windows server and migrate it to Linux server in the future if users
increased), the Linux support is required, the Windows support is preferred.
We have some questions:
1. Does the the Kamailio can works as a PBX ?
2. If yes, does the Kamailio support push notifications and video
recording ?
3. Does the Kamailio can works for Multi-tenant ?
4. Does Kamailio support Windows ?
So far according to our research, with the business solution:
- The Vodia PBX, PortSIP PBX and brrekeke all are support Multi-tenant,
the 3CX is not.
- The 3CX and PortSIP support push notifications,
- The PortSIP also provide client SDK, with 3CX we only see the 3CX
provide client apps, does 3CX has client SDK provided ?
- It's seems all these PBX are support video recording ?
- The PortSIP PBX and 3CX both support Linux.
Please help me to make the decision, base on your experiences, which one
(open source or business solution) is good to us ? I'm really new to
VoIP...
Thanks in advance.
Best regards,
[View Less]
Hi!
I'm using linphone 3.6.1 as SIP client and Kamailio 4.4.4 as proxy
server and registrar.
And every time I try to change online status (presence) in linphone
client, I see following error messages in kamailio server log:
ERROR: presence_xml [add_events.c:167]: xml_publ_handl(): bad body format
ERROR: presence [publish.c:443]: handle_publish(): in event specific publish handling
ERROR: tm [t_reply.c:533]: _reply_light(): ERROR: _reply_light: can't generate 500 reply when a final 415 was …
[View More]sent out
ERROR: sl [sl.c:269]: send_reply(): failed to reply stateful (tm)
ERROR: presence [utils_func.c:146]: send_error_reply(): sending 500 Server Internal Error reply
ERROR: presence [publish.c:492]: handle_publish(): failed to send error reply
So it looks like kamailio is not able to parse presence change which is
linphone doing. I captured traffic via tcpdump what linphone sends:
21:58:58.704792 IP (tos 0x68, ttl 64, id 64109, offset 0, flags [DF], proto UDP (17), length 32)
LINPHONE_IP_ADDRESS.5060 > KAMAILIO_IP_ADDRESS.5060: SIP
21:58:58.704919 IP (tos 0x68, ttl 64, id 64110, offset 0, flags [DF], proto UDP (17), length 752)
LINPHONE_IP_ADDRESS.5060 > KAMAILIO_IP_ADDRESS.5060: SIP, length: 724
PUBLISH sip:USER@HOST SIP/2.0
Via: SIP/2.0/UDP LINPHONE_IP_ADDRESS:5060;rport;branch=z9hG4bK2049418743
From: User <sip:USER@HOST>;tag=184282924
To: User <sip:USER@HOST>
Call-ID: 1435474953
CSeq: 26 PUBLISH
Content-Type: application/pidf+xml
Max-Forwards: 70
User-Agent: Linphone/3.6.1 (eXosip2/4.1.0)
Expires: 600
Event: presence
Content-Length: 353
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" entity="User <sip:USER@HOST>">
<tuple id="sg89ae">
<status><basic>closed</basic></status>
<contact priority="0.8">User <sip:USER@HOST></contact>
</tuple>
</presence>
21:58:58.710097 IP (tos 0x10, ttl 53, id 10255, offset 0, flags [none], proto UDP (17), length 473)
KAMAILIO_IP_ADDRESS.5060 > LINPHONE_IP_ADDRESS.5060: SIP, length: 445
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP LINPHONE_IP_ADDRESS:5060;rport=5060;branch=z9hG4bK2049418743;received=EXTERNAL_IP_ADDRESS
From: User <sip:USER@HOST>;tag=184282924
To: User <sip:USER@HOST>;tag=515cb47c4c34ffa85b598d6b25676122.744d
Call-ID: 1435474953
CSeq: 26 PUBLISH
Proxy-Authenticate: Digest realm="HOST", nonce="NONCE"
Server: kamailio (4.4.4 (x86_64/linux))
Content-Length: 0
21:58:58.718147 IP (tos 0x68, ttl 64, id 64111, offset 0, flags [DF], proto UDP (17), length 940)
LINPHONE_IP_ADDRESS.5060 > KAMAILIO_IP_ADDRESS.5060: SIP, length: 912
PUBLISH sip:USER@HOST SIP/2.0
Via: SIP/2.0/UDP LINPHONE_IP_ADDRESS:5060;rport;branch=z9hG4bK1165141043
From: User <sip:USER@HOST>;tag=184282924
To: User <sip:USER@HOST>
Call-ID: 1435474953
CSeq: 27 PUBLISH
Proxy-Authorization: Digest username="USER", realm="HOST", nonce="NONCE", uri="sip:USER@HOST", response="RESP", algorithm=MD5
Content-Type: application/pidf+xml
Max-Forwards: 70
User-Agent: Linphone/3.6.1 (eXosip2/4.1.0)
Expires: 600
Event: presence
Content-Length: 353
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" entity="User <sip:USER@HOST>">
<tuple id="sg89ae">
<status><basic>closed</basic></status>
<contact priority="0.8">User <sip:USER@HOST></contact>
</tuple>
</presence>
21:58:58.781668 IP (tos 0x10, ttl 53, id 10259, offset 0, flags [none], proto UDP (17), length 380)
KAMAILIO_IP_ADDRESS.5060 > LINPHONE_IP_ADDRESS.5060: SIP, length: 352
SIP/2.0 415 Unsupported media type
Via: SIP/2.0/UDP LINPHONE_IP_ADDRESS:5060;rport=5060;branch=z9hG4bK1165141043;received=EXTERNAL_IP_ADDRESS
From: User <sip:USER@HOST>;tag=184282924
To: User <sip:USER@HOST>;tag=97d8e785fdf42bf9622a64c13c504961-3901
Call-ID: 1435474953
CSeq: 27 PUBLISH
Server: kamailio (4.4.4 (x86_64/linux))
Content-Length: 0
I replaced ip addresses in packets by KAMAILIO_IP_ADDRESS,
LINPHONE_IP_ADDRESS and EXTERNAL_IP_ADDRESS strings and also SIP account
by USER@HOST. Maybe it helps you.
Any idea why kamailio refuse presence update and reports those error
into error log?
Or is there any special setting which is needed for linphone or other
SIP clients for online status / presence support?
--
Pali Rohár
pali.rohar(a)gmail.com
[View Less]
Hi!
Is there any module or configuration how to use dovecot SASL
authentication in Kamailio?
Dovecot exports unix socket (or tcp on localhost) for authentication
service and lot of server applications can be configured to use it (e.g.
postfix, prosody, ...) to have one central place of user and
authentication database. It supports also strong authentication schemas
like SCRAM-SHA, but also plain text password or DIGEST-MD5. In SIP is
used DIGEST-MD5 therefore it could be suitable also for SIP …
[View More]and
Kamailio.
--
Pali Rohár
pali.rohar(a)gmail.com
[View Less]
Hi,
Does anyone know the difference between these metrics??
core:rcv_replies_5xx
sl:5xx_replies
tmx:5xx_transactions
Specially between core and tmx?
Thanks,
Joel.
Hello.
I'm new to Kamailio perhaps I've seen it in actions at AirBNB. I'm starting
the journey as a new developer who wants to grab Kamailio and build
something. I would like to check if you could provide the most relevant
links for a beginner also with some samples. I noticed the abundance of
modules perhaps I would like to see what people are doing with it.
Best Regards,
Amauri.
Hi guys,
I'm having an issue which I have narrowed down to is_first_hop(), I can
apply a workaround, but I don't know if I'm doing it correctly or if my
problem is caused by misconfiguration of anything.
Let's say we have the following flow:
Client (NAT) TLS -> Kamailio1 (only Public IP) UDP -> Kamailio2 (only
Public IP) UDP -> FreeSWITCH (only Public IP).
Regarding this setup, let's focus only on Kamailio1. And for the sake of a
clear example, I have done a little draw.io …
[View More]diagram:
>From the above flow, let's stick to the *200 OK* that Kam1 is going to
receive from Kam2. (marked in *blue* in the screenshot).
First 200 OK (replying to initial INVITE):
SIP/2.0 200 OK
Via: SIP/2.0/UDP KAM1_PUB_IP;rport=5060;branch=z9hG4bK1e2b.
e1307b519c9b5f0015343e13f35aeace.0;i=3
Via: SIP/2.0/TLS [2607:fb90:489b:6e13:85f8:596b:b86b:c831]:54744;
received=172.58.17.149;branch=z9hG4bK.jmXSnh-7x;rpo
=43842
Record-Route: <sip:KAM2_PUB_IP;lr=on;ftag=7vidaJ3Hw;did=36e.d441>
Record-Route: <sip:KAM1_PUB_IP;r2=on;lr=on;ftag=7vidaJ3Hw;did=36e.a792;
nat=yes>
Record-Route: <sip:KAM1_PUB_FQDN:443;transport=tls;r2=on;lr=on;
ftag=7vidaJ3Hw;did=36e.a792;nat=yes>
From: "Joel Test 1" <sip:8bd2a0aba14541789bb7269800646458@MY_DOMAIN
>;tag=7vidaJ3Hw
To: "Joel Test 2" <sip:e78f2617b0d345d3bdb7b6780ece903c@MY_DOMAIN>;tag=
vceg6N0m5ypHa
Call-ID: 3ezoQGF1kp
CSeq: 21 INVITE
Contact: <sip:e78f2617b0d345d3bdb7b6780ece903c@FS_PUB_IP:6061;transport=udp>
User-Agent: TP MEDIA 2.0
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 358
Remote-Party-ID: "e78f2617b0d345d3bdb7b6780ece903c" <sip:
e78f2617b0d345d3bdb7b6780ece903c@MY_DOMAIN>;party=calling;
privacy=off;screen=no
v=0
o=TP 1529576021 1529576022 IN IP4 FS_PUB_IP
s=TP
c=IN IP4 FS_PUB_IP
t=0 0
m=audio 25484 RTP/AVP 96 101
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1; maxplaybackrate=8000; sprop-maxcapturerate=8000
a=rtpmap:101 telephone-event/48000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=rtcp:25485 IN IP4 FS_PUB_IP
Second 200 OK (replying to in-dialog INVITE with updated SDP):
SIP/2.0 200 OK
Via: SIP/2.0/UDP KAM1_PUB_IP;rport=5060;branch=z9hG4bKed2b.
0006a6a159e800129a62b4415fdd64e6.0;i=7
Via: SIP/2.0/TLS 192.168.30.63:54752;received=A.B.C.D;branch=z9hG4bK.
iKO2iYIgK;rport=27819
From: "Joel Test 1" <sip:8bd2a0aba14541789bb7269800646458@MY_DOMAIN
>;tag=7vidaJ3Hw
To: "Joel Test 2" <sip:e78f2617b0d345d3bdb7b6780ece903c@MY_DOMAIN>;tag=
vceg6N0m5ypHa
Call-ID: 3ezoQGF1kp
CSeq: 22 INVITE
Contact: <sip:e78f2617b0d345d3bdb7b6780ece903c@FS_PUB_IP:6061;transport=udp>
User-Agent: TP MEDIA 2.0
Accept: application/sdp
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: timer, path, replaces
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 358
v=0
o=TP 1529576021 1529576022 IN IP4 FS_PUB_IP
s=TP
c=IN IP4 FS_PUB_IP
t=0 0
m=audio 25484 RTP/AVP 96 101
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1; maxplaybackrate=8000; sprop-maxcapturerate=8000
a=rtpmap:101 telephone-event/48000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=rtcp:25485 IN IP4 FS_PUB_IP
Now here comes the problem, I have the following in my kam1 config:
route[NATMANAGE] {
...
if (is_reply()) {
if (isbflagset(FLB_NATB)) {
if (is_first_hop()) {
fix_nated_contact();
}
}
}
...
}
So, on the first 200 OK, when it reaches that part of the config:
1- is_reply() -> OK
2- isbflagset(FLB_NATB) -> OK (because on the initial request NAT was
detected blablabla....)
3- is_first_hop() -> FAIL
fix_nated_contact() is NOT applied.
(This is the correct and the expected behavior).
Now, on the second 200 OK, again in that part of the config:
1- is_reply() -> OK
2- isbflagset(FLB_NATB) -> OK
3-is_first_hop() -> OK
fix_nated_contact() is applied, thus the contact will be changed, and the
client will send the ACK with incorrect information leading to another set
of issues...
>From the docs: https://www.kamailio.org/docs/modules/5.1.x/
modules/siputils.html#siputils.f.is_first_hop
*4.30. is_first_hop()*
*The function returns true if the proxy is first hop after the original
sender. For incoming SIP requests, it means there is only one Via header.
For incoming SIP replies, it means that top Record-Route URI is 'myself'
and source address is not matching it (to avoid detecting in case of local
loops). Note that it does not detect spirals, which can have the condition
for replies true also in the case of additional SIP reply receival.*
So going back to the examples:
first 200 OK:
1- "top Record-Route URI is 'myself' -> FAIL
So we we are NOT the first hop, we do nothing and forward the reply to the
client.
second 200 OK:
1- "top Record-Route URI is 'myself' -> No record-route headers are
present, so we enter the is_first_hop() condition and modify the contact
with fix_nated_contact().
Now to the real topic, I have a workaround as:
...
if (is_reply()) {
if (isbflagset(FLB_NATB)) {
if (is_first_hop()) {
if (!ds_is_from_list()) { # <-- Check to see if the reply is
coming from our internal servers
fix_nated_contact();
}
}
}
}
...
And that is working correctly, but I would like to understand the reasons.
I hope I have explained myself correctly, otherwise it's impossible to get
to the point of my questions:
1- Is it correct for is_first_hop() to detect the second 200 OK as a first
hop when it isn't? the behavior matches the documentation, so I don't know.
If we stick to the check of the headers etc etc, it's working as described,
if we stick to the concept of kam1 being actually being the first hop of
that 200OK, then the check would need another condition to exclude the 200
OK (or better, the replies) of an in-dialog INVITE.
2- Do you guys consider the workaround something reasonable? Under my
opinion I would like to not have to add that, but I also don't know.
3- Am I missing something super standard that avoids all of this? I'm
starting to go crazy trying and comparing different things to get to
understand this and I want to make sure it's not just a is_first_hop() bug?
Sorry for such a long email, but I think that describing the scenario and
flow was required.
Any input is more than welcome!
Thanks!
Joel.
[View Less]
Hi,
I always read your email regarding new stable releases.
I am currently working on a project upgrade of multiples servers to the most
recent OS (Windows, RedHat) and middleware.
In this project, I have upgraded SIP Proxies server running on old version
of Kamailio, to the 5.0.1 release (over RedHat 7.4).
Effort to make that upgrade and tests have been done with success in the
last months.
So considering to upgrade to the 5.0.7 or 5.1.4 would be a subsequent work I
need to …
[View More]evaluate.
I could read all the release notes, but it is also a big challenge to
determine if fixes are interesting for me.
Based on your experience, is there particular cases, fixed in the new
release I need to pay attention?
Any comments are welcome.
Regards
Patrick GINHOUX
[View Less]