Re: [SR-Users] Can rtpproxy stream audio inside a call? (Maxim Sobolev)

2017-05-12 Thread Yufei Tao
Hi,

Thank you very much for the answers! I'll have a play.

Cheers,
Yufei

Message: 9
Date: Mon, 8 May 2017 01:01:51 -0700
From: Maxim Sobolev <sobo...@sippysoft.com>
To: sr-users@lists.kamailio.org, Daniel-Constantin Mierla
<mico...@gmail.com>
Subject: Re: [SR-Users] Can rtpproxy stream audio inside a call?
Message-ID:
<cah7qzfs0tqtwa-acwvhhhas_hajcrnakblnjxbv+o0txjnd...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Daniel is right. Technically speaking it can be done at any point after the
media session has been established, but you need some kind of trigger to
start/stop it from your routing script. Such as re-INVITE for example.

-Max

On May 8, 2017 7:52 AM, "Daniel-Constantin Mierla" <mico...@gmail.com>
wrote:

> Hello,
>
> it can play rtp files encoded in the format expected by the audio codec. I
> used only when there was a re-invite (like putting the call on hold).
>
> Cheers,
> Daniel
>
> On 04.05.17 17:29, Yufei Tao wrote:
>
> Hi,
>
> Just a quick question: if I use the Kamailio rtpproxy module with the
Sippy
> RTPproxy, can I stream audio within a call? Or is it only possible before
> call audio is established?
>
> For example can I mix/playback audio file into an existing established
> call session at any time using functions rtpproxy_stream2uac() and
rtpproxy_stream2uas()
> somehow? If it is possible, does it need to be triggered by an in-dialog
> message from either UAC or UAS?
>
> Cheers,
> Yufei
>
>
> ___
> Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://
lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda
<http://mierlawww.twitter.com/miconda> -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Can rtpproxy stream audio inside a call?

2017-05-04 Thread Yufei Tao
Hi,

Just a quick question: if I use the Kamailio rtpproxy module with the Sippy
RTPproxy, can I stream audio within a call? Or is it only possible before
call audio is established?

For example can I mix/playback audio file into an existing established call
session at any time using functions rtpproxy_stream2uac() and
rtpproxy_stream2uas()
somehow? If it is possible, does it need to be triggered by an in-dialog
message from either UAC or UAS?

Cheers,
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Can rtpengine change network interface of estabished call?

2018-02-13 Thread Yufei Tao
Hi,

Is it possible to define two pairs of network interfaces for rtpengine,
e.g. int/ext and up/down?

If so during a call established between interfaces 'int' and 'ext', is it
possible to send a re-INVITE from the calling party on interface 'ext', to
update the RTP destination to an IP on a different interface 'up', for
example? Or does the updated RTP destination have to be on the same
interface as when the call was established?

I have some success updating the RTP destination if it is on the same
interface (different IP:port) however haven't managed to divert it to a
different interface. I wonder if it is possible at all or me missing
something?

Cheers,
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio v5.1.6 crashes with rtpengine restarts

2019-01-21 Thread Yufei Tao
Hi,



I have been testing one Kamailio v5.1.6 instance with one rtpengine
instance, using sipp playing media files at 40 cps (-r 40) with up to 1600
concurrent calls. During the load tests if rtpengine is pkill'ed/restarted
a few times Kamailio would crash. It is quite repeatable and every time the
backtrace from gdb points to the same place as shown below.


However the same tests on Kamailio v5.0.7 with the same cfg files and the
same rtpengine instance did not cause any crash.


Here’s what I got from gdb backtrace for v5.1.6 using a dbg build: 2 core
dump files:


1.  UDP receiver processes 14483

