Anveo-direct setup and no-audio received by caller

Hi, I am trying to troubleshoot an Anveo-direct Asterisk setup.

My calls do connect, and are answered by Asterisk. But when playing back an audio file in my dialplan, no sound is sent to the caller. I have tested the same dialplan with my SIP URI, and it works fine.

Based on the following two error messages, my feeling is it is a firewall or signalling issue:

DEBUG[23924][C-00000001]: chan_sip.c:5847 do_setnat: Setting NAT on RTP to Off
DEBUG[23924][C-00000001]: chan_sip.c:10376 process_sdp: Processing session-level SDP v=0... UNSUPPORTED OR FAILED.
WARNING[19816]: chan_sip.c:4119 retrans_pkt: Retransmission timeout reached on transmission Q17T3O550D4AD0NOMMBKPN8M3G@81.201.85.47-b2b_1 for seqno 200 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response

But I have opened the requisite ports, as seen here on my router:

To better illustrate my issue, I am attaching here my debug log in Asterisk, my SIP trace in Anveo, my extensions.conf, and my pjsip.conf:

asterisk_debug.txt (24.6 KB)
anveo_sip_trace.log.txt (4.9 KB)
extensions.conf.txt (304 Bytes)
pjsip.conf.txt (793 Bytes)

Based on this debug info, or other individual’s previous experience with Anveo-direct, could anyone please provide me with suggestions on moving forward? Many thanks !

If you put that file in pjsip.conf, it definitely won’t work, as it is a chan_sip configuration (and using deprecated settings).

It won’t work for chan_sip, either, as you are clearly behind NAT, but haven’t configured your public address, so Asterisk is specifying private addresses, that are unreachable to Anveo’s system.

chan_sip is due to be removed in a couple of years, and is, effectively, unmaintained.

Also, either Anveo’s log is not in strict time order, or they have a protocol violation, as they seem to be sending ACK before they receive the final 200 OK, which is not allowed.

Hi David, thank you for checking into it, and discovering my pjsip configuration error.

By chance does anyone know where I could find a working Asterisk PJSIP configuration for Anveo-direct? I’ve looked deeply, with no success. The only sample configuration I’m aware of is at the Anveo FAQ, which apparently is for chan_sip. [ at the very bottom of: http://anveodirect.com/about/faq ]

Or is there a useful tutorial somewhere that explains how to translate a chan_sip config into chan_pjsip config?

Thank you again.

https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip

However, I don’t know how well it handles deprecated setting names, and you still need to provide your public address.

Really, it is best if you try to understand what the configuration actually means. Ones from ITSPs are almost always based on very old versions of Asterisk, and tend to sacrifice security for an appearing to work first time.

Which setting names I am using that are deprecated?

Where do I need to provide my public address exactly?

Sorry if my questions seem simplistic, I am new to Asterisk. I am also considering trashing Anveo-direct and going with a different provider that allows SIP registration. Anveo is offering basically no documentation or assistance.

canreinvite should be directmedia

Also note that insecure=invite makes no sense if you have no secret, and insecure=port is rarely needed.

type=friend is a security risk here, and should be type=peer.

For the public address question, in terms of the pjsip configuration: Configuring res_pjsip to work through NAT - Asterisk Project - Asterisk Project Wiki

You also need to noload chan_sip, so it doesn’t fight for port 5060.

Thank you, David. I think it will be wise for me to first get this working in chan_sip, because I have at least some example configuration. After, I can translate the config into pjsip.

So I made the suggestions you proposed, and attempted to provide my public address in ‘[general]’. I tried two different primary configurations of that (and many combinations of the two). Here are the sip.conf files for two attempts. Am I providing my public ip address in the correct way?

First attempt, with asterisk debug result:
sip.conf_first_attempt.txt (816 Bytes)
asterisk_debug_first_attempt.txt (25.4 KB)

Second attempt, with asterisk debug result:
sip.conf_second_attempt.txt (763 Bytes)
asterisk_debug_second_attempt.txt (24.8 KB)

It’s externaddr, not externip:

Anveo aren’t using ICE, so there seems no advantage in enabling it.

yes as a parameter to nat is also deprecated, but you shouldn’t need it, as providing the external address should trigger a mode in which the same effect is achieved automatically, with the default nat setting. The substitute for yes is force_rport, comedia, but Anveo are already setting rport, so forcing it achieves nothing. It’s unlikely you need comedia either. You’d only need it if your route changed Anveo’s media address. (They would have needed it at their end##, to work round your original configuration, but correctly configuring the external address means they can get away without implementing it.)

Also, for the logs, you need to enable the full log, and use that, rather than the debug log, and you also need to use “sip set debug on”. You should also look at the logs from when the configuration is read, as they should have shown that externip was wrong.

## The call would still have dropped after about 30 seconds, though, because of the critical response error.

Hi David, thank you again for taking your time to explain to explain all of this to me in such detail!

So finally, I’ve been able to get audio working with Anveo-direct. One of my primary errors was in using ‘externaddr’ rather than ‘externhost’ for my server hostname. I am attaching my working sip.conf and extensions.conf, for the next person with similar issues who discovers this thread:

sip.conf.txt (810 Bytes)
extensions.conf.txt (225 Bytes)

Now I still have two things to figure out, and I may return to this thread to discuss it with you. The first is that my ‘h’ hangup extension in my LUA dialplan is not being triggered on hangup via Anveo-direct (but it does via a different provider). I’m not sure why that would be the case, but I will be investigating it further.

The second issue is just converting sip.conf to pjsip.conf, which should be no big deal but I will wait until I solve my first issue. I may still switch off from Anveo-Direct — my primary reason to try them was to see if I could get a higher quality audio transmission during call (especially via Opus), because they don’t do audio proxying. The signal sounds a tiny bit clearer than my previous provider, but, it is certainly not connecting via Opus codec. Though that is not surprising, and maybe it will connect via Opus on an iPhone with specific carriers.

Anyway thank you again sincerely for your time & assistance.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.