* You are viewing Posts Tagged ‘hangup’

Playback with noanswer in AGI

Hi All,

I want to play a file in agi but dont want to answer the call

I am dialing through sip phone and running asterisk 1.8.6,

I tried following with no luck

$agi->exec(“Progress”);
$agi->exec(“Playback $filetoplay,noanswer”);
$agi->hangup();

When I dial I can’t hear the audio but if I answer the call or remove
noanswer argument I can hear the audio.

phpAGI’s stream_file didn’t help either.

I ended up with ResetCDR() before hangup to reset billsec, duration and
disposition but don’t want to do it this way.

What could be the problem?

From Voip-info.org :
*noanswer*: Play the sound file, but don’t answer the channel first (if
hasn’t been answered already). Not all channels support playing messages
while still on hook.

Is it because the channel is not supported?

Regards,
Zohair Raza

amd detect answering machine

Hi,

do noop(${AMDCAUSE}) after exten => 1,1,AMD() , run some test calls and
find out why the call was detected as Answering Machine and adjust amd.conf
accordingly. if I recall correctly, you can also see the AMD flow in
Asterisk in verbose mode.

I’d suspect low silence_threshold . I usually set it 384, but it’s
very dependent on carrier.

On Thu, Feb 2, 2012 at 5:51 PM, Etann wrote:

> **
> Hi,
> I have IVR and when I press 1, asterisk calls my mobile phone.
> If my mobile phone is offline, asterisk transfers to asterisk voicemail.
> I’d like asterisk detects my mobile voicemail and if my mobile voicemail
> answers, asterisk transfers to asterisk voicemail.
> For that, I used AMD.
> So I have problems ! Asterisk detects answering machine everytime!
> How do I do please ?
>
>
> extensions.conf
> [ServeurPro]
> exten => s,1,Ringing()
> exten => s,2,Wait(2)
> exten => s,3,Answer()
> exten => s,4,Set(NbInvalide=0)
> exten => s,5,Set(NbEssai=0)
> exten => s,6,background(${ChmAudio}/ServeurProBienvenu)
> exten => s,7,WaitExten(2)
>
> exten => 1,1,AMD()
> exten => 1,2,GotoIf($["${AMDSTATUS}"="MACHINE"]?1,4)
> exten => 1,3,Dial(SIP/xxxxxxxx@ippi_outgoing2,40,r)
> exten => 1,4,Voicemail(801@FloriePro,us)
> exten => i,1,Set(NbInvalide=$[${NbInvalide}+1]})
> exten => i,2,Gotoif($["${NbInvalide}" < "3"]?:6)
> exten => i,3,Playback(${ChmAudio}/ErreurSaisie)
> exten => i,4,Playback(${ChmAudio}/RetourMenu)
> exten => i,5,Goto(s,6)
> exten => i,6,Playback(${ChmAudio}/ErreurSaisie)
> exten => i,7,Playback(${ChmAudio}/Aurevoir)
> exten => i,8,Hangup()
> exten => t,1,Set(NbEssai=$[${NbEssai}+1])
> exten => t,2,Gotoif($["${NbEssai}" < "3"]?:5)
> exten => t,3,Playback(${ChmAudio}/DemandeIncomprise)
> exten => t,4,Goto(s,6)
> exten => t,5,PlayBack(${ChmAudio}/Aurevoir)
> exten => t,6,Hangup()
> exten => h,1,noOp(“Statut AMD : “${AMDSTATUS})
>
> amd.conf
> [general]
> initial_silence = 2500 ; Maximum silence duration before the greeting.
> ; If exceeded then MACHINE.
> greeting = 1500 ; Maximum length of a greeting. If exceeded then MACHINE.
> after_greeting_silence = 500 ; Silence after detecting a greeting.
> ; If exceeded then HUMAN
> total_analysis_time = 5000 ; Maximum time allowed for the algorithm to
> decide
> ; on a HUMAN or MACHINE
> min_word_length = 120 ; Minimum duration of Voice to considered as a word
> between_words_silence = 50 ; Minimum duration of silence after a word to
> consider
> ; the audio what follows as a new word
> maximum_number_of_words = 3 ; Maximum number of words in the greeting.
> ; If exceeded then MACHINE
> silence_threshold = 256
>
> Thank you for your reply and for help!
> ——————————
>
> AMICALEMENT
> Manu
>
> SITES WEBS
> Mon site web Officiel (Manu-dpk.net) http://www.manu-dpk.net/
> Ecoutez Radio DPK http://webradio.manu-dpk.net/?page=Radio
>
> CONTACT
> – E-mail : manuliste@manu-dpk.net
> – Messenger (WLM) : msn@manu-dpk.net
> – Skype : manu-dpk
> ——————————
>
> PS : Pour le respect de l’environnnement, n’imprimez ce mail qu’en cas de
> nécessité.
>
>
> –
> _____________________________________________________________________
> — Bandwidth and Colocation Provided by http://www.api-digital.com
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>

Voicemail weirdness after upgrade

Hi,

I just replaced an ancient Asterisk 1.2 server by a new Asterisk 1.8.8.1
server (running on FreeBSD 8.2p4).

I got almost everything working except for voicemail.

In my extensions.conf I have something like:

exten => 5551234,1,Dial(SIP/101, 20)
exten => 5551234,n,Voicemail(1234,su)
exten => 5551234,n,Playback(vm-goodbye)
exten => 5551234,n,Hangup

In voicemail.conf:

1234 => 5678,My personal voicemail,voicemail@mydomain.tld

If I call in and wait for 20 secs I hear my recorded enavailable
recording and can leave a message after the tone. If I then hang up the
calling phone without first pressing # the recorded message is left in
/var/spool/asterisk/voicemail/default/1234/tmp and it is not accessible
thru Voicemailmain(). Only if I press # after leaving a message, the
recording is saved in INBOX.

People are not used to press # to finish a recording here and it always
worked fine without the # in Asterisk 1.2 so I hope there is something
that I have overlooked to allow voicemail to function as expected
without the requirement of pressing #.

DEBUG Message

Hello,

What is the meaning of this DEBUG message?

chan_dahdi.c: Not yet hungup… Calling hangup once with icause, and
clearing call

Thanks,
Elliot

Asterisk ExecIf

Execif Executes dialplan application, conditionally. e.g.

If expr is true, execute and return the result of appiftrue(args).

If expr is true, but appiftrue is not found, then the application will return a non-zero value.

Syntax

ExecIf(expression?appiftrue[:...][:appiffalse[:...]])

Arguments

  • expression
  • execapp
    • appiftrue
    • appiffalse

 

User provided example:

;;; DTMF Testing software to test IVR system
;;;
exten => 1234,1,Answer()
same => n,Read(value,pleasePress1forSupportPress2forHelp,1,,10)
same => n,NoOp(${value})
same => n,ExecIf($[${value}=1]?Goto(suppot,1))
same => n,ExecIf($[${value}=2]?Goto(help,1))
same => n,Hangup()

exten=> support,1,Answer()
same => n,NoOp(you are at support section)
same => n,Hangup()

exten=> help,1,Answer()
same => n,NoOp(you are at help section)
same => n,Hangup()