“FreePBX 12以上的SIP语音问题”的版本间的差异

来自最权威最新完整开源SIP,语音通信,融合通信中文技术文档资料,提供详细的Asterisk Freepbx, FreeSBC, 免费会话边界控制器,网关,语音板卡,IPPBX,SBC配置资料-asterisk,freepbx,freesbc 用户手册 界面配置,呼叫路由,IVR, 网关对接,拨号规则,SIP 分机呼叫,pjsip, IVR, 录音, CDR, 队列呼叫,振铃组,CLI 命令中文资料手册
跳转至: 导航搜索
(创建页面,内容为“'''FreePBX 12 以上版本NAT 用户配置指南''' '''NAT issues''' VoIP 最大的问题就是通常人们说的单通问题,或者几秒钟以后就掉线的...”)
 
第1行: 第1行:
'''FreePBX 12 以上版本NAT 用户配置指南'''
+
'''关于SIP语音问题相关介绍'''
  
 
'''NAT issues'''
 
'''NAT issues'''
第95行: 第95行:
 
Sometimes people create system audio files using an external sound file editor, such as [http://audacity.sourceforge.net/ Audacity], in order to get better sound quality. What they don't realize is that Asterisk is very picky about the format of audio files it will play back. For example, if the file is .wav file format, Asterisk wants a file recorded at 8000 Hz, 16 bit, monaural (a.k.a. single channel) format, and if you directly upload a file in any other format, the CLI may show that the file is being played, but callers hear nothing. If normal system files play correctly but the files you've created do not, check the format, especially if you've directly copied it to a particular location on the system instead of importing it with the System Recordings module.
 
Sometimes people create system audio files using an external sound file editor, such as [http://audacity.sourceforge.net/ Audacity], in order to get better sound quality. What they don't realize is that Asterisk is very picky about the format of audio files it will play back. For example, if the file is .wav file format, Asterisk wants a file recorded at 8000 Hz, 16 bit, monaural (a.k.a. single channel) format, and if you directly upload a file in any other format, the CLI may show that the file is being played, but callers hear nothing. If normal system files play correctly but the files you've created do not, check the format, especially if you've directly copied it to a particular location on the system instead of importing it with the System Recordings module.
  
'''''''''Hardware issues'''
+
'''Hardware issues'''
  
 
Yes, even a hardware problem can cause audio failures. In one case, a T1 card had been installed in the system but not configured, and that stopped all recorded audio from being played. So if all else fails, look for any unconfigured or misconfigured hardware device, particularly if it's a DAHDI card (it appears that having ANY non-configured DAHDI card in a system may cause problems with audio output).
 
Yes, even a hardware problem can cause audio failures. In one case, a T1 card had been installed in the system but not configured, and that stopped all recorded audio from being played. So if all else fails, look for any unconfigured or misconfigured hardware device, particularly if it's a DAHDI card (it appears that having ANY non-configured DAHDI card in a system may cause problems with audio output).

2015年11月3日 (二) 14:49的版本

关于SIP语音问题相关介绍

NAT issues

VoIP 最大的问题就是通常人们说的单通问题,或者几秒钟以后就掉线的问题。这些问题通常就是NAT配置不当导致。

Make sure you have a resolvable address on the Internet.

如果用户没有购买静态IP地址的话,,用户可能经常会修改IP地址。建议设置一个动态的DNS服务。

Adding NAT information in  FreePBX 

在高级配置菜单,点击 Asterisk SIP settings

SipRightMenu.png

然后点击SIP 配置

右边菜单支持的是 FreePBX 12。 FreePBX 11 以下版本是主界面配置

 

Set NAT as yes

Static IP from your ISP 

选择"Static IP" ,输入外部IP地址

settings_nat_static.png

Dynamic IP Updated through dynamic IP service

选择 "Dynamic IP" ,输入主机名称全称,例如"foo.dyndns.net"

settings_nat_dynamic.png

完成配置以后,要点击 "submit" 和点击"APPLY" 按钮。

Local Networks

在 "NAT"下,用户会看到一个勾选值 "Local Networks"。

这里输入内网IP地址和子网地址。

如果用户内网地址是192.168.0.254,那么需要设置为192.168.0.0 / 255.255.255.0

settings_nat_localnet.png

点击提交,然后点击APPLY Config


RTP Port Range

Open the SIP and RTP ports to your Asterisk server

用户必须确认开启了正确的端口,检查防火墙UDP端口设置,设置转发端口到用户的Asterisk端口。 对于SIP协议,用户需要开启UDP(不是TCP) 端口5060 (SIP) ,并且开启端口 10000-20000 来传输语音(RTP 在系统文件/etc/asterisk/rtp.conf中定义)。 所有这些端口都是UDP端口,开启TCP不会对NAT有任何帮助。 配置防火墙时,用户可能还要打开 UDP port 4569 (IAX),用户有时可以通过IAX连接到asterisk服务器。

用户可以看到实际开启的端口

RTPSettings.png


如果实例的端口和本地应用有什么不同,用户需要检查自己的防火墙和相应的实际端口配置。

用户可能需要开启端口从10001开始,10000端口可能和Webmin端口冲突。如果没有安装Webmin则无需担心冲突。

CODEC issues

Whenever a call is placed, both ends of the call must agree on the codecs they want to use. If one end speaks only ulaw and the other end refuses to communicate using anything other than gsm, no communication is going to take place. This is why I would recommend that beginners always allow ulaw (also known as g.711u) and alaw (also known as g.711a) unless specifically instructed not to by whomever you are connecting to. There are actually five different places that codecs can be specified:

  1. At an endpoint/device (phone or ATA), typically in the device's configuration.
  2. In a FreePBX EXTENSION configuration; however, it's best to leave those settings blank in most cases.
  3. In a FreePBX TRUNK configuration using allow= statements coupled with disallow=all. If these are omitted, then the defaults in sip.conf and iax.conf are used.
  4. In Settings > Asterisk SIP Settings > "General SIP Settings"
  5. In Settings > Asterisk IAX Settings

SipCodecs.png

Asterisk will attempt to translate formats if the codecs are available on the system and allowed for that leg of the call. So if you have a trunk that only allows gsm but your extensions will only communicate in ulaw, that's not a problem as long as you have allowed gsm in the trunk configuration. To see the available codecs and translations, type core show translation (or just show translation in Asterisk 1.2 and earlier) from the Command Line Interface. If there is a number showing between two codecs in the grid, then translations are possible. If it's a single line (and it's not to the same codec), then translations are not possible, usually because one of the codecs isn't installed on the system.

Missing files/incorrect paths

If calling into an IVR or voicemail box, and the expected recording isn't played, it's possible that it's missing or not in the expected location. Did you use the System Recordings module to import the recording? If not, are you sure it's in the correct location?

Permissions/ownership issues

This most commonly occurs when people copy audio files directly onto the system and forget that it's a Linux box and that Linux is finicky about file permissions and ownership. If permissions or ownership aren't correct, Asterisk will be unable to access the file, and therefore can't play it. One thing you can try to resolve this is to run the following from the Linux command prompt:

amportal chown

This is supposed to set appropriate permissions on files used by Asterisk.

Incorrect audio format

Sometimes people create system audio files using an external sound file editor, such as Audacity, in order to get better sound quality. What they don't realize is that Asterisk is very picky about the format of audio files it will play back. For example, if the file is .wav file format, Asterisk wants a file recorded at 8000 Hz, 16 bit, monaural (a.k.a. single channel) format, and if you directly upload a file in any other format, the CLI may show that the file is being played, but callers hear nothing. If normal system files play correctly but the files you've created do not, check the format, especially if you've directly copied it to a particular location on the system instead of importing it with the System Recordings module.

Hardware issues

Yes, even a hardware problem can cause audio failures. In one case, a T1 card had been installed in the system but not configured, and that stopped all recorded audio from being played. So if all else fails, look for any unconfigured or misconfigured hardware device, particularly if it's a DAHDI card (it appears that having ANY non-configured DAHDI card in a system may cause problems with audio output).

Related articles

Error rendering macro 'contentbylabel' : com.atlassian.confluence.macro.params.ParameterException: 'TROUB' is not an existing space's key