When deploying a VoIP network, we often have one-way or no-way audio problems. It is caused by private network, for example, some SIP phones or miniSIPServer are behind routers and other SIP devices are in another different network which could be a private network or public network.
To resolve such problem, we often suggest to configure “forwarding ports” in routers manually. If you are familiar with routers, it is easy to do that.
But someone might not know how to do that, or someone might make mistake in router’s configuration. So we add a new feature in miniSIPServer to help that.
It is UPnP (Universal Plug and Play). UPnP can help miniSIPServer to map necessary ports automatically.
Firstly, you need confirm that your router can support UPnP and it has been enabled.
Then, you can click menu “Data – System” in miniSIPServer and enable the item “Enable UPnP to ask router to map ports”. Please refer to following figure.
By default, miniSIPServer will map SIP (over UDP) port and audio ports for relaying audio streams.
In another way, there is a limitation in routers. Most routers limit the number of UPnP ports, for example less than 30 ports. So if you are deploying a miniSIPServer for 50 clients or more, you will still have to configure “forwarding ports” manually.
In normal, cloud miniSIPServer almost has the same services with local miniSIPServer. But for some limitations, there are some different features between them. For example, voice mail service is different.
With local miniSIPServer, each local user or extension can prompt their own audio in voice mail procedure. But with cloud miniSIPServer, each local user can only prompt the unified audio associated with their virtual PBX server. Of course, the default unified audio can be replaced with customer’s own audio file.
Now cloud miniSIPServer is upgraded. In a virtual server, each local user can has its own audio file now. Please refer to following figure. You can see a new item “Personalized voice ID” which can be different for different user.
Of course, the audio file cannot be uploaded to virtual server by customers themselves. If you want to upload audio files, please send them to our support team, we will upload them to your virtual server manually.
Once the audio files are uploaded, you can manage them by yourself. Please refer to following figure.
In another way, you need follow some rules to create your own audio files, such as the file format and the audio codec, and so on. Please refer to online document for more details.
In some VoIP scenarios, we need configure “SIP trunk” to work with VoIP providers or gateways. When processing media streams, we hope (1) local users/phones should process their streams by themselves without MSS, and (2) MSS should help to relay media stream for all outgoing calls to peer SIP servers or gateways.
To fit these requirements, we update MSS V32 to be able to configure “relay media” item in “SIP trunk”. Please refer to following figure for more details.
By the way, MSS can only relay audio streams at this time, so video streams will be lost if you want to MSS to relay streams.
miniSIPServer can support customers’ own audio files to replace default files. With previous MSS, customers have to backup and restore these files once they want to upgrade MSS.
This is a little trouble. With the new V32, we can resolve it now.
When MSS starts up, it will create a sub directory ‘cust_ann’ in ‘mss_ann’ directory, now all your own audio files can be stored in this directory. When MSS is uninstalled or upgraded, this directory and its files will not be deleted or replaced by default files, and MSS can get audio files from this directory directly when it starts up.
In windows system, it could be “d:/myvoipapp/minisipserver/mss_ann/cust_ann” directory by default. In Linux system, it could be “/opt/sipserver/mss_ann/cust_ann/”.
Please refer to our online document for more details about how to record own audio files.
csipsimple is a very good sip client software in Android, we often suggest our customers to use it if they want to deploy voip network with Android phones.
As we know, there are always one-way or no-way audio problem. To solve this problem, STUN should be configured in softphone. But some customers often response it is hard to set STUN in csipsimple.
In fact, it is easy to do that. Please follow below steps which are described in csipsimple website too:
(1) Go on setting Settings > Network – Tick “Use Stun” and fill a stun server on the field bellow. If you are cloud-mss subscriber, you can use your virtual server address as your STUN server too. Of course, you can use csipsimple default STUN server.
(2) You can also try to use ICE in addition to STUN if STUN alone doesn’t solve the problem : Settings > Network – Tick “Use ICE”.
In previous blog, we have discussed why there is one-way audio problem. In this blog, we will continue our discussion to find how to resolve this problem.
As we can see, the SIP phone (100) sends its private address to SIP client (101) and this makes the one-way problem, so we can think why not send its public address which is 8.8.8.8 to the SIP client? If it can do that, SIP client can send its audio stream to this public address and the router will transfer it to the SIP phone, then SIP phone can hear SIP client, right?
Right! It is a perfect solution. But we need ask: how can the SIP phone (100) know its public address?
The answer is STUN. STUN means “Simple Traversal of User Datagram Protocol (UDP) through Network Address Translators (NATs)”. It is a very long definition. Simplely, STUN is a tool to discover public address for devices deployed in a private network.
Please refer to following figure:
Before SIP phone makes a call, it asks STUN server firstly to get its public address. After that, in our previous scenario, when SIP phone begins to make a call, it can say: Hi, I am 100, my audio address is 8.8.8.8:10000. Please send audio stream to me.
By the way, here one public address means one public IP address plus one port. For example, in “8.8.8.8:10000”, “8.8.8.8” is public IP address, and “10000” is port. “8.8.8.8:10001” is another public address.
Since 8.8.8.8 is a public address, it is no problem for SIP client to send its audio stream to this address. Then, both call sides can hear each other now.
Almost all SIP devices, no matter SIP phones or SIP clients, can support STUN. The only thing we need know is we need indicate which STUN server we should use. In our step by step document, we give a simple example for X-lite, please refer to following document for details:
Can STUN resolve all one-way / no-way audio problem?
No, it can work well in most scenarios, but it cannot resolve all problems. It depends on the private network type. Simplely, it depends on the routers ( of course, in some network, it can be firewall probably too).
Please look at above figure. There are two sessions: one for request public address from STUN server. Another is call session between SIP phone and SIP client.
As we know, the router will keep the mapping relationship between public network address and private network address. By default, most routers will assign and keep the same mapping for different sessions if they are from the same device in the private network. So the SIP phone will have the same public address in these two sessions.
But some routers or networks will assign different mapping for different sessions, that means the sip phone will have different public address for these two sessions, so it still cannot know its public address of the session between it and SIP client.
If STUN cannot resolve your one-way audio problem, the root reason could be the router or your network type, and the final perfect solution is establish a VPN network to include all your SIP phones and SIP clients. That’s another topic.
Almost all of us will meet this problem when we deploy our first VoIP network. We are often confused: why I cannot hear peer guy but he can hear me? why we cannot hear each other?
The root reason is that there is private network and public network. If both sides are in different network, the problem will happen. Please look at below figure which desribe a very simple VoIP network:
In this simple network, we have two VoIP devices, one is SIP phone whose number is 100, another is SIP client whose number is 101.
SIP phone is in a private network and its private address is 192.168.1.100, and its router is connected to public network with address 8.8.8.8.
SIP client is installed in one PC which is in the public network with address 8.8.4.4.
So when SIP phone makes a call to the SIP client, what will happen?
SIP phone say: Hi, I am 100, my audio address is 192.168.1.100. Please send audio stream to me.
SIP client answers it: ok. I am 101, my audio address is 8.8.4.4. Please send your audio to me.
SIP phone sends audio stream to SIP client. Since “8.8.4.4 ” is a public address, it is no problem for SIP client to receive the audio stream from SIP phone. That means SIP client can hear SIP phone now.
SIP client sends its audio stream to SIP phone “192.168.1.100”. You can see it is a private address and cannot be reached by SIP client which is in public address. SIP client will fail to send its audio stream to SIP phone in fact.
So finally, SIP client can hear SIP phone, but SIP phone cannot hear SIP client. This is a very typical one-way audio problem.