Hi
Im using an Asterisk cluster behind Kamailio and some services are running on Asterisk. Traffic always must go to Asterisk so RTPPROXY and RTPNGINE do the work and send traffic to Asterisk and traffic from Asterisk go to RTP Proxy
I have been able to get rtpproxy working and later tried RTPengie to be able to manage SRTP
I have been able to make SRTP To RTP to Asterisk
Im able to call between RTP using rtpproxy as recording is a must and rtpengine does not record yet.
But im not able to call between SRTP extensions, i understand also SRTP to RTP would work as im doing with Asterisk (Only the speak SRTP as rtpengine trasncode)
I have this code on NATMANAGE but i do not know what could be wrong to handle SRTP
Any idea? Thanks in advance
if(src_ip==ASTERISK1_LAN || src_ip==ASTERISK2_LAN ){
if (sdp_get_line_startswith("$avp(mline)", "m="))
{
if ($avp(mline) =~ "AVP")
{
add_rr_param(";rtp=AVP-kamtoast");
set_rtp_proxy_set("1");
rtpproxy_manage("rwei");
}
if ($avp(mline) =~ "SAVP")
{
add_rr_param(";rtp=SAVP-kamtoast");
rtpengine_manage("trust-address direction=external replace-origin replace-session-connection ICE=remove RTP AVP");
}
}
}
else{
if (sdp_get_line_startswith("$avp(mline)", "m="))
{
if ($avp(mline) =~ "AVP")
{
add_rr_param(";rtp=AVP-asttokam");
set_rtp_proxy_set("1");
rtpproxy_manage("rwie");
}
if ($avp(mline) =~ "SAVP")
{
add_rr_param(";rtp=SAVP-asttokam");
rtpengine_manage("trust-address direction=external replace-origin replace-session-connection ICE=remove ");
}
}
}
If you need any more info let me know.
Alberto Sagredo-2 wrote
... I have been able to make SRTP To RTP to Asterisk
But im not able to call between SRTP extensions, i understand also SRTP to RTP would work as im doing with Asterisk (Only the speak SRTP as rtpengine trasncode)
If you need any more info let me know.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi! If you make SRTP to RTP to Asterisk, you possibly will need vice versa conversion (when request coming from Asterisk to client with SRTP).
Can you describe the logic of test case: (UA-A (SRTP) --> Kamailio (make SRTP->RTP) .... etc.
Because your explanation is difficult to understand.
Cheers!
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Issue-handling-SRTP-and-RTP-with-rtp... Sent from the Users mailing list archive at Nabble.com.
Thanks Vasily i have changed a little today using a RTPPROXY route.
Thats what i have right now
But its not working as expected
What i try is to detect if i have SAVP from endpoint and translate to RTP to ASterisk an later RTP from ASterisk translate to SRTP using rtpengine
I had extrange behaviour using rtpproxy that send SRTP to Asterisk and i have SRTP calls, i though rtpproxy 2.0 could not manage SRTP calls. but it pass it to Asterisk
Using RTPengine i have tested with rtpproxy_manage as you see and also with rtpengine.
If i load both start_recording() feature is lost.
On rtpengine (behind NAT) im using it as:
INTERFACES="192.168.0.178 internal/192.168.0.178 external/192.168.0.179 !EXTERN_IP
On NATMANAGE route i call directly
route(RTPPROXY);
Hope this helps
-----
route[RTPPROXY] {
if (is_method("INVITE")){
if(ds_is_from_list(1)){
if (is_ip_rfc1918("$si")) {
xlog("L_INFO", "LLamada desde los Asterisk_$si -> RTPPROXY\n");
if (sdp_get_line_startswith("$avp(mline)", "m="))
{
#!ifdef WITH_RTPENGINE
if ($avp(mline) =~ "SAVP")
{
xlog("L_INFO", "Tenemos SRTP ");
xlog("L_INFO", "Llamada entre Extensiones -> RTPENGINE INTERNAL");
rtpengine_manage("direction=internal replace-origin replace-session-connection ICE=remove");
return;
}
#!endif
if ($avp(mline) =~ "AVP")
{
xlog("L_INFO", "Tenemos RTP ");
xlog("L_INFO", "Llamada entre Extensiones -> RTPROXY ");
#!ifdef WITH_RTPPROXY
set_rtp_proxy_set("1");
rtpproxy_manage("fwei");
start_recording();
#!endif
#!ifdef WITH_RTPENGINE
set_rtp_proxy_set("2");
rtpproxy_manage("ie");
#!endif
}
}
}
}else if(!ds_is_from_list()){
if (sdp_get_line_startswith("$avp(mline)", "m="))
{
#!ifdef WITH_RTPENGINE
if ($avp(mline) =~ "SAVP")
{
xlog("L_INFO", "Tenemos SRTP ");
xlog("L_INFO", "Llamada entre Extensiones -> RTPENGINE EXTERNAL ");
rtpengine_manage("direction=external replace-origin replace-session-connection ICE=remove");
return;
}
#!endif
if ($avp(mline) =~ "AVP")
{
xlog("L_INFO", "Tenemos RTP ");
xlog("L_INFO", "Llamada entre Extensiones -> RTPROXY ");
#!ifdef WITH_RTPPROXY
set_rtp_proxy_set("1");
rtpproxy_manage("fwie");
start_recording();
#!endif
#!ifdef WITH_RTPENGINE
set_rtp_proxy_set("2");
rtpproxy_manage("ei");
#!endif
}
}
}
}
}
2015-07-14 14:24 GMT+02:00 Vasiliy Ganchev vasiliy.ganchev@wildix.com:
Alberto Sagredo-2 wrote
... I have been able to make SRTP To RTP to Asterisk
But im not able to call between SRTP extensions, i understand also SRTP
to
RTP would work as im doing with Asterisk (Only the speak SRTP as
rtpengine
trasncode)
If you need any more info let me know.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi! If you make SRTP to RTP to Asterisk, you possibly will need vice versa conversion (when request coming from Asterisk to client with SRTP).
Can you describe the logic of test case: (UA-A (SRTP) --> Kamailio (make SRTP->RTP) .... etc.
Because your explanation is difficult to understand.
Cheers!
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Issue-handling-SRTP-and-RTP-with-rtp... Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Alberto Sagredo-2 wrote
Thanks Vasily i have changed a little today using a RTPPROXY route.
Thats what i have right now
But its not working as expected
What i try is to detect if i have SAVP from endpoint and translate to RTP to ASterisk an later RTP from ASterisk translate to SRTP using rtpengine
I had extrange behaviour using rtpproxy that send SRTP to Asterisk and i have SRTP calls, i though rtpproxy 2.0 could not manage SRTP calls. but it pass it to Asterisk
Using RTPengine i have tested with rtpproxy_manage as you see and also with rtpengine.
If i load both start_recording() feature is lost.
On rtpengine (behind NAT) im using it as:
INTERFACES="192.168.0.178 internal/192.168.0.178 external/192.168.0.179 !EXTERN_IP
On NATMANAGE route i call directly
route(RTPPROXY);
Hope this helps
route[RTPPROXY] {
if (is_method("INVITE")){
if(ds_is_from_list(1)){
if (is_ip_rfc1918("$si")) { xlog("L_INFO", "LLamada desde los
Asterisk_$si -> RTPPROXY\n");
if (sdp_get_line_startswith("$avp(mline)", "m=")) { #!ifdef WITH_RTPENGINE if ($avp(mline) =~ "SAVP") { xlog("L_INFO", "Tenemos SRTP "); xlog("L_INFO", "Llamada entre Extensiones
-> RTPENGINE INTERNAL");
rtpengine_manage("direction=internal
replace-origin replace-session-connection ICE=remove");
return; } #!endif if ($avp(mline) =~ "AVP") { xlog("L_INFO", "Tenemos RTP "); xlog("L_INFO", "Llamada entre Extensiones
-> RTPROXY ");
#!ifdef WITH_RTPPROXY set_rtp_proxy_set("1"); rtpproxy_manage("fwei"); start_recording(); #!endif #!ifdef WITH_RTPENGINE set_rtp_proxy_set("2"); rtpproxy_manage("ie"); #!endif } } } }else if(!ds_is_from_list()){ if (sdp_get_line_startswith("$avp(mline)", "m=")) { #!ifdef WITH_RTPENGINE if ($avp(mline) =~ "SAVP") { xlog("L_INFO", "Tenemos SRTP "); xlog("L_INFO", "Llamada entre Extensiones
-> RTPENGINE EXTERNAL ");
rtpengine_manage("direction=external
replace-origin replace-session-connection ICE=remove");
return; } #!endif if ($avp(mline) =~ "AVP") { xlog("L_INFO", "Tenemos RTP "); xlog("L_INFO", "Llamada entre Extensiones
-> RTPROXY ");
#!ifdef WITH_RTPPROXY set_rtp_proxy_set("1"); rtpproxy_manage("fwie"); start_recording(); #!endif #!ifdef WITH_RTPENGINE set_rtp_proxy_set("2"); rtpproxy_manage("ei"); #!endif } } } }
}
2015-07-14 14:24 GMT+02:00 Vasiliy Ganchev <
vasiliy.ganchev@
>:
Alberto Sagredo-2 wrote
... I have been able to make SRTP To RTP to Asterisk
But im not able to call between SRTP extensions, i understand also SRTP
to
RTP would work as im doing with Asterisk (Only the speak SRTP as
rtpengine
trasncode)
If you need any more info let me know.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi! If you make SRTP to RTP to Asterisk, you possibly will need vice versa conversion (when request coming from Asterisk to client with SRTP).
Can you describe the logic of test case: (UA-A (SRTP) --> Kamailio (make SRTP->RTP) .... etc.
Because your explanation is difficult to understand.
Cheers!
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Issue-handling-SRTP-and-RTP-with-rtp... Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
What about ICE, where it has to work? (client->Kamailio - yes, Kamailio->Asterisk - no) or somehow else.
For your description, I think you need to add something like this: - Kamailio -> Asterisk rtpengine_manage("...............RTP/AVP"); ///// this will change profile to RTP/AVP
- Asterisk -> Kamailio rtpengine_manage("...............RTP/SAVPF"); ///// this will make backward changes
Also read thoroughly the meaning and usage of "direction" parameter, I think you have little misunderstanding of how it works (maybe I'm wrong and you use it as it has to be, but re-read it anyway)
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Issue-handling-SRTP-and-RTP-with-rtp... Sent from the Users mailing list archive at Nabble.com.
Thanks Vasily
direction parameter i understood it was as ie options on rtpproxy, maybe im wrong.
About them , i was ngreping all trace and that was the option to get SDP correct mapped using RTPengine..
WIll check with your comments and let you know back.
BR
2015-07-14 17:16 GMT+02:00 Vasiliy Ganchev vasiliy.ganchev@wildix.com:
Alberto Sagredo-2 wrote
Thanks Vasily i have changed a little today using a RTPPROXY route.
Thats what i have right now
But its not working as expected
What i try is to detect if i have SAVP from endpoint and translate to RTP to ASterisk an later RTP from ASterisk translate to SRTP using rtpengine
I had extrange behaviour using rtpproxy that send SRTP to Asterisk and i have SRTP calls, i though rtpproxy 2.0 could not manage SRTP calls. but
it
pass it to Asterisk
Using RTPengine i have tested with rtpproxy_manage as you see and also with rtpengine.
If i load both start_recording() feature is lost.
On rtpengine (behind NAT) im using it as:
INTERFACES="192.168.0.178 internal/192.168.0.178 external/192.168.0.179 !EXTERN_IP
On NATMANAGE route i call directly
route(RTPPROXY);
Hope this helps
route[RTPPROXY] {
if (is_method("INVITE")){
if(ds_is_from_list(1)){
if (is_ip_rfc1918("$si")) { xlog("L_INFO", "LLamada desde los
Asterisk_$si -> RTPPROXY\n");
if (sdp_get_line_startswith("$avp(mline)", "m=")) { #!ifdef WITH_RTPENGINE if ($avp(mline) =~ "SAVP") { xlog("L_INFO", "Tenemos SRTP "); xlog("L_INFO", "Llamada entre Extensiones
-> RTPENGINE INTERNAL");
rtpengine_manage("direction=internal
replace-origin replace-session-connection ICE=remove");
return; } #!endif if ($avp(mline) =~ "AVP") { xlog("L_INFO", "Tenemos RTP "); xlog("L_INFO", "Llamada entre Extensiones
-> RTPROXY ");
#!ifdef WITH_RTPPROXY set_rtp_proxy_set("1"); rtpproxy_manage("fwei"); start_recording(); #!endif #!ifdef WITH_RTPENGINE set_rtp_proxy_set("2"); rtpproxy_manage("ie"); #!endif } } } }else if(!ds_is_from_list()){ if (sdp_get_line_startswith("$avp(mline)", "m=")) { #!ifdef WITH_RTPENGINE if ($avp(mline) =~ "SAVP") { xlog("L_INFO", "Tenemos SRTP "); xlog("L_INFO", "Llamada entre Extensiones
-> RTPENGINE EXTERNAL ");
rtpengine_manage("direction=external
replace-origin replace-session-connection ICE=remove");
return; } #!endif if ($avp(mline) =~ "AVP") { xlog("L_INFO", "Tenemos RTP "); xlog("L_INFO", "Llamada entre Extensiones
-> RTPROXY ");
#!ifdef WITH_RTPPROXY set_rtp_proxy_set("1"); rtpproxy_manage("fwie"); start_recording(); #!endif #!ifdef WITH_RTPENGINE set_rtp_proxy_set("2"); rtpproxy_manage("ei"); #!endif } } } }
}
2015-07-14 14:24 GMT+02:00 Vasiliy Ganchev <
vasiliy.ganchev@
>:
Alberto Sagredo-2 wrote
... I have been able to make SRTP To RTP to Asterisk
But im not able to call between SRTP extensions, i understand also
SRTP
to
RTP would work as im doing with Asterisk (Only the speak SRTP as
rtpengine
trasncode)
If you need any more info let me know.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi! If you make SRTP to RTP to Asterisk, you possibly will need vice versa conversion (when request coming from Asterisk to client with SRTP).
Can you describe the logic of test case: (UA-A (SRTP) --> Kamailio (make SRTP->RTP) .... etc.
Because your explanation is difficult to understand.
Cheers!
-- View this message in context:
http://sip-router.1086192.n5.nabble.com/Issue-handling-SRTP-and-RTP-with-rtp...
Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@.sip-router
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
What about ICE, where it has to work? (client->Kamailio - yes, Kamailio->Asterisk - no) or somehow else.
For your description, I think you need to add something like this:
- Kamailio -> Asterisk rtpengine_manage("...............RTP/AVP"); ///// this will change
profile to RTP/AVP
- Asterisk -> Kamailio rtpengine_manage("...............RTP/SAVPF"); ///// this will make
backward changes
Also read thoroughly the meaning and usage of "direction" parameter, I think you have little misunderstanding of how it works (maybe I'm wrong and you use it as it has to be, but re-read it anyway)
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Issue-handling-SRTP-and-RTP-with-rtp... Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Tuesday 14 July 2015 17:01:38 Alberto Sagredo wrote:
What i try is to detect if i have SAVP from endpoint and translate to RTP to ASterisk an later RTP from ASterisk translate to SRTP using rtpengine
Why not just handle SRTP with asterisk and record there?
Hi daniel
In my tests rtpproxy recording waste less resources than asterisk
That was one of the reasons
BR
ALBERTO
El martes, 14 de julio de 2015, Daniel Tryba d.tryba@pocos.nl escribió:
On Tuesday 14 July 2015 17:01:38 Alberto Sagredo wrote:
What i try is to detect if i have SAVP from endpoint and translate to RTP to ASterisk an later RTP from ASterisk translate to SRTP using rtpengine
Why not just handle SRTP with asterisk and record there?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org javascript:; http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Tuesday 14 July 2015 18:19:02 Alberto Sagredo wrote:
In my tests rtpproxy recording waste less resources than asterisk
That was one of the reasons
How much time have you spend so far on a problem that asterisk can handle out of the box? ;)
I'd love to do this with kamailio/rtpengine (I don't record), but sofar the blunt quickfix is to use asterisk. I needed a transcoder anyway and handling RTP/SRTP conversions when either endpoint needs it is simple.
Hi Daniel
Kamailio is for hard people and fun :)
Thanks Visily i finnaly got it working with your tip. You were right about internal external options instead direction=...
Here its some code to someone could need it
route[RTPPROXY] {
if (is_method("INVITE")){
if(ds_is_from_list(1)){
if (is_ip_rfc1918("$si")) {
if (sdp_get_line_startswith("$avp(mline)", "m="))
{
#!ifdef WITH_RTPENGINE
if ($avp(mline) =~ "SAVP")
{
xlog("L_INFO", "We got SRTP ");
rtpengine_manage("trust-address internal external replace-origin replace-session-connection ICE=remove ");
return;
}
#!endif
if ($avp(mline) =~ "AVP")
{
xlog("L_INFO", "We got RTP ");
#!ifdef WITH_RTPPROXY
set_rtp_proxy_set("1");
rtpproxy_manage("fwei");
start_recording();
#!endif
#!ifdef WITH_RTPENGINE
rtpengine_manage("trust-address internal external replace-origin replace-session-connection ICE=remove ");
#!endif
}
}
}
}
else if(!ds_is_from_list()){
if (sdp_get_line_startswith("$avp(mline)", "m="))
{
#!ifdef WITH_RTPENGINE
if ($avp(mline) =~ "SAVP")
{
xlog("L_INFO", "We got SRTP ");
rtpengine_manage("external internal replace-origin replace-session-connection ICE=remove RTP AVP");
return;
}
#!endif
if ($avp(mline) =~ "AVP")
{
xlog("L_INFO", "We got RTP ");
#!ifdef WITH_RTPPROXY
set_rtp_proxy_set("1");
rtpproxy_manage("fwie");
start_recording();
#!endif
#!ifdef WITH_RTPENGINE
rtpengine_manage("external internal replace-origin replace-session-connection ICE=remove RTP AVP");
#!endif
}
}
}
}
}
2015-07-14 18:46 GMT+02:00 Daniel Tryba d.tryba@pocos.nl:
On Tuesday 14 July 2015 18:19:02 Alberto Sagredo wrote:
In my tests rtpproxy recording waste less resources than asterisk
That was one of the reasons
How much time have you spend so far on a problem that asterisk can handle out of the box? ;)
I'd love to do this with kamailio/rtpengine (I don't record), but sofar the blunt quickfix is to use asterisk. I needed a transcoder anyway and handling RTP/SRTP conversions when either endpoint needs it is simple.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Wednesday 15 July 2015 08:44:13 Alberto Sagredo wrote:
Kamailio is for hard people and fun :)
No comment on this one....
Thanks Visily i finnaly got it working with your tip. You were right about internal external options instead direction=...
Here its some code to someone could need it
Thanks for sharing, I'll see if I can migrate SRTP/RTP conversion to rtpengine in a distant future.
You are welcome!
2015-07-15 15:42 GMT+02:00 Daniel Tryba d.tryba@pocos.nl:
On Wednesday 15 July 2015 08:44:13 Alberto Sagredo wrote:
Kamailio is for hard people and fun :)
No comment on this one....
Thanks Visily i finnaly got it working with your tip. You were right
about
internal external options instead direction=...
Here its some code to someone could need it
Thanks for sharing, I'll see if I can migrate SRTP/RTP conversion to rtpengine in a distant future.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 07/15/2015 08:44 AM, Alberto Sagredo wrote:
Hi Alberto,
can you also share part of the relevant place where you are calling that route?
Cheers, Roberto Fichera.
Hi Daniel
Kamailio is for hard people and fun :)
Thanks Visily i finnaly got it working with your tip. You were right about internal external options instead direction=...
Here its some code to someone could need it
route[RTPPROXY] {
if (is_method("INVITE")){
if(ds_is_from_list(1)){
if (is_ip_rfc1918("$si")) { if (sdp_get_line_startswith("$avp(mline)", "m=")) { #!ifdef WITH_RTPENGINE if ($avp(mline) =~ "SAVP") { xlog("L_INFO", "We got SRTP "); rtpengine_manage("trust-address internal external replace-origin
replace-session-connection ICE=remove ");
return; } #!endif if ($avp(mline) =~ "AVP") { xlog("L_INFO", "We got RTP "); #!ifdef WITH_RTPPROXY set_rtp_proxy_set("1"); rtpproxy_manage("fwei"); start_recording(); #!endif #!ifdef WITH_RTPENGINE rtpengine_manage("trust-address internal external replace-origin
replace-session-connection ICE=remove ");
#!endif } } } }
else if(!ds_is_from_list()){
if (sdp_get_line_startswith("$avp(mline)", "m=")) { #!ifdef WITH_RTPENGINE if ($avp(mline) =~ "SAVP") { xlog("L_INFO", "We got SRTP "); rtpengine_manage("external internal replace-origin replace-session-connection
ICE=remove RTP AVP");
return; } #!endif if ($avp(mline) =~ "AVP") { xlog("L_INFO", "We got RTP "); #!ifdef WITH_RTPPROXY set_rtp_proxy_set("1"); rtpproxy_manage("fwie"); start_recording(); #!endif #!ifdef WITH_RTPENGINE rtpengine_manage("external internal replace-origin replace-session-connection
ICE=remove RTP AVP");
#!endif } } } }
}
2015-07-14 18:46 GMT+02:00 Daniel Tryba <d.tryba@pocos.nl mailto:d.tryba@pocos.nl>:
On Tuesday 14 July 2015 18:19:02 Alberto Sagredo wrote: > In my tests rtpproxy recording waste less resources than asterisk > > That was one of the reasons How much time have you spend so far on a problem that asterisk can handle out of the box? ;) I'd love to do this with kamailio/rtpengine (I don't record), but sofar the blunt quickfix is to use asterisk. I needed a transcoder anyway and handling RTP/SRTP conversions when either endpoint needs it is simple. _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Roberto just call it on NATMANAGE as shown. I route everything now thru that route..
You have to configure rtpengine to use internal external interfaces
route[NATMANAGE] {
#!ifdef WITH_NAT
# if (is_request()) {
# if(has_totag()) {
# if(check_route_param("nat=yes")) {
# setbflag(FLB_NATB);
# }
# }
# }
# if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB))){
# return;
# }
# route(RTPPROXY);
route(RTPPROXY);
if (is_request()) {
if (!has_totag()) {
add_rr_param(";nat=yes");
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
fix_nated_contact();
}
}
#!endif
return;
}
2015-07-15 16:59 GMT+02:00 Roberto Fichera kernel@tekno-soft.it:
On 07/15/2015 08:44 AM, Alberto Sagredo wrote:
Hi Alberto,
can you also share part of the relevant place where you are calling that route?
Cheers, Roberto Fichera.
Hi Daniel
Kamailio is for hard people and fun :)
Thanks Visily i finnaly got it working with your tip. You were right about internal external options instead direction=...
Here its some code to someone could need it
route[RTPPROXY] {
if (is_method("INVITE")){
if(ds_is_from_list(1)){
if (is_ip_rfc1918("$si")) { if (sdp_get_line_startswith("$avp(mline)", "m=")) { #!ifdef WITH_RTPENGINE if ($avp(mline) =~ "SAVP") { xlog("L_INFO", "We got SRTP "); rtpengine_manage("trust-address internal
external replace-origin replace-session-connection ICE=remove ");
return; } #!endif if ($avp(mline) =~ "AVP") { xlog("L_INFO", "We got RTP "); #!ifdef WITH_RTPPROXY set_rtp_proxy_set("1"); rtpproxy_manage("fwei"); start_recording(); #!endif #!ifdef WITH_RTPENGINE rtpengine_manage("trust-address internal
external replace-origin replace-session-connection ICE=remove ");
#!endif } } } }
else if(!ds_is_from_list()){
if (sdp_get_line_startswith("$avp(mline)", "m=")) { #!ifdef WITH_RTPENGINE if ($avp(mline) =~ "SAVP") { xlog("L_INFO", "We got SRTP "); rtpengine_manage("external internal
replace-origin replace-session-connection ICE=remove RTP AVP");
return; } #!endif if ($avp(mline) =~ "AVP") { xlog("L_INFO", "We got RTP "); #!ifdef WITH_RTPPROXY set_rtp_proxy_set("1"); rtpproxy_manage("fwie"); start_recording(); #!endif #!ifdef WITH_RTPENGINE rtpengine_manage("external internal
replace-origin replace-session-connection ICE=remove RTP AVP");
#!endif } } } }
}
2015-07-14 18:46 GMT+02:00 Daniel Tryba d.tryba@pocos.nl:
On Tuesday 14 July 2015 18:19:02 Alberto Sagredo wrote:
In my tests rtpproxy recording waste less resources than asterisk
That was one of the reasons
How much time have you spend so far on a problem that asterisk can handle out of the box? ;)
I'd love to do this with kamailio/rtpengine (I don't record), but sofar the blunt quickfix is to use asterisk. I needed a transcoder anyway and handling RTP/SRTP conversions when either endpoint needs it is simple.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users