FreePBX in Hyper-V

I see some people here have used FreePBX with Hyper-V. I just tried my first set up and things did not go so well. I’m hoping you might have some advice those of you who have gotten it to work. I am running the latest FreePBX with SIPStation and 2 ATAs.

Problems Encountered:

1.) DMTF tones are lost. We have IVR menus. I called the menu, pressed a menu option, nothing happens. To test it, I connected the ATA to the current physical FreePBX server and DMTF works fine.

2.) Audio comes and goes. Sometimes it works, sometimes it’s one way, sometimes it’s silent. I have tried using the IP of the Hyper-V machine and the IP of the router. The IP Of the Hyper-V machine seems to produce less issues.

3.) When transferring from IVR to Ring Group using a PJSIP trunk, the call hangs up immediately. If I route the call directly to the extension, everything works but not if I route to the ring group.

C-00000010] res_agi.c: <PJSIP/511-00000006>AGI Script dialparties.agi completed, returning 0

[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:10] NoOp(“PJSIP/511-00000006”, “Returned from dialparties with groups to dial”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:11] NoOp(“PJSIP/511-00000006”, "ringall array ") in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:12] Set(“PJSIP/511-00000006”, “__FMGL_DIAL=”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:13] Set(“PJSIP/511-00000006”, “LOOPCNT=1”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:14] Set(“PJSIP/511-00000006”, “ITER=1”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:15] Set(“PJSIP/511-00000006”, “__EXTTOCALL=109”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:16] NoOp(“PJSIP/511-00000006”, “Working with 109”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:17] ExecIf(“PJSIP/511-00000006”, “0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:18] ExecIf(“PJSIP/511-00000006”, “0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:19] Set(“PJSIP/511-00000006”, “ITER=2”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:20] GotoIf(“PJSIP/511-00000006”, “0?ndloopbegin”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:21] Macro(“PJSIP/511-00000006”, “dial-ringall-predial-hook,”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:1] MacroExit(“PJSIP/511-00000006”, “”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:22] Dial(“PJSIP/511-00000006”, “SIP/109,300,HhtrM(auto-blkvm)b(func-apply-sipheaders^s^1),”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] netsock2.c: Using SIP RTP TOS bits 184
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] netsock2.c: Using SIP RTP CoS mark 5
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] app_stack.c: SIP/109-0000000a Internal Gosub(func-apply-sipheaders,s,1) start
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:1] ExecIf(“SIP/109-0000000a”, “1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:2] NoOp(“SIP/109-0000000a”, “Applying SIP Headers to channel”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:3] Set(“SIP/109-0000000a”, “SIPHEADERKEYS=”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:4] While(“SIP/109-0000000a”, “0”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] app_while.c: Jumping to priority 8
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:9] Return(“SIP/109-0000000a”, “”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] app_stack.c: Spawn extension (from-internal, 1, 1) exited non-zero on ‘SIP/109-0000000a’
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] app_stack.c: SIP/109-0000000a Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] app_dial.c: Called SIP/109
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] app_dial.c: SIP/109-0000000a is ringing
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] app_stack.c: SIP/109-0000000a Internal Gosub(crm-hangup,s,1) start
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:1] NoOp(“SIP/109-0000000a”, “Sending Hangup to CRM”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:2] NoOp(“SIP/109-0000000a”, “HANGUP CAUSE: 16”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/109-0000000a”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:4] NoOp(“SIP/109-0000000a”, “MASTER CHANNEL: 1534614810.27 = 1534614788.26”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:5] GotoIf(“SIP/109-0000000a”, “1?return”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx_builtins.c: Goto (crm-hangup,s,8)
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:8] Return(“SIP/109-0000000a”, “”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] app_stack.c: Spawn extension (from-internal, 1, 1) exited non-zero on ‘SIP/109-0000000a’
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] app_stack.c: SIP/109-0000000a Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] app_macro.c: Spawn extension (macro-dial, s, 22) exited non-zero on ‘PJSIP/511-00000006’ in macro ‘dial’
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Spawn extension (ext-group, 1, 17) exited non-zero on ‘PJSIP/511-00000006’
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:1] Macro(“PJSIP/511-00000006”, “hangupcall,”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:1] GotoIf(“PJSIP/511-00000006”, “1?theend”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/511-00000006”, “0?Set(CDR(recordingfile)=)”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:4] NoOp(“PJSIP/511-00000006”, "SIP/109-0000000a monior file= ") in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:5] AGI(“PJSIP/511-00000006”, “attendedtransfer-rec-restart.php,SIP/109-0000000a,”) in new stack
[2018-08-18 13:53:30] VERBOSE[12645][C-00000010] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] res_agi.c: <PJSIP/511-00000006>AGI Script attendedtransfer-rec-restart.php completed, returning 0
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:6] Hangup(“PJSIP/511-00000006”, “”) in new stack
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] app_macro.c: Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/511-00000006’ in macro ‘hangupcall’
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] pbx.c: Spawn extension (ext-group, h, 1) exited non-zero on ‘PJSIP/511-00000006’
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] app_stack.c: PJSIP/511-00000006 Internal Gosub(crm-hangup,s,1) start
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/511-00000006”, “Sending Hangup to CRM”) in new stack
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:2] NoOp(“PJSIP/511-00000006”, “HANGUP CAUSE: 127”) in new stack
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/511-00000006”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:4] NoOp(“PJSIP/511-00000006”, “MASTER CHANNEL: 1534614788.26 = 1534614788.26”) in new stack
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:5] GotoIf(“PJSIP/511-00000006”, “0?return”) in new stack
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:6] Set(“PJSIP/511-00000006”, “__CRM_HANGUP=1”) in new stack
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:7] AGI(“PJSIP/511-00000006”, “sangomacrm.agi”) in new stack
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] res_agi.c: <PJSIP/511-00000006>AGI Script sangomacrm.agi completed, returning 0
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] pbx.c: Executing [[email protected]:8] Return(“PJSIP/511-00000006”, “”) in new stack
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] app_stack.c: Spawn extension (ext-group, h, 1) exited non-zero on ‘PJSIP/511-00000006’
[2018-08-18 13:53:31] VERBOSE[12645][C-00000010] app_stack.c: PJSIP/511-00000006 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

