Noise of asterisk

Hi there,
I have weird problem.
I am trying to execute agi script and this is it:

#!/usr/bin/php

<?php $myName = "My name is Amil"; echo $myName; include('/var/lib/asterisk/agi-bin/phpagi-2.20/phpagi.php'); $agi = new AGI(); $agi->answer(); $agi->stream_file('hello-world'); $agi->stream_file('tt-monkeys'); $agi->stream_file('im-sorry'); $agi->hangup(); ?>

using phpagi

When I call phpscript in cli output is okay;
Executing [1234@softphone:1] AGI(“PJSIP/8002-00000009”, “proba1.php”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/proba1.php
– <PJSIP/8002-00000009> Playing ‘hello-world.slin’ (escape_digits=) (sample_offset 0) (language ‘en’)
– <PJSIP/8002-00000009> Playing ‘tt-monkeys.slin’ (escape_digits=) (sample_offset 0) (language ‘en’)
– <PJSIP/8002-00000009> Playing ‘im-sorry.slin’ (escape_digits=) (sample_offset 0) (language ‘en’)
– <PJSIP/8002-00000009>AGI Script proba1.php completed, returning 4
== Spawn extension (softphone, 1234, 1) exited non-zero on ‘PJSIP/8002-00000009’

The problem is I do not hear sounds that are playing. But when I call another extension where sound is specified in dialplan, then it works.

At a guess, because “My name is Amil” gets prefixed to the answer, causing it not to be recognized and the audio to be sent as early media, when you hadn’t issued Progress(), to set up for early media. Enabling AGI debugging may make this more obvious.

Thanks, it solves the problem.

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