I have a SPA742, which can autoanswer a call

In the dialplan, I have this:
exten => 28,1,SIPAddHeader(Call-Info:\;answer-after=0)
exten => 28,2,dial(SIP/36)

Now I want some external event initiate a call to that phone and play a 
message.


I have been thinking of dialfiles, but I believe there is a problem:
Dialfiles call a channel, and then executes the dialplan.
I need to SIPAddHeader first, then make the call.
Or am I missing something obvious?

Can I, via a callfile, or command-line parameters to Asterisk start a 
"dialplan-script"?
eg asterisk -someflag "execute callalert"

then in dialplan
[callalert]
exten => s,1,SIPAddHeader(Call-Info:\;answer-after=0)
exten => s,2,dial(SIP/36)
exten => s,3,Playback(firealert)
exten => s,4,Hangup

Leif


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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Reply via email to