{{{

[New LWP 14483]
Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid
-f /etc/kamailio/kamailio.'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7fadfa824d8e in t_should_relay_response (Trans=0x7fadf4207730,
new_code=200, branch=0, should_store=0x7ffd5038fce4,
should_relay=0x7ffd5038fce0, cancel_data=0x7ffd5038fed0,
reply=0x7fadfb545210) at t_reply.c:1282
1282t_reply.c: No such file or directory.
(gdb) bt
#0  0x7fadfa824d8e in t_should_relay_response (Trans=0x7fadf4207730,
new_code=200, branch=0, should_store=0x7ffd5038fce4,
should_relay=0x7ffd5038fce0, cancel_data=0x7ffd5038fed0,
reply=0x7fadfb545210) at t_reply.c:1282
#1  0x7fadfa829577 in relay_reply (t=0x7fadf4207730,
p_msg=0x7fadfb545210, branch=0, msg_status=200, cancel_data=0x7ffd5038fed0,
do_put_on_wait=1) at t_reply.c:1786
#2  0x7fadfa82f54c in reply_received (p_msg=0x7fadfb545210) at
t_reply.c:2537
#3  0x0054624b in do_forward_reply (msg=0x7fadfb545210, mode=0) at
core/forward.c:747
#4  0x00547e4c in forward_reply (msg=0x7fadfb545210) at
core/forward.c:852
#5  0x0058e186 in receive_msg (
buf=0xa595a0  "SIP/2.0 200 OK\r\nVia: SIP/2.0/UDP
192.168.70.102;branch=z9hG4bKa042.afac8eb973f1dfad7a549af0ab1a8ccc.0,
SIP/2.0/UDP 192.168.60.80:5060;branch=z9hG4bK-3750-978-0\r\nFrom: sipp <
sip:Customer68@192.168.60.8"..., len=888, rcv_info=0x7ffd50390480) at
core/receive.c:364
#6  0x004af6b1 in udp_rcv_loop () at core/udp_server.c:554
#7  0x004246ac in main_loop () at main.c:1619
#8  0x0042bd5c in main (argc=13, argv=0x7ffd50390b38) at main.c:2638

}}}



2. Main process 14468
{{{
[New LWP 14468]
Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid
-f /etc/kamailio/kamailio.'.
Program terminated with signal SIGABRT, Aborted.
#0  0x7fadfbc77428 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
54../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x7fadfbc77428 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
#1  0x7fadfbc7902a in __GI_abort () at abort.c:89
#2  0x0041a029 in sig_alarm_abort (signo=14) at main.c:646
#3  
#4  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:37
#5  0x7fadf354e67d in futex_get (lock=0x7fadf3e94e50) at
../../core/parser/../mem/../futexlock.h:121
#6  0x7fadf3561113 in mod_destroy () at rtpengine.c:1810
#7  0x0055132b in destroy_modules () at core/sr_module.c:832
#8  0x00418c9f in cleanup (show_status=1) at main.c:521
#9  0x0041a313 in shutdown_children (sig=15, show_status=1) at
main.c:663
#10 0x0041cfa5 in handle_sigs () at main.c:768
#11 0x00425fb5 in main_loop () at main.c:1752
#12 0x0042bd5c in main (argc=13, argv=0x7ffd50390b38) at main.c:2638
}}}

The parameters for rtpengine:

{{{

loadmodule "rtpengine.so"
modparam("rtpengine", "db_url",
"text:///usr/share/kamailio/dbtext/kamailio")
modparam("rtpengine", "hash_table_size", 4)
modparam("rtpengine", "setid_default", 1)
modparam("rtpengine", "rtpengine_disable_tout", 20)
modparam("rtpengine", "rtpengine_retr", 1)
modparam("rtpengine", "setid_avp", "$avp(setid)")
modparam("rtpengine", "rtp_inst_pvar", "$avp(rtpInstance)")
modparam("rtpengine", "rtpengine_tout_ms", 1000)
modparam("rtpengine", "read_sdp_pv", "$var(sdpToRtpengine)")
modparam("rtpengine", "write_sdp_pv", "$var(sdpFromRtpengine)")

}}}


I'm using a simplified kamailio.cfg from installation, and here are calls
to rtpengine:

