Hello Daniel,
Is there information about stats - what is implemented, what is not implemented?
I have the similar questions, it would be nice to be informed what stats can be use and what stats should be skipped.
Thank you.
>
>
>Message: 8
>Date: Fri, 29 Jun 2018 09:46:21 +0200
>From: Daniel-Constantin Mierla < miconda(a)gmail.com >
>To: "Kamailio (SER) - Users Mailing List"
>< sr-users(a)lists.kamailio.org >, Joel Serrano < joel(a)textplus.com >
>Subject: Re: [SR-Users] Understanding 5XX stats in Kamailio
>Message-ID: < cbd84f94-8bb1-ddc3-b901-5743360c1fb9(a)gmail.com >
>Content-Type: text/plain; charset=utf-8
>
>Hello,
>
>I haven't implemented those stats, but should be like:
>
>
>On 28.06.18 23:54, Joel Serrano wrote:
>> Does anyone know the difference between these metrics??
>>
>> core:rcv_replies_5xx
>
>- the number of 5xx replies received by kamailio
>
>> sl:5xx_replies
>
>- the number of 5xx replies generated by kamailio via sl module functions
>
>> tmx:5xx_transactions
>
>- the number of transactions that completed with a 5xx response
>
>>
>> Specially between core and tmx?
>
>Some of received 5xx responses may be due to stateless forwarding, a
>matter of config file, thus some of them do not match transactions.
>
>Cheers,
>Daniel
>
>--
>Daniel-Constantin Mierla -- www.asipto.com
>www.twitter.com/miconda -- www.linkedin.com/in/miconda
>Kamailio World Conference -- www.kamailioworld.com
>
>
>
>
>------------------------------
>
>Subject: Digest Footer
>
>_______________________________________________
>sr-users mailing list
>sr-users(a)lists.kamailio.org
>https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
>------------------------------
>
>End of sr-users Digest, Vol 157, Issue 30
>*****************************************
С уважением,
Константин Поляков.
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'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 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
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 and
Kamailio.
--
Pali Rohár
pali.rohar(a)gmail.com
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 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.
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 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
Hi all,
I'm getting the following error when compiling 4.4.7 from src:
mem/pkg.o: In function `pkg_init_manager':
/home/prod_fuze/jenkins/workspace/BuildKamailioRELEASE_Trusty/mem/pkg.c:63:
undefined reference to `fm_malloc_init_pkg_manager'
/home/prod_fuze/jenkins/workspace/BuildKamailioRELEASE_Trusty/mem/pkg.c:68:
undefined reference to `qm_malloc_init_pkg_manager'
/home/prod_fuze/jenkins/workspace/BuildKamailioRELEASE_Trusty/mem/pkg.c:72:
undefined reference to `tlsf_malloc_init_pkg_manager'
mem/shm.o: In function `shm_init_manager':
/home/prod_fuze/jenkins/workspace/BuildKamailioRELEASE_Trusty/mem/shm.c:239:
undefined reference to `fm_malloc_init_shm_manager'
/home/prod_fuze/jenkins/workspace/BuildKamailioRELEASE_Trusty/mem/shm.c:244:
undefined reference to `qm_malloc_init_shm_manager'
/home/prod_fuze/jenkins/workspace/BuildKamailioRELEASE_Trusty/mem/shm.c:248:
undefined reference to `tlsf_malloc_init_shm_manager'
collect2: error: ld returned 1 exit status
make: *** [kamailio] Error 1
Build step 'Execute shell' marked build as failure
Sending e-mails to: kivanov(a)fuze.com AChen(a)fuzebox.com
Finished: FAILURE
any thoughts?
Thanks
--
Andy Chen
--
*Confidentiality Notice: The information contained in this e-mail and any
attachments may be confidential. If you are not an intended recipient, you
are hereby notified that any dissemination, distribution or copying of this
e-mail is strictly prohibited. If you have received this e-mail in error,
please notify the sender and permanently delete the e-mail and any
attachments immediately. You should not retain, copy or use this e-mail or
any attachment for any purpose, nor disclose all or any part of the
contents to any other person. Thank you.*