Discussion:
rtpengine error when activating in branch route
Carlos Ruiz Díaz
2014-09-30 01:16:13 UTC
Permalink
Hi,

rtpengine is crashing when it is activated in the branch route.

In normal cases I would do it before relaying the request, but in my
scenario, I am trying to call to two UAs behind NAT, the first one
registered through WS transport, and the other one via TCP.

The caller is a normal softphone, and I am determining what operations
rtpengine needs to do depending on the transport reported by the location
records.

Is there any other (better) way of achieving the same?

Thanks,
Carlos

-----------------------------------------------------------------------------------------------------
*(gdb) bt full*
*#0 str_hash (ss=<optimized out>) at str.c:12*
* x = <optimized out>*
* s = <optimized out>*
* ret = <optimized out>*
* it = {s = <optimized out>, len = 36}*
*#1 0x00007f0bd6b5cd29 in ?? ()*
*No symbol table info available.*
*#2 0x00000000004130aa in call_get (m=0xfc2000, callid=0x7f0bceeef480) at
call.c:2523*
* ret = <optimized out>*
*#3 call_get_opmode (callid=***@entry=0x7f0bceeef480,
m=***@entry=0xfc2000, opmode=***@entry=OP_ANSWER) at call.c:2541*
*No locals.*
*#4 0x0000000000421067 in call_offer_answer_ng
(input=***@entry=0x7f0bc8001f38, m=0xfc2000,
output=***@entry=0x7f0bc8001ed8,*
* opmode=***@entry=OP_ANSWER) at call_interfaces.c:591*
* sdp = {*
* s = 0x7f0bceeef772 "v=0\r\no=- 3621027548 3621027549 IN IP4
192.168.3.107\r\ns=pjmedia\r\nc=IN IP4 192.168.3.107\r\nt=0 0\r\nm=audio
4022 RTP/AVP 8 101\r\nc=IN IP4 192.168.3.107\r\na=rtcp:4023 IN IP4
192.168.3.107\r\na=sendrecv\r\na=rtpma"..., len = 267}*
* fromtag = {s = 0x7f0bceeef94e
"35mvKg7Uy1UHQ6:to-tag32:vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere",
len = 13}*
* totag = {s = 0x7f0bceeef966
"vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere", len = 32}*
* callid = {*
* s = 0x7f0bceeef8f5
"d27f350d-c2df-1232-e19b-04011404230113:received-froml3:IP414:189.217.95.230e8:from-tag13:35mvKg7Uy1UHQ6:to-tag32:vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere",
len = 36}*
* errstr = 0x429c48 "Incomplete SDP specification"*
* parsed = {head = 0x7f0bc8001a00, tail = 0x7f0bc8001a00, length =
1}*
* streams = {head = 0x7f0bc8001c20, tail = 0x7f0bc8001c20, length =
1}*
* call = <optimized out>*
* monologue = <optimized out>*
* ret = <optimized out>*
* flags = {opmode = OP_ANSWER, received_from_family = {*
* s = 0x7f0bceeef92c
"IP414:189.217.95.230e8:from-tag13:35mvKg7Uy1UHQ6:to-tag32:vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere",
len = 3},*
* received_from_address = {*
* s = 0x7f0bceeef932
"189.217.95.230e8:from-tag13:35mvKg7Uy1UHQ6:to-tag32:vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere",
len = 14},*
* media_address = {s = 0x0, len = 0}, transport_protocol_str = {*
* s = 0x7f0bceeef8e2
"RTP/AVP7:call-id36:d27f350d-c2df-1232-e19b-04011404230113:received-froml3:IP414:189.217.95.230e8:from-tag13:35mvKg7Uy1UHQ6:to-tag32:vyDHxZfSgHUXcPVHtWMQcbbwmzenpHTL7:command6:answere",
len = 7}, address_family_str = {s = 0x0, len = 0},*
* transport_protocol = 0x427880 <transport_protocols>,
parsed_received_from = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>,
__u6_addr16 = {*
* 0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}},
parsed_media_address = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>,*
* __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0,
0, 0}}}, direction = {{s = 0x0, len = 0}, {s = 0x0, len = 0}},*
* address_family = 0, tos = 256, asymmetric = 0, trust_address =
-1, replace_origin = -1, replace_sess_conn = -1, ice_remove = -1, ice_force
= 0,*
* ice_force_relay = 0, rtcp_mux_offer = 0, rtcp_mux_demux = 0,
rtcp_mux_accept = 0, rtcp_mux_reject = 0, strict_source = 0, media_handover
= 0}*
* chopper = <optimized out>*
--
Carlos
http://caruizdiaz.com
Richard Fuchs
2014-09-30 01:46:15 UTC
Permalink
Post by Carlos Ruiz Díaz
Hi,
rtpengine is crashing when it is activated in the branch route.
This looks similar to what has been reported here:
https://github.com/sipwise/rtpengine/issues/27

