Group Ext is Busy

I have setup a group extension to do pages as intercom and it was working great

I then went through and set up call file to plays music at certain times during the day, not sure if relevant but pretty much the only advanced setting i have going on right now. System is only used as an intercom/paging system, not utilizing the phone aspect yet. Below is link for info on what i did:

I think something buggy happened one day, when during the .call file playback was made, it started to play some weird tones and music at the beginning rather than what I wanted and now every time I try and dial that extension it gives me the busy signal tone as if it never hung up.

The extension is a paging intercom extension setup to call out to 8 SIP speakers. I can call all speakers directly without any busy signal, so the speakers themselves are not hung up in some weird state.

I also changed the group extension to 9003 and now I am back to working. I added a second extension for the music playback at 9002 to separate them.

I tried calling ext 1000 and it says this caller cannot be reached because it no longer exists. So i make another group to test ext 1000 and recreated it, and it is still busy.

If the ā€˜speakersā€™ speak multicast, then perhaps easier to use cron and ffmpeg, (no pbx needed) cos you have them both already

Another approach would be to make sure the callfile is using the ā€œLocalā€ device type for your connections (instead of SIP).

The speakers can indeed speak multicast

When i try to use the ffmpeg command there are a lot of options to digest and most tutorials i am seeing is for conversions and video/audio streaming to https://

I did see the UDP multicast function, however i cannot get the speaker to actually play the music. just curious if I am missing a critical option. I am assuming if I do not put any option I should get something out of the speaker. Also i have to add the quotes but all the example do not use the quotes. If i do not use the quotes it gives me errors. If I use quotes, the speaker at least beeps as if it is receiving a call.

i use the command

ffmpeg -re -i ā€œISPFM.mp3ā€ -f mpegts ā€œudp://224.0.33.0:10000ā€

I do not know if mpegts is right format as i could not find a list of formats

But after i start the stream, the speaker beeps as if being connected to, and the stream on the command line shows the file is playing, but i get no sound out of the speaker.

Does this sound like an ffmpeg issue or my speaker is hanging up after receiving multicast issue?

It does indeed require the speaker to be able to decode the format of the stream.

man ffmpeg
ffmpeg -formats 
ffmpeg -codecs

that should hopefully be in the speakerā€™s documentation.

-acodec pcm_s16le

is often a good guess, you can avoid a lot of converting input to output specifics with

-filter_complex

and for format

-f rtp

This ffmpeg is some very in depth processing application.

Sorry for all my questions this is not at all my profession if you cannot tell.

So it looks like the speaker speaks in g711u, g711a, and g722 codec. I had to do a lot of things to get there.

  1. convert my stereo mp3 to mono mp3, ffmpeg -i x.mp3 -ar 1 x_out.mp3
  2. convert the mono mp3 to a g722 file, ffmpeg -i out.mp3 -ar 16000 -acodec g722 audio.g722
  3. output the file to speaker, _ ffmpeg -re -i ā€œaudio.g722ā€ -acodec adpcm_g722 -f rtp ā€œudp://224.0.33.0ā€_

Every time the speaker is called as a page, it makes a clearing throat soul crushing successfully failing noise.

When i do step 3 above to play music it just beeps like it is picking up and play a tone hangs up and beeps plays a tone and hangs up and repeats. the beep, tone, hangup, beep cycle takes like a second and seems pretty cyclical and in step.

It doesnt seem like it is playing a constant multicast cast but is doing multicasting pulse that the speaker is reacting to at every pulse rather than a continuous signal being transfered

i couldnā€™t figure out the use of filter_complex call as it seems to be a merger of 2 things so i did not understand how to filter complex a single object

both the phone and the streamer need to agree on a) the multicast address b) the multicast port and c) that the speaker can ā€˜readā€™ what is beng written. Stick with g711 itā€™s simpler

try

ffmpeg -re -i stereo.mp3 -acodec pcm_mulaw -b:a 64 -ac 1 -ar 8000 -f rtp rtp://224.0.33:12345



(they are not aware of each other, the streamer sends it the receiver listens)
1 Like

So that line does indeed make it play but it sounds like garbage. I tried to find some ways to modify by adding -af but i am not getting anything better.

I tried to use your same commands to try the g722 because it seems that is a general consensus of sounding better on the internet. But it sounded much worse.

I know the file is good as it is the same file i play on music on hold and use for for page group

Or how can I modify the quality of output. Is the only way to mess with different -af filtering

Donā€™t know how to help further all streams sounds fine on all my phones (and vlc).

To critique

your are playing with -af yet rejected -filter_complex, I explicitly describe a g711 channel with

-acodec pcm_mulaw (if you are outside NANPA land then pcm_alaw)
-ac 1 (1 audio channel, down-mixes stereo to mono)
-ar 8000 (sample rate 8000/sec )
-b:1 64 (assume a 64kbs bandwidth)

This well describes a raw g711 stream , then you need to play with your ā€˜speakerā€™ setup or perhaps your network is congested

Until you can stop making g711 sound like garbage, you are wasting your time with g722

i appreciate the help. I didnā€™t reject the -filter_complex, I just couldnā€™t get it to playback with it in there. Could have been where i put it in the string in proper location or i couldnā€™t figure out the input to it correctly

I didnā€™t think to test on phone instead of speaker to see if it was a speaker issue.

Could it be an issue with the fact it appears to be doing a conversion while doing a playback?

I tried to convert the mp3 as a system recording through the web application for freepbx to a .wav and .ulaw. but it was saying format not playable when i tried to play a .ulaw file.

Is .ulaw same as g711? and should i be able to simply play using the following and be received?

ffmpeg -re -i song.ulaw -f rtp rtp://223.0.33.0:12345

or do I need to add in the -acodec pcm_mulaw -ac 1 -ar 8000 -b:a 64 even though .ulaw is a g711 format(this statement of course assuming .ulaw = g711 from above)?

I just wanted to say thanks again. I relooked at that filter complex and found an example that uses the same script pretty much as you used but uses the filter complex function instead of forcing it some other way. Not sure why the filter complex works and yours didnt. seems to force the same thing. i guess that is the magic of filter complex you spoke of.

ffmpeg -re -i ./test.mp3 -filter_complex ā€˜aresample=8000,asetnsamples=n=160ā€™ -acodec pcm_mulaw -ac 1 -vn -f rtp rdp://234.0.34.0:10000

1 Like

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