OpenVPN with two extensions

FreePBX Distro 15
Asterisk 16.2
Sangoma P315 phone
PJ-SIP extensions

I’ve got 2 extensions 101, 102
I’d like to put them on a P315 phone as Account1 and Account 2 respectively and connect the phone over the OpenVPN server.


Do I need to setup open VPN for BOTH extensions or just one of them? If for both wouldn’t that mean the phone would create two tunnels which seems redundant to me and not proper.

If for only one, anything special I need to do to configure it so that both extensions use the same vpn?

I’m not sure I ever tested this, but from my understanding of how multiple registrations work on a single device with EPM I would expect the following to work:

  • Set up two entries in EPM, one for account 1 one for account 2
  • Use the account 1 entry for all the primary config, VPN setup, Button config, network, etc.
  • use account 2 only for the sip registration

Get it up and running first without the second account.

lol, me either. Started off to set it up and then said “hold on… how’s this going to work???”

I’ll report back my findings.

1 Like

Ok, so it works.

  1. set up endpoints for both extensions (account 1 and account 2) to the same mac address in EPM
  2. Let phone connect and grab config
  3. test line 1 and line 2 for inbound/outbound calling on (correct caller id, call routing etc…)
  4. setup vpn on account 1 extension
  5. Reconfigure phone Account 1 setting svia EPM > Extension Mapping to use VPN
  6. Rebuild configuration, save and update endpoint

Phone reboots, connects over VPN test and it all works fine.

only issue, and this is I think just a limitation of the P315 is that on the display only Account 1 shows up… The BLF for the L1 and L2 buttons does work correctly though

Check Reports -> Asterisk Info and see what the IP of the registered extension is. Make sure the account 2 registration is a VPN IP.

First thing I did and sure enough it had the same VPN IP as the main account.

1 Like

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