[Asterisk-Users] Newbie extensions.conf I need to include [SMS] context.
Gary Ruddock
garyruddock at hotmail.com
Mon May 24 22:10:02 MST 2004
Could anyone be so kind as to tell me how to modify this dialplan to accept
and send SMS text messages. Do I need to update my basic Asterisk to include
SMS functionality? In the example contexts a reference is made to
/usr/lib/asterisk/smsin and I can't find that file.
I know that [local] is executed first and it includes other contexts. I need
to add these two contexts
[smsdial] ; create and send a text message, expects number+message and
connect to 17094009
exten = _X.,1,SMS(${CALLERIDNUM},,${EXTEN},${CALLERIDNAME})
exten = _X.,2,SMS(${CALLERIDNUM})
exten = _X.,3,Hangup
and
[incoming]
exten = _XXXXXX/_8005875290,1,SMS(${EXTEN:3},a)
exten = _XXXXXX/_8005875290,2,System(/usr/lib/asterisk/smsin ${EXTEN:3})
exten = _XXXXXX/_80058752[0-8]0,1,SMS(${EXTEN:3}${CALLERIDNUM:8:1},a)
exten = _XXXXXX/_80058752[0-8]0,2,System(/usr/lib/asterisk/smsin
${EXTEN:3}${CALLERIDNUM:8:1})
exten = _XXXXXX/_80058752X0,3,Hangup
*********************** my extensions.conf ***************************
[general]
static=yes
writeprotect=no
[globals]
TRUNK=Zap/g1 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip
(usually 1 or 0)
[trunkint]
;exten => _9011.,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
;exten => _9011.,2,Congestion
[trunkld]
exten => _90XXXNXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _90XXXNXXXXXX,2,Congestion
[trunklocal]
exten => _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _9NXXXXXX,2,Congestion
exten => _907NXXXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _907NXXXXXXXX,2,Congestion
[trunktollfree]
exten => _90800NXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})
exten => _90800NXXXXX,2,Congestion
[international]
ignorepat => 9
include => longdistance
include => trunkint
[longdistance]
;ignorepat => 9
;include => local
include => trunkld
[local]
ignorepat => 9
;include => default
include => parkedcalls
include => trunklocal
include => trunktollfree
include => trunkld
exten => 6001,1,Dial(SIP/6001,20,tr)
exten => 6002,1,Dial(SIP/6002,20,tr)
exten => 077777,1,Answer
exten => 077777,2,wait(2)
exten => 077777,3,playback(welcome)
exten => 077777,4,GotoIf($[foo${CALLERIDNUM} = foo]?7:5)
exten =>
077777,5,Queue(salesq,,https://swiftdrinks.com/admin/callerid.php?callerid=${CALLERIDNUM})
exten => 077777,6,Hangup
exten => 077777,7,Wait(2)
exten => 077777,8,Playback(privacy-unident)
exten => 077777,9,Hangup
exten => 2500,1,Dial(Zap/32,40)
exten => 2500,2,VoiceMail2(u2500)
exten => 2500,3,Hangup
exten => 2500,102,VoiceMail2(b2500)
exten => 2500,103,Hangup
exten => 2501,1,Dial(Zap/33,40)
exten => 2501,2,VoiceMail2(u2500)
exten => 2501,3,Hangup
exten => 2501,102,VoiceMail2(b2501)
exten => 2501,103,Hangup
exten => 81,1,AddQueueMember(salesq|Zap/32)
exten => 81,2,wait(1)
exten => 81,3,Playback(agent-loginok)
exten => 81,4,wait(1)
exten => 81,5,Hangup
exten => 82,1,RemoveQueueMember(salesq|Zap/32)
exten => 82,2,wait(1)
exten => 82,3,Playback(agent-loggedoff)
exten => 82,4,wait(1)
exten => 82,5,Hangup
exten => 95,3,Playback(agent-loginok)
exten => 95,4,wait(1)
exten => 95,5,Hangup
exten => 96,1,RemoveQueueMember(salesq|SIP/6001)
exten => 96,2,wait(1)
exten => 96,3,Playback(agent-loggedoff)
exten => 96,4,wait(1)
exten => 96,5,Hangup
exten => 97,1,AddQueueMember(salesq|SIP/6002)
exten => 97,2,wait(1)
exten => 97,3,Playback(agent-loginok)
exten => 97,4,wait(1)
exten => 97,5,Hangup
exten => 98,1,RemoveQueueMember(salesq|SIP/6002)
exten => 98,2,wait(1)
exten => 98,3,Playback(agent-loggedoff)
exten => 98,4,wait(1)
exten => 98,5,Hangup
[macro-stdexten]
exten => s,1,Dial(${ARG2},20) ; Ring the
interface, 20 seconds maximum
exten => s,2,Voicemail(u${ARG1}) ; If
unavailable, send to voicemail w/ unavail announce
exten => s,3,Goto(default,s,1) ; If they
press #, return to start
exten => s,102,Voicemail(b${ARG1}) ; If busy,
send to voicemail w/ busy announce
exten => s,103,Goto(default,s,1) ; If they
press #, return to start
;[mainmenu]
;
; Example "main menu" context with submenu
;
;exten => s,1,Answer
;exten => s,2,Background(thanks) ; "Thanks for calling press
1 for sales, 2 for support, ..."
;exten => 1,1,Goto(submenu,s,1)
;exten => 2,1,Hangup
;include => default
;
;[submenu]
;exten => s,1,Ringing ; Make them
comfortable with 2 seconds of ringback
;exten => s,2,Wait,2
;exten => s,3,Background(submenuopts) ; "Thanks for calling the sales
department. Press 1 for steve, 2 for..."
;exten => 1,1,Goto(default,steve,1)
;exten => 2,1,Goto(default,mark,2)
[default]
;empty
>I want to include a new context in my exensions.conf
>
>I have read this page
>http://www.voip-info.org/wiki-Asterisk+howto+dial+plan and I can sort of
>follow it?!
>
>I have a context [local] that I know zapata.conf points to, I have edited
>extensions.conf and put in my phone, sip and iax extensions. I want to add
>an sms context.
>
>I understand that all calls go through my [local] context and I have other
>contexts that get included into [local] for long distance and freefone
>numbers.
>
>At a guess would I put the code below in extensions.conf and include
>[smsdial] into the [local] context? I have read a page on extensions.conf
>parsing, would I include [smsdial] at the end of [local]?
>
>Please help, cos I have to do the same for [fax].
>
>[smsdial] ; create and send a text message, expects number+message
>and
>connect to 17094009
>exten = _X.,1,SMS(${CALLERIDNUM},,${EXTEN},${CALLERIDNAME})
>exten = _X.,2,SMS(${CALLERIDNUM})
>exten = _X.,3,Hangup
>
>_________________________________________________________________
>Use MSN Messenger to send music and pics to your friends
>http://www.msn.co.uk/messenger
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
More information about the asterisk-users
mailing list