RTP ip not same as SIP connection ip and then call drop ?!

hello Guys i have a simple diaplan that forward the call to other remote server over SIP like below ;

my dial plan call —> SIP/4166736190:4166736190@10.25.0.100/33

i note that the call get dropped after certain mount of time

i did check the logs and found weird thing and found that the call supposed to go to xxxx but it set its RTP address as YYYY not sure why

see logs below ;
‘33’
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/4166736190:4166736190@10.25.0.100/33
– SIP/10.25.0.100-000000e3 is ringing
> 0x7f5cc8030340 – Probation passed - setting RTP source address to 10.25.0.104:52076
> 0x7f5cc8030340 – Probation passed - setting RTP source address to 10.25.0.104:52076
– SIP/10.25.0.100-000000e3 answered SIP/SIP2/OUT-000000e2
– Channel SIP/10.25.0.100-000000e3 joined ‘simple_bridge’ basic-bridge
– Channel SIP/SIP2/OUT-000000e2 joined ‘simple_bridge’ basic-bridge
> 0x7f5cc8030340 – Probation passed - setting RTP source address to 10.25.0.104:52076
calldirCLI>
[2017-06-09 04:45:34] NOTICE[26829]: chan_sip.c:29516 check_rtp_timeout: Disconnecting call ‘SIP/10.25.0.100-000000e3’ for lack of RTP activity in 31 seconds
– Channel SIP/10.25.0.100-000000e3 left ‘simple_bridge’ basic-bridge
– Channel SIP/SIP2/OUT-000000e2 left ‘simple_bridge’ basic-bridge
== Spawn extension (4166736190, 4166736190, 11) exited non-zero on 'SIP/SIP2/OUT-000000e2’
calldir
CLI>

##################

as we see i send the call to 10.25.0.100 but why the RTP goes to 10.25.0.104 ??? is that wrong settings in my side ? or remote side ?

cheers

That message is normal. The RTP support has functionality to allow it to protect against RTP packets not coming from the sender, that message tells you that for one of the channels it determined the source to be 10.25.0.104 port 52076. That’s not the cause of the issue.

You’d need to provide the output of “sip set debug on” with a call attempt and also describe the network layout.

debug.txt (41.6 KB)

here is full debug once call started until it dead

When contacting the device at 10.25.0.100 we are telling it to provide media to 10.101.0.60, is this reachable by it? If so have you done a packet capture to see if we are receiving media from it or if it is getting dropped somewhere?

yes its reachable and i can ping it .

didn’t you see ;
[2017-06-09 04:45:34] NOTICE[26829]: chan_sip.c:29516 check_rtp_timeout: Disconnecting call ‘SIP/10.25.0.100-000000e3’ for lack of RTP activity in 31 seconds

also I’m still not understanding how ip is changed in RTP ??!!
do you mean the ip there is fake ? and really connection is through the ip 10.25.0.100 ??

i don’t undertssn how I’m talking to 10.25.0.100 then i see rtp comes from other ip address ?

The device at 10.25.0.100 is saying it wants media at 10.25.0.104, and it also appears to send from there. It may be that it just stops sending it for some reason. A packet capture or “rtp set debug on” would confirm this.

i think what i guessed in beginning is correct
i guess the issue is from the other side who i send to

why it choose other RTP address ?

here is other example i made :slight_smile:== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/4166736190:4166736190@10.101.0.6/
Got RTP packet from 172.17.21.100:27932 (type 00, seq 001494, ts 091840, len 000160)
Sent RTP packet to 172.17.21.100:27932 (type 00, seq 022204, ts 091520, len 000160)
Got RTP packet from 172.17.21.100:27932 (type 00, seq 001495, ts 092000, len 000160)
Sent RTP packet to 172.17.21.100:27932 (type 00, seq 022205, ts 091680, len 000160)
– SIP/10.101.0.6-000000e7 is ringing
Got RTP packet from 172.17.21.100:27932 (type 00, seq 001496, ts 092160, len 000160)