I have the Hyper-V set up as a 1st Generation Hyper-V.

I made a print out of the settings for the ring group

Any help would be much apperciated. I was really hoping to be able to run FreePBX virtually now that we have no need for DAHDI equipment.

Would it be better to switch to VirtualBox?

I don’t have experience with SIPStation, not sure if they use IP auth, but it seems to me like a firewall RTP issue.

It does say under sipstation under the port range “Port Unknown.”

I’m thinking it has something to do with the way the ethernet is configured in the Hyper-V.

Anyone else who has FreePBX running in Hyper-V care to share if they had to do any special network configs?

I did try installing the Linux integration services.

We try to run ALL our systems under Hyper-V and they work perfectly.

Couple of things I noticed:

  1. PJSIP and DTMF - The last time I tried PJSIP I could not get the machine to respond to DTMF - But extensions worked fine - I don’t know if this is still an issue, but it’s something to research.

  2. Audio comes and goes - This is most likely a Firewall Issue - What do you have your box behind?

  3. IVR to Ring Group hangs up - Are you forced to use PJSIP? This seems like another problem in search of a solution.

We have almost 50 Hyper-V PBX’s deployed (the rest are on Metal) and they all work great - I use PJSIP extensions on several of them and that works fine too! I don’t think Hyper-V is your problem.

That sounds like a Trunk issue, your Trunk was ChanSIP or PJSIP? If PJSIP, did you set any DTMF settings?

If you didn’t have this issue when you used ChanSIP, then it’s likely not an firewall issue, rather a codec issue.

Hmm… What did the logs say?

No, there’s no requirement I use PJSIP. I can rebuild the PJSIP trunks with CHANPSIP.

As for the firewall, both the physical server box hosting now and Hyper-V host are behind the same firewall. The Physical Server was in the firewall’s DMZ, I tried putting the Hyper-V host in the DMZ and putting the Virtual Server in the DMZ. I wasn’t sure if I needed to do something in powershell to manage the ports since i know Hyper-V does install an extra layer of networking. I suppose I could also do port forwarding, since only the two trunks need to get outside the firewall.

Hyper-V Networking does not get in the way whatsoever - that is not your problem.

The FreePBX guys have done a good job on the Responsive Firewall, so if you want the box in the wild, that is an option.

I NEVER put a box in the wild - I always have it behind a firewall that I control - always a SonicWALL in my case, but any competent firewall is fine.

Zero-Day exploits can be a bummer - being able to isolate the box is very reassuring.

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