[Jun 13 20:59:00] VERBOSE[6484][C-00000081] chan_sip.c: No matching peer for '0760486760' from '91.121.129.23:5060'
indicates bad practice or misconfiguration. You seem to be handling traffic from your ITSP as though it were from an unknown source. You will get a lot of such traffic, trying to make free calls through you.
[Jun 13 20:59:00] VERBOSE[6484][C-00000081] chan_sip.c: No matching peer for '0760486760' from '91.121.129.23:5060'
OVH has not sent any speech. One thing that can cause that is if both sides have the equivalent to Asterisk’s nat=comedia. They are both waiting for the other to send, to see what address to use. I can’t be sure that Asterisk is in this mode without your general section settings (as noted above, you are not matching a peer or user).
[Jun 13 20:59:04] VERBOSE[6484] chan_sip.c: Retransmitting #2 (NAT) to 90.104.106.66:36087:
You seem to have ringall agents,and one of them is down.
[Jun 13 20:59:04] DEBUG[6942][C-00000081] chan_sip.c: Sending reinvite on SIP '19149-DZ-00d2caef-7b36f64d0@siptrunk.ovh.co.uk' - It's audio soon redirected to IP 109.132.209.210:12282
You appear to have directmedia=yes, and no contraindications.
o=root 1434986479 1434986480 IN IP4 109.132.209.210
o=root 1197687716 1197687717 IN IP4 91.121.129.164
Unusually, both agent and ITSP seem to be on public IP addresses.
<--- SIP read from UDP:91.121.129.23:5060 --->
SIP/2.0 200 OK
Call-ID: 19149-DZ-00d2caef-7b36f64d0@siptrunk.ovh.co.uk
The ITSP has accepted the direct media re-invite.
<--- SIP read from UDP:91.121.129.23:5060 --->
SIP/2.0 200 OK
Call-ID: 19149-DZ-00d2caef-7b36f64d0@siptrunk.ovh.co.uk
The ITSP has started its own re-INVITE. I don’t know why.
<--- SIP read from UDP:109.132.209.210:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 137.74.198.197:5060;branch=z9hG4bK111fd3f0;rport=5060
The agent has accepted the direct media re-INVITE.
FROM NOW ON, THIS IS AN ISSUE BETWEEN THE AGENT PHONE AND THE ITSP. Asterisk is out of the media path!
<--- SIP read from UDP:109.132.209.210:5060 --->
INVITE sip:0760486760@137.74.198.197:5060 SIP/2.0
Via: SIP/2.0/UDP 109.132.209.210:5060;branch=z9hG4bK3689006006
From: <sip:112@109.132.209.210:5060>;tag=3837713256
To: "0760486760" <sip:0760486760@137.74.198.197>;tag=as3377adb4
Call-ID: 4a234c9135ba18e27bb795af7b0ca0fb@137.74.198.197:5060
CSeq: 2 INVITE
Contact: <sip:112@109.132.209.210:5060>
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T46G 28.81.0.25
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 312
v=0
o=- 20463 20465 IN IP4 109.132.209.210
s=SDP data
c=IN IP4 109.132.209.210
t=0 0
m=audio 12282 RTP/AVP 9 0 8 18 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendonly
The agent has put the call on hold.
[Jun 13 20:59:10] VERBOSE[6942][C-00000081] chan_sip.c: Reliably Transmitting (no NAT) to 91.121.129.23:5060:
INVITE sip:10.7.1.163:5060 SIP/2.0
Via: SIP/2.0/UDP 137.74.198.197:5060;branch=z9hG4bK7e34c3ef
Route: <sip:91.121.129.23:5060;lr>
Asterisk takes the ITSP out of directmeda.
[Jun 13 20:59:10] DEBUG[6945][C-00000081] res_rtp_asterisk.c: No remote address on RTP instance '0x7fa1d8017018' so dropping frame
[Jun 13 20:59:10] DEBUG[6945][C-00000081] res_rtp_asterisk.c: No remote address on RTP instance '0x7fa1d8017018' so dropping frame
Asterisk discards media because of the hold.
INVITE sip:0760486760@137.74.198.197:5060 SIP/2.0
Via: SIP/2.0/UDP 109.132.209.210:5060;branch=z9hG4bK16597691
From: <sip:112@109.132.209.210:5060>;tag=3837713256
To: "0760486760" <sip:0760486760@137.74.198.197>;tag=as3377adb4
Call-ID: 4a234c9135ba18e27bb795af7b0ca0fb@137.74.198.197:5060
CSeq: 3 INVITE
Contact: <sip:112@109.132.209.210:5060>
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T46G 28.81.0.25
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 312
v=0
o=- 20463 20466 IN IP4 109.132.209.210
s=SDP data
c=IN IP4 109.132.209.210
t=0 0
m=audio 12282 RTP/AVP 9 0 8 18 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
Agent cancels hold.
[Jun 13 20:59:12] VERBOSE[6942][C-00000081] chan_sip.c: Reliably Transmitting (no NAT) to 91.121.129.23:5060:
INVITE sip:10.7.1.163:5060 SIP/2.0
Via: SIP/2.0/UDP 137.74.198.197:5060;branch=z9hG4bK2f1906e5
Asterisk re-instates direct media to the ITSP.
<--- SIP read from UDP:91.121.129.23:5060 --->
BYE sip:0186954041@137.74.198.197:5060 SIP/2.0
Call-ID: 19149-DZ-00d2caef-7b36f64d0@siptrunk.ovh.co.uk
CSeq: 13500054 BYE
ITSP closes the call.
Conclusiion. Whilst there might be a comedia issue, that is not critical, as the symptom appears after Asterisk has taken itself out of the media path. The problem must lie with the phone, or network. As the second attempt at direct media works, I would say the problem has to be with the phone.
Suggested workround. Disable directmedia.