Sent RTP packet to 172.17.21.100:27932 (type 00, seq 022218, ts 093760, len 000160)
Got RTP packet from 172.17.21.100:27932 (type 00, seq 001509, ts 094240, len 000160)
Sent RTP packet to 172.17.21.100:27932 (type 00, seq 022219, ts 093920, len 000160)
Got RTP packet from 172.17.21.100:27932 (type 00, seq 001510, ts 094400, len 000160)
Sent RTP packet to 172.17.21.100:27932 (type 00, seq 022220, ts 094080, len 000160)
Got RTP packet from 172.17.21.100:27932 (type 00, seq 001511, ts 094560, len 000160)
Sent RTP packet to 172.17.21.100:27932 (type 00, seq 022221, ts 094240, len 000160)
> 0x7f5d381246e0 – Probation passed - setting RTP source address to 10.101.0.82:52396
[2017-06-09 07:01:35] DEBUG[14313][C-00000075]: res_rtp_asterisk.c:4706 ast_rtp_read: RTP NAT: Got audio from other end. Now sending to address 10.101.0.82:52396
Got RTP packet from 10.101.0.82:52396 (type 00, seq 000000, ts 000160, len 000160)
Got RTP packet from 172.17.21.100:27932 (type 00, seq 001512, ts 094720, len 000160)
> 0x7f5d381246e0 – Probation passed - setting RTP source address to 10.101.0.82:52396
Got RTP packet from 10.101.0.82:52396 (type 00, seq 000001, ts 000320, len 000160)
Sent RTP packet to 172.17.21.100:27932 (type 00, seq 022222, ts 094400, len 000160)
Got RTP packet from 172.17.21.100:27932 (type 00, seq 001513, ts 094880, len 000160)
Sent RTP packet to 172.17.21.100:27932 (type 00, seq 022223, ts 094560, len 000160)
Got RTP packet from 10.101.0.82:52396 (type 00, seq 000002, ts 000480, len 000160)
Got RTP packet from 172.17.21.100:27932 (type 00, seq 001514, ts 095040, len 000160)
Got RTP packet from 10.101.0.82:52396 (type 00, seq 000003, ts 000640, len 000160)
Sent RTP packet to 172.17.21.100:27932 (type 00, seq 022224, ts 094720, len 000160)
– SIP/10.101.0.6-000000e7 answered SIP/SIP2/OUT-000000e6
– Channel SIP/10.101.0.6-000000e7 joined ‘simple_bridge’ basic-bridge <22f5c078-dcdc-4fbd-8c09-2f670c7d9a48>
– Channel SIP/SIP2/OUT-000000e6 joined ‘simple_bridge’ basic-bridge <22f5c078-dcdc-4fbd-8c09-2f670c7d9a48>
Got RTP packet from 172.17.21.100:27932 (type 00, seq 001515, ts 095200, len 000160)
Sent RTP packet to 10.101.0.82:52396 (type 00, seq 006837, ts 095200, len 000160)
> 0x7f5d381246e0 – Probation passed - setting RTP source address to 10.101.0.82:52396
Got RTP packet from 10.101.0.82:52396 (type 00, seq 000004, ts 000800, len 000160)
Sent RTP packet to 172.17.21.100:27932 (type 00, seq 022225, ts 000800, len 000160)

call go to 10.101.0.6 but RTP comes from 10.101.0.82

then after sometime u see in logs ;
2017-06-09 04:45:34] NOTICE[26829]: chan_sip.c:29516 check_rtp_timeout: Disconnecting call ‘xxxxx’ for lack of RTP activity in 31 seconds

then call die

should i contact other provider for this issue you think ?

do u think i need to play with my sip.conf ?

cheers

I can’t answer why their setup uses a different IP address for media, it may just be the underlying system itself. I also can’t answer why it stops sending media. You’d have to ask them why. As for your sip.conf you can make the call not hang up by removing the “rtptimeout” option. When removed we don’t care if we stop receiving media.

Thank you for the great info

is there an option that we force asterisk to USE rtp + session ip to be the same ?

No, there is no way.

Why would you want such an option?

The presumption is that the peer knows better that Asterisk, the correct IP address. It is not uncommon for the media to be handled by a different machine than is the official contact for the signally. Cisco do this using machines dedicated to media handling, and some ITSP’s have a load balancing proxy, through which all signalling is relayed, but direct media directly to the machine that is really handling the call.