{{{

...

route[INVITE]
{
$var(sdpToRtpengine) = $rb;
$var(ret) = rtpengine_manage("direction=dirty direction=clean
ICE=remove");
xlog("L_INFO", "$ci INVITE: rtpengine chosen: $avp(rtpInstance)");
remove_body();
replace_body(".*", $var(sdpFromRtpengine));
t_on_reply("RESPONSE");

route(RELAY);
}

onreply_route[RESPONSE]
{
$var(sdpToRtpengine) = $rb;
$var(ret) = rtpengine_manage("direction=clean direction=dirty
ICE=remove");
 remove_body();
 replace_body(".*", $var(sdpFromRtpengine));
 xlog("L_INFO", "$ci RESPONSE: $rm - $rs $rr, cseq=$cs, by
[$hdr(Server)], from $si:$sp");
}
...

}}}


When rtpengine is down for a couple of seconds, there were a lot of SIP
retransmissions and timeouts. Doing a 

Re: [SR-Users] Kamailio v5.1.6 crashes with rtpengine restarts

2019-01-22 Thread Yufei Tao
Hi Daniel,

I tested latest v5.2.1 Debian package and created the crash as well.

Two core dump files again similar to 5.1.6:
1. 1687 - udp receiver process
{{{
[New LWP 1687]
Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid
-f /etc/kamailio/kamailio.'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7f015b3795cc in t_should_relay_response (Trans=0x7f015cce9e98,
new_code=200, branch=0, should_store=0x7ffd5b4c5e24,
should_relay=0x7ffd5b4c5e20, cancel_data=0x7ffd5b4c6010,
reply=0x7f0161407ab8) at t_reply.c:1279
1279t_reply.c: No such file or directory.
(gdb) bt
#0  0x7f015b3795cc in t_should_relay_response (Trans=0x7f015cce9e98,
new_code=200, branch=0, should_store=0x7ffd5b4c5e24,
should_relay=0x7ffd5b4c5e20, cancel_data=0x7ffd5b4c6010,
reply=0x7f0161407ab8) at t_reply.c:1279
#1  0x7f015b37dec7 in relay_reply (t=0x7f015cce9e98,
p_msg=0x7f0161407ab8, branch=0, msg_status=200, cancel_data=0x7ffd5b4c6010,
do_put_on_wait=1) at t_reply.c:1804
#2  0x7f015b383eaa in reply_received (p_msg=0x7f0161407ab8) at
t_reply.c:2539
#3  0x0054e7f0 in do_forward_reply (msg=0x7f0161407ab8, mode=0) at
core/forward.c:747
#4  0x00550415 in forward_reply (msg=0x7f0161407ab8) at
core/forward.c:852
#5  0x00599159 in receive_msg (
buf=0xa6ec80  "SIP/2.0 200 OK\r\nVia: SIP/2.0/UDP
192.168.70.101;branch=z9hG4bK155f.f4284a7086985c9b088dc7c0dd32c63e.0,
SIP/2.0/UDP 192.168.60.80:5060;branch=z9hG4bK-5164-4615-0\r\nFrom: sipp <
sip:Customer69@192.168.60."..., len=886, rcv_info=0x7ffd5b4c65d0) at
core/receive.c:433
#6  0x004b22e8 in udp_rcv_loop () at core/udp_server.c:541
#7  0x00425205 in main_loop () at main.c:1645
#8  0x0042c9a5 in main (argc=13, argv=0x7ffd5b4c6c98) at main.c:2675
}}}

2. 1673 - main process
{{{
[New LWP 1673]
Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid
-f /etc/kamailio/kamailio.'.
Program terminated with signal SIGABRT, Aborted.
#0  0x7f0162344428 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
54../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x7f0162344428 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
#1  0x7f016234602a in __GI_abort () at abort.c:89
#2  0x0041a836 in sig_alarm_abort (signo=14) at main.c:663
#3  
#4  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:37
#5  0x7f0160a259ed in futex_get (lock=0x7f015c2739c8) at
../../core/parser/../mem/../futexlock.h:121
#6  0x7f0160a395bc in mod_destroy () at rtpengine.c:1941
#7  0x005589e2 in destroy_modules () at core/sr_module.c:732
#8  0x0041940b in cleanup (show_status=1) at main.c:537
#9  0x0041ab21 in shutdown_children (sig=15, show_status=1) at
main.c:680
#10 0x0041d7c3 in handle_sigs () at main.c:785
#11 0x00426b23 in main_loop () at main.c:1780
#12 0x0042c9a5 in main (argc=13, argv=0x7ffd5b4c6c98) at main.c:2675
}}}

