1

I am new to asterisk, so basically i know nothing about IP PBX.

I need to start the a VPN server with behind it asterisk and my clients should be able to connect with softphone with build-in VPN settings.

I've searched around a lot but couldn't find anything reliable.

My client is behind a strict VOIP block by his/her ISP.

So what are my option how can i do it without any loss in call quality.

2 Answers2

2

The big thing about Asterisk is that you can configure almost anything to make it adapt to your needs.

As your Asterisk PBX will be behind a VPN Server, you have to keep in mind the following considerations:

  • When a client registers to the PBX, it uses SIP. By default SIP is being transported over UDP on port 5060. It can be changed to TCP on the file called sip.conf in case your VPN requires it.

  • When a client establishes a call, it opens an RTP connection, you can define the range of ports that Asterisk will use on the file rtp.conf.

  • Passing through the VPN will cause an overhead on every RTP frame, try to use a codec with good compression as g723 or g729 and avoid g711.

  • NAT is a big problem for VoIP connectivity. Check the path from point to point and verify if there is NAT. There is not a single solution to overcome the NAT problems, however Asterisk provides parameters to configure most of the cases. For the most difficult cases you will need to install a STUN server.

  • Other problem for VoIP is jitter. RTP packets that traverse the network have a sequence number and a timestamp. The receiving side checks if the packets are arriving ordered and on time. Big variations of sequence or timestamp means high jitter, and this means clicks, noise, chopped audio or silence. Verify that your VPN has a constant latency (less than 200ms is a good value) and that you can configure some Quality of Service mechanism that prioritize voice packets over other kind of data.

jcbermu
  • 17,278
  • 2
  • 52
  • 60
  • Thanks for your response dude, really appreciate it. but my question how to create a vpn inside or outside asterisk server (config them properly) and use a softphone client that does not require an VPN client software instead it come with in built in, Just tell me how to create the VPN server and how can i access them with zoiper or any available softphone and the protocol i use IAX2 and sip so no nat issues... VPN is only for clients live in VOIP blocked area – Account Unknown Sep 08 '15 at 16:43
  • I see openvpn service not running in status, which tells me VPN is already in asterisk but how to start and configure it properly?... also tell me an app (softphone) which has in built VPN features. please jcbermu i hope you point me in right direction. – Account Unknown Sep 08 '15 at 16:53
  • Check this [tutorial](http://www.pittnerovi.com/jiri/hobby/electronics/voip/) – jcbermu Sep 09 '15 at 08:00
  • Many many thanks for you buddy, when so many guys turned their back you both guys helped me a lot... but i got the router with VPN feature... i will never forget this effort of yours... – Account Unknown Sep 09 '15 at 13:39
2

Simpleast idea - setup openvpn for example with network 10.0.0.0/24 and pool 10.0.0.10-100

After that just reload asterisk and add to sip.conf

localnet=10.0.0.0/255.255.255.0

All clients have connect to 10.0.0.1

Please note, you have start asterisk AFTER openvpn

arheops
  • 1,355
  • 2
  • 11
  • 17
  • thanks you man... it helps too... but i got a router with VPN build in... i cant figure out how to work with openvpn anymore... thanks anyways... – Account Unknown Sep 09 '15 at 13:38
  • simplest way do vpn on same box with asterisk. if you have router, you have consult router fimrware doc for vpn setup and just ensure asterisk have ip from same network with vpn and reachable via vpn connection – arheops Sep 09 '15 at 18:57