[Asterisk-Users] Problems with auto dialout

Tony Spencer tony at games-master.co.uk
Tue Nov 29 04:58:12 MST 2005


I’m trying to get Asterisk to send out voice alerts in conjunction with
Nagios.

Basically what happens is depending on the type of failure Nagios has seen a
file will be created with the correct contacts phone number in the file.

It will also put the correct context in the file depending on what
pre-recorded message needs to be played.

 

The file is then moved to the asterisk outgoing directory to be sent

 

The script that gets created is as follows.

 

########### Dial out file #############

Channel: IAX2/eurisp/xxxxxxxxxx 

Callerid: xxxxxxxxxx

MaxRetries: 1

RetryTime: 60

WaitTime: 30

Context: alert-1

Extension: s

Priority: 1

######################################

 

And 

The xxxxxxxxxx’S aren’t in the file they contain the correct  number to dial
in “Channel” and the correct ID in “Callerid”.

 

 

The call file above corresponds with the content below which is in
extensions.conf

 

###############################

[alert-1]

exten => s,1,DigitTimeout,5 

exten => s,2,ResponseTimeout,10 

exten => s,3,Answer 

exten => s,4,Wait(1) 

exten => s,5,Playback(nagios-alert1) 

exten => s,6,Playback(vm-goodbye) 

exten => s,7,Hangup

################################

 

 

Everything seems to work fine up to the point when the call is sent out.

The call is sent but never waits for the person being called to answer the
phone, it just rings off after 2 or 3 rings.

So the person being called never hears the recorded message.

 

I’m hoping that some here is able to give some advice on this.

 

Here is what is seen when the call gets sent.

 

##############################

 

 

 

    -- Attempting call on IAX2/eurisp/xxxxxxxxxxx for s at alert-1:1 (Retry 1)

    -- Call accepted by 10.0.0.3 (format gsm)

    -- Format for call is gsm

       > Channel IAX2/eurisp/1 was answered.

  == Starting IAX2/eurisp/1 at alert-1,s,1 failed so falling back to exten
's'

  == Starting IAX2/eurisp/1 at alert-1,s,1 still failed so falling back to
context 'default'

    -- Executing Playback("IAX2/eurisp/1", "vm-goodbye") in new stack

    -- Playing 'vm-goodbye' (language 'en')

    -- Executing Macro("IAX2/eurisp/1", "hangupcall") in new stack

    -- Executing ResetCDR("IAX2/eurisp/1", "w") in new stack

    -- Executing NoCDR("IAX2/eurisp/1", "") in new stack

    -- Executing Wait("IAX2/eurisp/1", "5") in new stack

    -- Executing Hangup("IAX2/eurisp/1", "") in new stack

  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on
'IAX2/eurisp/1' in macro 'hangupcall'

  == Spawn extension (default, s, 2) exited non-zero on 'IAX2/eurisp/1'

    -- Hungup 'IAX2/eurisp/1'

Nov 29 11:54:14 NOTICE[2042]: pbx_spool.c:239 attempt_thread: Call completed
to IAX2/eurisp/xxxxxxxxxxx

 

 

######################

 

 

Thanks in advance


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.7/182 - Release Date: 24/11/2005
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051129/1d4ef7f5/attachment.htm


More information about the asterisk-users mailing list