[asterisk-users] Sending audio to a channel

2008-04-03 Thread John Hass
I have a voicemail application that users can listen to messages and
leave messages.  I am looking for a way to play a beep tone to a user
when a new message is received when they are on the phone.

Here is what I have come up with:

in extensions.conf:
[beepvoicemail]
exten => 1000,1,answer()
exten => 1000,2,NoCDR()
exten => 1000,3,wait(2)
exten => 1000,4,Set(TIMEOUT(absolute)=5)
exten => 1000,5,playback(voicemail/beeps)
exten => 1000,7,SendDTMF(9)
exten => 1000,8,hangup()

exten => 2000,1,Set(TIMEOUT(absolute)=5)
exten => 2000,2,NoCDR()
exten => 2000,3,extenspy(,g(${mailbox})WqX)
exten => 2000,4,hangup()


Here is what I run:
Action: Originate
Channel: Local/[EMAIL PROTECTED]
MaxRetries: 0
RetryTime: 15
Context: beepvoicemail
Exten: 1000
Priority: 1
Callerid: Pager <1000>
Variable: mailbox=$mailbox_user

I am using perl to originate so lets say mailbox 80085 left a message
for 8675309 $mailbox_user would contain 8675309 everyone that is logged
onto the system is part of there own spygroup the spygroup is always the
mailbox number.

This works when it doesn't crash Asterisk or the application does not
get stuck on extenspy for hours and hours.

Is there anyway to have an application that can just send audio to a
channel without having to use extenspy (it's sort of overkill for what I
need)

Thanks For the help.

--John


___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] How to get TCP access to CDR Master.csv

2007-10-24 Thread John Hass




Hello,

I am not sure if I totally understand the question but if your looking
to stream the connection you could create a simple bash script like this


#!/bin/bash
while true; do
 tail -f /var/log/asterisk/cdr-custom/Master.csv | nc -p 1024 -l
done

There probably is a better solution then this, but this will get you
going

>From any machine you should be able to type `telnet ip.of.machine 1024`


--John


[EMAIL PROTECTED] wrote:

  
  
  

  
  Hi.
   
  I‘d like to get access to the CDR‘s generated by
Asterisk (1.4) in real-time from a remote connection coming in on TCP.
Basically what I have is a Windows application that is used to process
incoming, outgoing and missed call records putting them into a database
for
some analysing etc. This app can connect to a TCP server and read from
this
connection the CDR‘s as they  are coming in (being generated).
   
  I can‘t find this as a „feature“ of the
standard Asterisk... but maybe I‘m missing something? The closest I
could
get is something around the manager api but it‘s not really what I‘m
after. I‘d like to access the CDR‘s them selves.
   
  Being a (more or less) novice Linux user the
only thing I
can think of is trying to do this using Perl scripts where it would set
up a
listening socket and when connection is received it would do something
like (in
princip, not managed to do this properly yet):
   
  ...
  print $connection `tail –f
/var/log/asterisk/cdr-custom/Master.csv`
  ...
   
  But even this is full of issues to solve. Things
like only
one connection at a time (which I can live with) from the remote
computer. The
fact that tail will not write to the socket (yeah, a major issue
probably)
which I‘m thinking of trying to solve by reading line by line somehow
and
writing back to the socket... not even sure if this is possible.
   
  So basically I‘m hoping someone has a nice
solution
for this. With or witout scripting, external programs of some sort
(runnin
ubuntu 7.04 or 6.06) or whatever works. I‘d really appreciate your
input
here.
   
  Sincerely, Baldvin
   
  
  

___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users





___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users