0

I using asterisk with php scripts that use php-agi. What I need to do is to play the caller a radio stream, the stream is coming from dynamic url (It can be changed by the owner of the line). I try MOH (not so good). I try to use MP3Player $agi-exec("MP3Player", $streamUrl); but I get this error "sh: 1: MP3Player: not found"

I use asterisk 1.6

Did any one have a solution for this problem?

1 Answers1

0

AGI exec command will run MP3Plyaer asterisk COMMAND, which never was created. You should use EAGI script or use moh class with stream.

https://www.voip-info.org/asterisk-eagi/

https://www.voip-info.org/asterisk-config-musiconholdconf/#StreamradiousingMPlayerforMOH

arheops
  • 15,544
  • 1
  • 21
  • 27
  • Thanks for the comment. About MOH, I try it and get this error in the log file: "2020-06-14T06:54:41.899334978Z [Jun 14 06:54:41] WARNING[58]: res_musiconhold.c:794 monmp3thread: poll() failed: Interrupted system call 2020-06-14T06:54:41.935436937Z MOH: exec failed: Permission denied". Regarding asterisk EAGI, can you please elaborate, please, I never use it. Thanks you very much. – Eyal Mahalal Jun 14 '20 at 07:05
  • "Permission denied" – arheops Jun 14 '20 at 07:40
  • Thanks, I think I fix the permission, but I don't hear anything. How can I check that the "moh.sh" file is running, because I don't hear anything. And about the EAGI, do you have any examples? – Eyal Mahalal Jun 14 '20 at 08:04
  • debug is offtopic on SO. examples available on first link – arheops Jun 14 '20 at 12:45