Can Asterisk stream sound from Virtual Box Guest to Host

II have a Windows 10 Host with Virtual Box 6.0 and Ubuntu 18. I can play youtube video on Ubuntu and hear the sound in the speakers attached to the Windows host, but not when running Asterisk application using ALSA driver. Asterisk is streaming an audio file to the driver. The audio file is simple “Hello World”.

Is it possible that Asterisk expects the sound card / hardware on the guest?

Thank you for your help.

Asterisk has no knowledge of the host, so any hardware must be virtualised into the VM on which it is running.

The fact that other audio (youtube in my example) is being successfully processed and Asterisk’s Playback(hello-world) is not being heard concerns me. Also if I don’t load OSS library, the “console dial” , etc. don’t work in the CLI. I have even tried toggling noload/load for OSS and ALSA in modules.conf without luck.

Either I’ve not understood the original question or you haven’t understood my answer.

Hi David: Please ignore my references to OSS. With regard to virtualization, Virtual Box – which runs on the host and has containers to run the guest-- is supposed to take care of that. If you could please clarify what you mean by virtualization, I would be grateful.

I meant that the host makes a piece of hardware appear to be part of the virtual machine.

This is the trace from asterisk -vvvvvr

– Executing [bobby@public:1] NoOp(“SIP/”, “First Line”) in new stack
– Executing [bobby@public:2] NoOp(“SIP/”, “Second Line”) in new stack
– Executing [bobby@public:3] Playback(“SIP/”, “hello-world”) in new stack
– <SIP/> Playing ‘hello-world.gsm’ (language ‘en’)
– Executing [bobby@public:4] Dial(“SIP/”, “SIP/miki”) in new stack

There are no errors. Still the sound could not be heard on the speakers attached to the host. Just for illustration, I had played a youtube video on the guest which could be heard from the host. That rules out any possibility that virtualization was not done properly.

You are playing back over a SIP session, so it is what is on the other side of that session that accesses the hardware; the sound hardware, and virtualisation are irrelevant to Asterisk.

VM virtualisation doesn’t distinguish between SIP and RTP.

Can you explain what it is you are expecting asterisk to do?

Are you expecting the Playback application to play audio locally on your PBX?

You are calling Asterisk from a SIP endpoint, Is that SIP endpoint a client such as linphone or zoiper running on the same virtual machine as asterisk and you are expecting to hear audio playback from it?

Hi John: I am using ExpressTalk to make a sip call to the asterisk server. I think what you and David are telling me, in sum, is the communication happens between server and ExpressTalk/sip-client and it is up to the client to output it to the speakers. If I am right, I am hard pressed as there don’t seem to be that many sip phones out there. I downloaded Zoipher but it has no feature like ExpressTalk to make a SIP call. If you can suggest some , kindly do so. Thank you.

ps: my terminology may not be appropriate given that I am new to asterisk.

There are many physical SIP phones from vendors such as Poly, Cisco, Mitel, Yealink, Grandstream, and Sangoma.

There are a number of SIP softphones that I know of including Linphone, Zoiper, Blink, Microsip, and Bria.

I’m not familiar with ExpressTalk but if it supports SIP then you should be able to use it just fine.

What is your end goal with Asterisk?

Hi John, my goal is to propose asterisk-based IVR for my employer. All we need is basic ivr with some web services. I have done an IVR project several moons ago, but nothing like this ever bit me.

I was able to make zoiper make a sip call, verify that the call is received but the hello-world is still not played. This is at best very basic asterisk feature–play a file/greeting. I am sure recognizing the digits entered will come later and they will work, if I can figure this out. I have tried both ExpressTalk and Zoiper with the same end result. So that rules out problem with sip-client, or does it? Thank you for staying on with me.

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