MessageSend(destination[,from,to])
Dialplan Builder
-- build your MessageSend() command
A To URI for the message.
A From URI for the message if needed for the message technology being used to send this message. This can be a [[term:sip]](S) URI, such as `Alice <sip:alice@atlanta.com>`, or a string in the format `alice@atlanta.com`. This will override a `from` specified using the MESSAGE [[term:dialplan|dialplan]] function or the `from` that may have been on an incoming message.
Full arguments reference
destinationrequired - A To URI for the message.from- A From URI for the message if needed for the message technology being used to send this message. This can be a SIPSession Initiation Protocol, the standard signaling protocol used to set up, manage, and tear down VoIP calls between Asterisk and phones or carriers.(S) URI, such asAlice <sip:alice@atlanta.com>, or a string in the formatalice@atlanta.com. This will override afromspecified using the MESSAGE dialplanThe core call-routing configuration of Asterisk, written mostly in extensions.conf as contexts, extensions, and priorities that decide how every call is handled. Full definition → function or thefromthat may have been on an incoming message.to- A To URI for the message if needed for the message technology being used to send this message. This can be a SIP(S) URI, such asAlice <sip:alice@atlanta.com>, or a string in the formatalice@atlanta.com. This will override atospecified using the MESSAGE dialplanThe core call-routing configuration of Asterisk, written mostly in extensions.conf as contexts, extensions, and priorities that decide how every call is handled. Full definition → function or thetothat may have been on an incoming message.
Description
Send a text message. The body of the message that will be sent is what is currently set to MESSAGE(body). This may he come from an incoming message. The technology chosen for sending the message is determined based on a prefix to the destination parameter.
This application sets the following channelA single call leg passing through Asterisk. Channels represent connections to endpoints and are what dialplan applications act on. variables:
- MESSAGE_SEND_STATUS - This is the message delivery status returned by this application.
INVALID_PROTOCOL- No handler for the technology part of the URI was found.INVALID_URI- The protocol handler reported that the URI was not valid.SUCCESS- Successfully passed on to the protocol handler, but delivery has not necessarily been guaranteed.FAILURE- The protocol handler reported that it was unable to deliver the message for some reason.
Arguments
destinationrequired - A To URI for the message.from- A From URI for the message if needed for the message technology being used to send this message. This can be a SIPSession Initiation Protocol, the standard signaling protocol used to set up, manage, and tear down VoIP calls between Asterisk and phones or carriers.(S) URI, such asAlice <sip:alice@atlanta.com>, or a string in the formatalice@atlanta.com. This will override afromspecified using the MESSAGE dialplanThe core call-routing configuration of Asterisk, written mostly in extensions.conf as contexts, extensions, and priorities that decide how every call is handled. Full definition → function or thefromthat may have been on an incoming message.to- A To URI for the message if needed for the message technology being used to send this message. This can be a SIP(S) URI, such asAlice <sip:alice@atlanta.com>, or a string in the formatalice@atlanta.com. This will override atospecified using the MESSAGE dialplanThe core call-routing configuration of Asterisk, written mostly in extensions.conf as contexts, extensions, and priorities that decide how every call is handled. Full definition → function or thetothat may have been on an incoming message.
User Notes
Know a tip or gotcha for this topic? Share it below and help others.
Contribute a note
Share a tip, gotcha, or practical example. Keep it under 2000 characters. No questions (use the Asterisk community forums for support). Wrap code in backticks.
Related
Applications
MusicOnHold()
ADSIProg()
AELSub()
AGI()
AMD()
AddQueueMember()
AgentLogin()
AgentRequest()
AlarmReceiver()
Answer()
AttendedTransfer()
AudioSocket()
Authenticate()
Background()
BackgroundDetect()
BlindTransfer()
Bridge()
BridgeAdd()
BridgeWait()
Broadcast()
Busy()
CELGenUserEvent()
CallCompletionCancel()
CallCompletionRequest()
ChanIsAvail()
ChanSpy()
ChangeMonitor()
ChannelRedirect()
ClearHash()
ConfBridge()
ConfKick()
Congestion()
ContinueWhile()
ControlPlayback()
DAHDIAcceptR2Call()
DAHDIRAS()
DAHDIScan()
DAHDISendCallreroutingFacility()
DAHDISendKeypadFacility()
DBdeltree()
DISA()
DateTime()
DeadAGI()
Dial()
Dictate()
Directory()
DumpChan()
EAGI()
Echo()
Else()
ElseIf()
EndIf()
EndWhile()
Exec()
ExecIf()
ExecIfTime()
ExitIf()
ExitWhile()
ExtenSpy()
ExternalIVR()
Festival()
Flash()
FollowMe()
ForkCDR()
GetCPEID()
Gosub()
GosubIf()
Goto()
GotoIf()
GotoIfTime()
Hangup()
HangupCauseClear()
IAX2Provision()
ICES()
IVRDemo()
If()
ImportVar()
Incomplete()
JACK()
JabberJoin()
JabberLeave()
JabberSend()
JabberSendGroup()
JabberStatus()
Log()
MP3Player()
MSet()
Macro()
MacroExclusive()
MacroExit()
MacroIf()
MailboxExists()
MeetMe()
MeetMeAdmin()
MeetMeChannelAdmin()
MeetMeCount()
MessageSend()
Milliwatt()
MinivmAccMess()
MinivmDelete()
MinivmGreet()
MinivmMWI()
MinivmNotify()
MinivmRecord()
MixMonitor()
Monitor()
Morsecode()
NBScat()
NoCDR()
NoOp()
ODBCFinish()
ODBC_Commit()
ODBC_Rollback()
OSPAuth()
OSPFinish()
OSPLookup()
OSPNext()
Originate()
PJSIPHangup()
PJSIPNotify()
Page()
Park()
ParkAndAnnounce()
ParkedCall()
PauseMonitor()
PauseQueueMember()
Pickup()
PickupChan()
PlayTones()
Playback()
PrivacyManager()
Proceeding()
Progress()
Queue()
QueueLog()
QueueUpdate()
RaiseException()
Read()
ReadExten()
ReceiveFAX()
ReceiveMF()
ReceiveSF()
ReceiveText()
Record()
Reference section rework and a batch of audio converter improvements
Reload()
RemoveQueueMember()
ResetCDR()
RetryDial()
Return()
Ringing()
SIPAddHeader()
SIPDtmfMode()
SIPRemoveHeader()
SIPSendCustomINFO()
SLAStation()
SLATrunk()
SMS()
SayAlpha()
SayAlphaCase()
SayCountedAdj()
SayCountedNoun()
SayDigits()
SayMoney()
SayNumber()
SayOrdinal()
SayPhonetic()
SayUnixTime()
SendDTMF()
SendFAX()
SendImage()
SendMF()
SendSF()
SendText()
SendURL()
Set()
SetAMAFlags()
Signal()
SkelGuessNumber()
SoftHangup()
SpeechActivateGrammar()
SpeechBackground()
SpeechCreate()
SpeechDeactivateGrammar()
SpeechDestroy()
SpeechLoadGrammar()
SpeechProcessingSound()
SpeechStart()
SpeechUnloadGrammar()
StackPop()
StartMusicOnHold()
Stasis()
StatsD()
StopMixMonitor()
StopMonitor()
StopMusicOnHold()
StopPlayTones()
StoreDTMF()
StreamEcho()
TestClient()
TestServer()
ToneScan()
Transfer()
TryExec()
TrySystem()
UnpauseMonitor()
UnpauseQueueMember()
UserEvent()
VMAuthenticate()
VMSayName()
Verbose()
VoiceMail()
VoiceMailMain()
VoiceMailPlayMsg()
Wait()
WaitDigit()
WaitExten()
WaitForCondition()
WaitForNoise()
WaitForRing()
WaitForSignal()
WaitForSilence()
WaitForTone()
WaitUntil()
While()
Zapateller()