[asterisk-users] Urgent help = RUBY & AGI

Zarko Zivanovic outlaw011 at gmail.com
Tue Jul 27 09:21:44 CDT 2010


Here's something that should be easy for RUBY pro's.

 

Here is a script:

 

                        1.times do

                                r = $agi.exec('DIAL',
SIP/voipuser&Zap/32&Zap/33&Zap/34&Zap/35)

                                r = $agi.get_variable('DIALSTATUS')

 

                        #       $agi.set_variable(' WHOANSWERED ',...)

 

                                retry if r.message.include?('BUSY')

                        end  

 

 

when it's executed it shows this in the console:

 

 

 

AGI Rx << ANSWER

AGI Tx >> 200 result=0

AGI Rx << EXEC DIAL SIP/voipuser&Zap/32&Zap/33&Zap/34&Zap/35

    -- AGI Script Executing Application: (DIAL) Options:
(SIP/voipuser&Zap/32&Zap/33&Zap/34&Zap/35)

    -- Called voipuser

    -- Called 32

    -- Called 33

    -- Called 34

    -- Called 35

    -- Zap/32-1 is ringing

    -- Zap/33-1 is ringing

    -- Zap/34-1 is ringing

    -- Zap/35-1 is ringing

    -- SIP/voipuser-e989 is ringing

    -- SIP/ voipuser-e989 answered Zap/1-1    

 

 

What we need is to be able to populate the variable WHOANSWERED with info
SIP/ voipuser 

In this case, or whoever answers next time.

 

Thanks in advance!

 

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100727/453d815d/attachment.htm 


More information about the asterisk-users mailing list