I used the example kamailio-minimal-proxy.cfg from 5.2.1 source
/misc/examples/mixed/ directory and added rtpengine parameters and calls to
rtpengine functions, as the cfg file for 5.1.6 didn't work for 5.2.1.
Attached is the kamailio.cfg for v5.2.1 that I used in the tests.

Cheers,
Yufei

On Tue, 22 Jan 2019 at 07:33, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> can you share with me the full config along with sipp scenario files and
> commands you used for testing? I would like to reproduce on my test
> environment to be able to troubleshoot.
>
> Also, can you try with latest version from 5.2 branch? I pushed some fixes
> recently to rtpengine as well as a rework for reply handling inside the tm
> module -- these because there were some similar reports before, but none of
> them had a way to reproduce. Since you can reproduce it, if I can test it
> here I can be sure the proper fix was done or the issue is somewhere else.
>
> Cheers,
> Daniel
> On 21.01.19 18:48, Yufei Tao wrote:
>
> Hi,
>
>
>
> I have been testing one Kamailio v5.1.6 instance with one rtpengine
> instance, using sipp playing media files at 40 cps (-r 40) with up to 1600
> concurrent calls. During the load tests if rtpengine is pkill'ed/restarted
> a few times Kamailio would crash. It is quite repeatable and every time the
> backtrace from gdb points to the same place as shown below.
>
>
> However the same tests on Kamailio v5.0.7 with the same cfg files and the
> same rtpengine instance did not cause any crash.
>
>
> Here’s what I got from gdb backtrace for v5.1.6 using a dbg build: 2 core
> dump files:
>
>
> 1.  UDP receiver processes 14483
>
> {{{
>
> [New LWP 14483]
> Core was generated by `/usr/sbin/kamailio -P
> /var/run/kamailio/kamailio.pid -f /etc/kamailio/kamailio.'.
> Program terminated with signal 

Re: [SR-Users] SIP basic flow question: R-URI in ACK

2019-05-01 Thread Yufei Tao
Hi Daniel,

Thank you very much for clarifying!

Cheers,
Yufei

On 30 Apr 2019 at 08:10, >
wrote:

Hello,

there is an errata for that RFC, but it refers only to the BYE, where it
adds back the transport=tcp, but the ACK R-URI should follow the same
rules, see:

  * https://www.rfc-editor.org/errata/eid5294

Cheers,
Daniel
On 28.04.19 22:54, Yufei Tao wrote:

Hi,



I have a question regarding basic SIP flow for establishing a call session,
and wonder if anyone can help me clarify.



For normal call set up, INVITE-OK-ACK, from RFC3261, I believe the ACK’s
R-URI should be a copy of the Contact header of the OK message.



However in RFC3665 sections 3.1 and 3.2 for example, the ACK’s R-URI missed
the parameters from the Contact header of the OK, e.g.



In OK the Contact header is:

   Contact: 




And  ACK the R-URI is:

ACK sip:b...@client.biloxi.example.com SIP/2.0



Which has got the parameter ‘transport=tcp’ removed – why is this?



In this case if the proxy connected to Bob handles ACK in the usual way as
it would for all in-dialog requests, i.e. based on routing headers only and
not extra processing, it’ll try to relay the ACK message to Bob using the
default transport UDP which is not expected and will fail.



Can anyone help explain why the parameters are removed in RFC3665 examples
please? Have I missed anything? Thank you very much!



Yufei

___
Kamailio (SER) - Users Mailing
Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--
Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] SIP basic flow question: R-URI in ACK

2019-04-29 Thread Yufei Tao
Hi,

I have a question regarding basic SIP flow for establishing a call session, and 
wonder if anyone can help me clarify.

For normal call set up, INVITE-OK-ACK, from RFC3261, I believe the ACK’s R-URI 
should be a copy of the Contact header of the OK message. 

However in RFC3665 sections 3.1 and 3.2 for example, the ACK’s R-URI missed the 
parameters from the Contact header of the OK, e.g.

In OK the Contact header is:
   Contact: 

And  ACK the R-URI is:
ACK sip:b...@client.biloxi.example.com SIP/2.0

Which has got the parameter ‘transport=tcp’ removed – why is this?

In this case if the proxy connected to Bob handles ACK in the usual way as it 
would for all in-dialog requests, i.e. based on routing headers only and not 
extra processing, it’ll try to relay the ACK message to Bob using the default 
transport UDP which is not expected and will fail. 

Can anyone help explain why the parameters are removed in RFC3665 examples 
please? Have I missed anything? Thank you very much!

Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Pre-built Debian Package for Kemix Module?

2020-02-05 Thread Yufei Tao
Hi Daniel and Victor,

Thank you very much for the very quick and helpful response, as always!

Best regards,
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Pre-built Debian Package for Kemix Module?

2020-02-05 Thread Yufei Tao
Hi,

I am trying to use KEMI lua that needs kemix module (for KSR.kx.<...>).

I wonder if there is any pre-built Debian package that include the kemix
module, something like kamailio-<...>-modules, that I can install? Or do I
need to build from source with kemix in included_modules?

On a related question, for the kamailio-<...>-modules packages how do I
find out what modules are included in each of these package? E.g. things
like kamailio-lua-modules, kamailio-mysql-modules etc. are easy to guess,
while kamailio-nth, kamailio-utils-modules etc. are not so easy.

Thank you!
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] is_gflag Always Returns FALSE

2020-03-19 Thread Yufei Tao
Hi,

I got some problems with is_gflags:
1. Set the gflag:
# kamcmd cfgutils.set_gflag 1024
2. Check the gflags - fine:
# kamcmd cfgutils.get_gflags
0x400 (1024)
3. Check using is_gflag - problem:
# kamcmd cfgutils.is_gflag 1024
FALSE

Seems is_gflag always returns FALSE somehow. Calling function is_gflag()
from the cfg file seems to always return FALSE too.

I tried this on Kamailio 5.3.2 and 5.3.3 and the behaviour is the same.

Best regards,
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] is_gflag Always Returns FALSE

2020-03-19 Thread Yufei Tao
Hi Daniel,

Yes it's worked! Thank you very much for the quick response :)

Cheers,
Yufei

On Thu, 19 Mar 2020 at 15:59, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> try with the patch from commit:
>
>   *
> https://github.com/kamailio/kamailio/commit/5411eda4e44a487479d00433583a68a328aca9a3
>
> Cheers,
> Daniel
> On 19.03.20 15:01, Daniel-Constantin Mierla wrote:
>
> Hello,
>
> can you try:
>
> kamcmd cfgutils.is_gflag i:1024
>
> Cheers,
> Daniel
> On 19.03.20 12:12, Yufei Tao wrote:
>
> Hi,
>
> I got some problems with is_gflags:
> 1. Set the gflag:
> # kamcmd cfgutils.set_gflag 1024
> 2. Check the gflags - fine:
> # kamcmd cfgutils.get_gflags
> 0x400 (1024)
> 3. Check using is_gflag - problem:
> # kamcmd cfgutils.is_gflag 1024
> FALSE
>
> Seems is_gflag always returns FALSE somehow. Calling function is_gflag()
> from the cfg file seems to always return FALSE too.
>
> I tried this on Kamailio 5.3.2 and 5.3.3 and the behaviour is the same.
>
> Best regards,
> Yufei
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio vulnerable to header smuggling possible due to bypass of remove_hf

2020-09-02 Thread Yufei Tao
Hi,

The security tests were done to find theoretically possible flaws and help
make Kamailio "bullet proof". Well it's already a lot more robust than most
others. I think Daniel and Henning have made it very clear about the scope
of the bug.

For me if it is something that's been there for so many years without being
noticed, it would be a bit surprising if declared as a high risk problem.
Plus isn't this something you should find out if you do your testing
properly? If it were to create big troubles for anyone, that means they had
never tested their deployment properly in the past 18 years?? That's where
I get confused.

Of course anyone can fork and build Kamailio themselves if they really need
something urgently since it's open source.

Cheers,
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio 5.2.5 - Need help with rtpengine error

2020-10-20 Thread Yufei Tao
Hi Andrew,
Like Alex said, have a look at the commands RTPEngine received and the
responses it sent in the history of the call, and see if RTPEngine has ever
received any commands regarding this call, or, if the call has been deleted
from RTPEngine. You can raise the RTPEngine logging level to 6 for example
so you can see the command/responses of RTPEngine.

Cheers,
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] SRTP

2020-10-20 Thread Yufei Tao
Hi,

Like Olle said RTPEngine is perfectly capable of handling one leg in RTP
the other in SRTP. When looking up RTPEngine's documentation, may be worth
checking these out:
SRTP
SDES-unencrypted_srtp
SDES-unencrypted_srtcp
SDES-unauthenticated_srtp
e.g. try apply these flags to rtpengin_offer() on the incoming RTP leg, to
get RTPEngine to add encryption to the outgoing leg etc.

Cheers,
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Load balance on HA scenario

2020-10-20 Thread Yufei Tao
Hi Duarte,

Not sure if I understand it correctly but are you trying to set up an HA
pair of dispatchers?

If so I am doing it differently in that, I use the Virtual/floating IP
(VIP) as socket. This way the master node (which has got the VIP) can send
OPTIONs pings out fine but the backup node won't be able to send.
Functionally it is fine, but the backup node keeps logging errors because
it doesn't have the VIP:

ERROR:  [core/udp_server.c:599]: udp_send(): sendto(sock, buf:
0x7f0e6b54e2e0, len: 372, 0, dst: (192.168.213.143:5060), tolen: 16) -
err: Network is unreachable (101)
ERROR: tm [../../core/forward.h:231]: msg_send_buffer(): udp_send failed

When FO happens, the backup node becomes master and takes the VIP, and it
functions correctly. But I haven't worked out how to avoid the ERROR
loggings on the backup node. Maybe someone else has any better
ideas/suggestions?

Cheers,
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Load balance on HA scenario

2020-10-22 Thread Yufei Tao
Hi Duarte,

I'm not sure if your situation is more complicated than mine. I have two
dispatcher nodes in the HA setup, with real IPs say IPa, IPb. They share a
floating/virtual IP, let's call it VIP.

Both nodes listen to the VIP (not its real IP), and use the VIP as the
dispatcher's socket. In this case the master node which has the VIP can
always send OPTIONS pings fine.

My problem was with the backup node, which doesn't have the VIP so fails to
send OPTIONS pings. Joel Serrano gave a good suggestion: both nodes start
up with polling disabled, and only when a node turns master it enables the
polling. This has solved my problem.

Cheers,
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] RTP voice failover

2020-06-30 Thread Yufei Tao
Hi,

RTP FO is possible, e.g. with keepalived+rtpengine+Redis as people
suggested.

Here's the guide for configuring it which I find very useful:
https://github.com/sipwise/rtpengine/wiki/Redis-keyspace-notifications

A possible way is to have a pair of rtpengine instances in master-slave
setup. When master goes down, RTP continues on slave (new master) after a
few seconds gap, when the virtual IP(s) migrate over.

Another useful link:

https://www.kamailio.org/events/2016-KamailioWorld/Day2/20-Pawel.Kuzak-High-Quality-Telephony-Using-A-Fail-Safe-Media-Relay-Setup.pdf

Good luck!

Yufei


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Load balance on HA scenario

2020-10-21 Thread Yufei Tao
Hi Joel,

Thanks for the tip! Having the pings disabled and enable it on HA status
being master sounds like a good idea :)

Cheers,
Yufei
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] sr-users Digest, Vol 186, Issue 5

2020-11-05 Thread Yufei Tao
Hi,

Here's an example kamailio.cfg that uses record_route so in-dialog requests
will go through the Kamailio proxy:
https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg
There are many other example cfg files:
https://github.com/kamailio/kamailio/tree/master/misc/examples

Any server that wants to see the in-dialog messages needs to add itself to
the record route list when receiving the initial INVITE for example. If a
server is not in the list of record routes, then in-dialog requests will
not be sent to the server. Headers that are most important in terms of
routing are R-URI, Route, Record-Route, Contact, Via.

Via header is for routing responses, while Record-Route is for in-dialog
requests.

Cheers,
Yufei


> Message: 7
> Date: Thu, 5 Nov 2020 12:26:16 +0200
> From: "Adrian Tabacioiu" 
> To: sr-users@lists.kamailio.org
> Subject: [SR-Users] Proxy configuration that exit dialog afer INVITE
> -> OK
> Message-ID: <7449102a9f3dbe38b6dba753d1cffcd8.squir...@mail.c-s.ro>
> Content-Type: text/plain;charset=iso-8859-1
>
>
> Hello all,
>
> Am I new in the usage of kamailio, sorry if I ask somehow something simple
> or terribly wrong .
>
> I need to test a configuration of Kamailio which exit the dialog between
> UA after the first OK (that means it will not receive the following ACK,
> BYE).
>
> I understand that in theory this is possible in two configuration types:
> - no Record Route header
> - or stateless proxy
>
> First question:
> Am I correct with the choices above?
> Can I find example configuration for this two modes ?
>
> Question 2:
> two or more proxy should be inter-connected, removing the Record Route
> header would interfere with proxy routing ? (should not the "Via"
> information be sufficient?)
>
> Thank you in advance for help.
>
> Best regards,
> Adrian Tabacioiu
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Proxy configuration that exit dialog afer INVITE -> OK

2020-11-06 Thread Yufei Tao
Hi,

Here's an example kamailio.cfg that uses record_route so in-dialog requests
will go through the Kamailio proxy:
https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg
There are many other example cfg files:
https://github.com/kamailio/kamailio/tree/master/misc/examples

Any server that wants to see the in-dialog messages needs to add itself to
the record route list when receiving the initial INVITE for example. If a
server is not in the list of record routes, then in-dialog requests will
not be sent to the server. Headers that are most important in terms of
routing are R-URI, Route, Record-Route, Contact, Via.

Via header is for routing responses, while Record-Route is for in-dialog
requests.

I've put a few tips and some resources here about starting with Kamailio,
which hopefully may help you a bit:
http://tao-communications-ltd.simplesite.com/447576389

Cheers,
Yufei

>* Message: 7
*>* Date: Thu, 5 Nov 2020 12:26:16 +0200
*>* From: "Adrian Tabacioiu" https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>>
*>* To: sr-users at lists.kamailio.org

*>* Subject: [SR-Users] Proxy configuration that exit dialog afer INVITE
*>* -> OK
*>* Message-ID: <7449102a9f3dbe38b6dba753d1cffcd8.squirrel at
mail.c-s.ro >
*>* Content-Type: text/plain;charset=iso-8859-1
*>>>* Hello all,
*>>* Am I new in the usage of kamailio, sorry if I ask somehow something simple
*>* or terribly wrong .
*>>* I need to test a configuration of Kamailio which exit the dialog between
*>* UA after the first OK (that means it will not receive the following ACK,
*>* BYE).
*>>* I understand that in theory this is possible in two configuration types:
*>* - no Record Route header
*>* - or stateless proxy
*>>* First question:
*>* Am I correct with the choices above?
*>* Can I find example configuration for this two modes ?
*>>* Question 2:
*>* two or more proxy should be inter-connected, removing the Record Route
*>* header would interfere with proxy routing ? (should not the "Via"
*>* information be sufficient?)
*>>* Thank you in advance for help.
*>>* Best regards,
*>* Adrian Tabacioiu
*>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users