Which is something I haven't been able to reproduce. Perhaps you can
shed some light on this within the context of the github thread.

cheers
Carlos Ruiz Díaz
2014-09-30 02:24:22 UTC
Permalink
Hi Richard,

I'm replying here because my answer is still strictly related to Kamailio.

Using WS is only one of the variants. Completely using TCP or UDP results
in the same crash.

Let me elaborate my current setup:

- ***@domain;transport=tcp -> caller
- ***@domain -> callee

ua2 is registered via TCP and WS, so the location service will inform the
following:

- ***@1.1.1.1;transport=tcp
- ***@2.2.2.2;transport=ws

This implies that I'm gonna need two SDP modifications, depending on where
the INVITE is going:

ua1 (RTP/AVP) -> (Kamailio [parallel forking]) -> ***@1.1.1.1 (RTP/AVP)

-> ***@2.2.2.2 (RTP/SAVPF)

As soon as rtpengine is engaged for the second time, no matter the order,
it crashes.

Regards,
Carlos
Post by Richard Fuchs
Post by Carlos Ruiz Díaz
Hi,
rtpengine is crashing when it is activated in the branch route.
https://github.com/sipwise/rtpengine/issues/27
Which is something I haven't been able to reproduce. Perhaps you can
shed some light on this within the context of the github thread.
cheers
_______________________________________________
sr-dev mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Carlos
http://caruizdiaz.com
Carlos Ruiz Díaz
2014-09-30 03:19:57 UTC
Permalink
More on this.

The crash also occurs when rewriting the SDP (by calling rtpengine_manage)
more than once, independent of the transport.

Richard, let me know if you are having problems reproducing this. I am more
than willing to provide you the test scenario you need.

Regards,
Carlos
Post by Carlos Ruiz Díaz
Hi Richard,
I'm replying here because my answer is still strictly related to Kamailio.
Using WS is only one of the variants. Completely using TCP or UDP results
in the same crash.
ua2 is registered via TCP and WS, so the location service will inform the
This implies that I'm gonna need two SDP modifications, depending on where
As soon as rtpengine is engaged for the second time, no matter the order,
it crashes.
Regards,
Carlos
Post by Richard Fuchs
Post by Carlos Ruiz Díaz
Hi,
rtpengine is crashing when it is activated in the branch route.
https://github.com/sipwise/rtpengine/issues/27
Which is something I haven't been able to reproduce. Perhaps you can
shed some light on this within the context of the github thread.
cheers
_______________________________________________
sr-dev mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Carlos
http://caruizdiaz.com
--
Carlos
http://caruizdiaz.com
Richard Fuchs
2014-09-30 13:47:13 UTC
Permalink
Post by Carlos Ruiz Díaz
More on this.
The crash also occurs when rewriting the SDP (by calling
rtpengine_manage) more than once, independent of the transport.
Richard, let me know if you are having problems reproducing this. I am
more than willing to provide you the test scenario you need.
Is this on an EC2 instance by any chance?

cheers
Carlos Ruiz Díaz
2014-09-30 13:57:20 UTC
Permalink
Nope, it's on a DigitalOcean instance.

Linux carucloud 3.9.8-300.fc19.x86_64 #1 SMP Thu Jun 27 19:24:23 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 2
model name : QEMU Virtual CPU version 1.0
stepping : 3
microcode : 0x1
cpu MHz : 1999.999
cache size : 4096 KB
fpu : yes
fpu_exception : yes
cpuid level : 4
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36
clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni vmx cx16 popcnt
hypervisor lahf_lm
bogomips : 3999.99
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
Post by Richard Fuchs
Post by Carlos Ruiz Díaz
More on this.
The crash also occurs when rewriting the SDP (by calling
rtpengine_manage) more than once, independent of the transport.
Richard, let me know if you are having problems reproducing this. I am
more than willing to provide you the test scenario you need.
Is this on an EC2 instance by any chance?
cheers
_______________________________________________
sr-dev mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Carlos
http://caruizdiaz.com
Richard Fuchs
2014-09-30 14:40:46 UTC
Permalink
Post by Carlos Ruiz Díaz
Nope, it's on a DigitalOcean instance.
Ok, still a VM though. I bet that if you try this on a "real" amd64, you
won't see this crash. Something weird going on with those VM instances.
You can try replacing the str_hash() function with what I've posted on
github and see if that fixes anything.

https://github.com/sipwise/rtpengine/issues/27#issuecomment-56274879

cheers

Loading...