Hi Alan,

I think what they mean by that is that one party is the number dialed,
and the other party could be someone like a customer rep in a call
centre, but it can also just be an automated script, which is what you
want.

So the easiest way that comes to mind is to setup a context in your
extensions.conf to handle playing the variable message, and then
sending the confirmation back to your program via an AGI, or by
listening for an event with your particular ActionID.

i.e.:

extensions.conf:

[deliver-message]
exten => s,1,Answer()
exten => s,2,Festival(${MESSAGE_TEXT})
exten => s,n,Festival(Press 5 to confirm you received this message)
exten => s,n,Festival(Press 6 to repeat)
exten => s,n,WaitExten(3)
exten => s,n,Goto(t)

exten => 5,1,AGI(message_recieved.agi|${MESSAGE_ID})
exten => 5,n,Festival(Thank you, goodbye)
exten => 5,n,Hangup()

exten => 6,1,Goto(s,2)

exten => i,1,Festival(Invalid extension, please try again)
exten => i,2,Goto(s,2)

exten => t,1,Festival(Timing out, goodbye)
exten => t,n,Hangup()

Through the management port, you can then say:

Action: Originate
Channel: SIP/[EMAIL PROTECTED]
Context: deliver-message
Exten: s
Priority 1
Callerid: "Perimeter 911" <4165555555>
Variable: MESSAGE_TEXT=the system is down, the system is down
Variable: MESSAGE_ID=123456
ActionID: 123456

When 416-555-1212 answers the phone, they will then be sent through
the above context in extensions.conf, starting at exten => s,1

re,
spd

--
| It ain't what you don't know that gets you into trouble. It's what
| you know for sure that just ain't so.   -- Mark Twain


On 7/25/06, Alan Cohen <[EMAIL PROTECTED]> wrote:
Hello all

I need to write a (non-Asterisk) program which will communicate to
Asterisk manager via (default) port 5038 and then instruct Asterisk
to:
 - place an outbound call
 - play a variable message (or use flite/festival to speak some text)
 - get confirmation that the message has been received
 - hangup

I've seen examples on the web, but I'm obviously missing something. It
seems that Asterisk Manager always wants to connect 2 parties together
when it's told "Action: Originate." It seems to me that I'd want only
one party rather than two here.

Can someone set me straight on this please?

--
Sincerely,
Alan Cohen
email:   [EMAIL PROTECTED]
website: http://perimeter911.com
phone:   416-783-9826

Reply via email to