S
S
Sergey Ryzhkin2017-02-21 15:48:27
Asterisk
Sergey Ryzhkin, 2017-02-21 15:48:27

The sound disappears on Asterisk after 25 seconds, where to dig?

Colleagues, we need help.
For some reason, the sound from the external device disappears after 25 seconds of connection. I call from the mobile to the number, I answer the phone, for 25 seconds the audibility in both directions is normal, but at the 26th second the sound from the mobile disappears, the outside is not audible. From the inside, I speak and on the mobile phone I can be clearly heard, but on the contrary, silence.
On the Internet they write that supposedly because of NAT and RTP traffic. It is necessary to disable canreinvite and the problem will go away, they also advised to transfer externaddr from general to the peer itself. But it didn't help either.
When calling, I ran -rvvvv everything that was displayed below:

[[email protected] ~]# asterisk -rvvvv
=========================================================================
Connected to Asterisk 13.14.0 currently running on voip (pid = 1542)
  == Using SIP RTP CoS mark 5
    -- Executing [[email protected]:1] Dial("SIP/r_213137-00000002", "SIP/125") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/125
    -- SIP/125-00000003 is ringing
    -- SIP/125-00000003 answered SIP/r_213137-00000002
    -- Channel SIP/125-00000003 joined 'simple_bridge' basic-bridge <7687653f-3fab-4a88-8da8-1283f72b39c0>
    -- Channel SIP/r_213137-00000002 joined 'simple_bridge' basic-bridge <7687653f-3fab-4a88-8da8-1283f72b39c0>
       > Bridge 7687653f-3fab-4a88-8da8-1283f72b39c0: switching from simple_bridge technology to native_rtp
       > Locally RTP bridged 'SIP/r_213137-00000002' and 'SIP/125-00000003' in stack
       > Locally RTP bridged 'SIP/r_213137-00000002' and 'SIP/125-00000003' in stack
       > 0x7f8c40006700 -- Probation passed - setting RTP source address to 192.168.50.12:12224
       > 0x7f8b8c00d0c0 -- Probation passed - setting RTP source address to 10.10.10.113:17924
    -- Channel SIP/125-00000003 left 'native_rtp' basic-bridge <7687653f-3fab-4a88-8da8-1283f72b39c0>
    -- Channel SIP/r_213137-00000002 left 'native_rtp' basic-bridge <7687653f-3fab-4a88-8da8-1283f72b39c0>
  == Spawn extension (incoming, 213137, 1) exited non-zero on 'SIP/r_213137-00000002'
voip*CLI>

Here is the configuration of sip.conf^
;
; SIP Configuration example for Asterisk
;

[general]

localnet = 192.168.50.0/24
language=ru
context=default
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=yes
allowguest=no
limitonpeers=yes
alwaysauthreject=yes

defaultexpiry=300
minexpiry=300
maxexpiry=3600

[authentication]

[r_213137]
type=peer
externaddr=10.9.3.7
host=10.10.10.100
port=5060
nat=force_rport,comedia
insecure=invite,port
disallow=all
allow=alaw
allow=ulaw
dtmfmode=auto
secret=********
defaultuser=213137
trunkname=213137
fromuser=213137
callbackextension=213137
context=incoming
directmedia=no
canreinvite=no

;Create template group IT
[itdep](!)
type=friend
context=outcoling
secret=*******
host=dynamic
nat=no
qualify=yes
directmedia=no
callgroup=1
pickupgroup=1
call-limit=2
dtmfmode=auto
disallow=all
allow=alaw
allow=ulaw
allow=g729
allow=g723
allow=g722
canreinvite=no

;Create users group IT
[125](itdep)
callerid="Admin" <125>

This is the extensions.conf config
;
; Extensions Configuration example for Asterisk
;
[general]
static=yes
writeprotect=no

[globals]

[default]

[handup-sip]
exten => _X!,1,Hangup()

;Dial plan "Outcoling"
[outcoling]
exten => 900,1,Answer()
exten => 900,n,ConfBridge(1,confer)
exten => _XXX,1,Dial(SIP/${EXTEN})
exten => _XXX.,1,Dial(SIP/${EXTEN}@r_213137)
include => handup-sip

;Dial plan "Incoming"
[incoming]
exten => 213137,1,Dial(SIP/125)

Can you tell me what else to correct to fix the problem?
UPD:
When removing the dump at the moment when the voice disappeared, the dump stopped being recorded. The screen showed the following:
[[email protected] ~]tcpdump -s 0 -w voip.cap
tcpdump: listening on ppp0, link-type LINUX_SLL (Linux cooked), capture size 65535 bytes
tcpdump: pcap_loop: The interface down
3742 packets captured
3742 packets received by filter
0 packets dropped by kernel

As I understand it, it just drops ppp0 connection with the provider?
UPD2: Files on Mega
voice1 - using tcpdump
voice2 - sngrep

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
S
silverjoe, 2017-02-21
@silverjoe

See
sngrep call dump for help, or wireshark

W
Wexter, 2017-02-21
@Wexter

maybe the firewall is closing the connection after some time

V
Viktor, 2017-02-22
@awsswa59

Dumps:
Why are you on port 5061?
set the [general] usb port as 0.0.0.0:5060
and if you notice the media comes from a different IP address - forward UDP ports 10000-20000 to asterisk
AND localnet 192.168... it looks strange when the dump is 10.... PS network
in localnet all networks that do not require NAT are written

G
gadzhi15, 2017-02-23
@gadzhi15

Do you have a caching dns server set up?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question