This example describes how to configure Oracle Communications Messaging Server for two-way SMS by using Unified Configuration recipes. You could also perform the same configuration manually by using the msconfig command, however, using recipes is faster and makes the task repeatable. You run one recipe on the system where you are adding the SMS channelsmpp. For more information on Unified Configuration recipes, see the discussion on recipe language in the Messaging Server Reference and "Using Recipes."
Use the following "Example Recipe to Configure Two-Way SMS with Messaging Server" to configure Messaging Server for two-way SMS.
Create the source filter file (process_sms.filter) with the Messaging Server Unified Configuration.
To create a filter definition file for the source filter, enter a definition as in the following example. This is the source filter for the process_sms channel:
require ["body","imap4flags"]; if body :raw :contains "Action: failed" { addflag "sms"; addflag "smserror"; }
Save the process definition file.
Make a copy of the example recipe file and save it as recipe.rcp.
To run the recipe, type the following command:
cd MessagingServer_home/bin msconfig run <recipe_name>
If running a compiled configuration, recompile the Messaging Server configuration to capture the changes you have made:
imsimta cnbuild
Restart Messaging Server.
cd MessagingServer_home/bin stop-msg start-msg
Example Recipe to Configure Two-Way SMS with Messaging Server
set_option("mta.enable_sieve_body", "1"); set_option("sms_gateway.enable", "1"); if exists_channel("sms") { delete_channel("sms"); } if exists_channel("process_sms") { delete_channel("process_sms"); } add_channel("sms", ["notificationchannel", "process_sms", "backoff", "PT10M PT20M PT30M", "notices", "1", "sourcefilter", "file://opt/sun/comms/messaging64/config/sms_channel.filter", "official_host_name", "sms-handle", "options.smpp_server", "127.0.0.1", "options.smpp_port", "8500", "options.gateway_profile", "GATEWAY", "options.default_source_address", "000", "options.smsc_default_charset", "UTF-16-BE", "options.use_header_from", "0", "options.esme_password", "password", "options.esme_system_id", "smppclient"]); add_channel("process_sms", ["sourcefilter", "file://opt/sun/comms/messaging64/config/process_sms.filter", "official_host_name", "process_sms-daemon"]); Setting rewrite rules append_rewrites(["sms","$U@sms-handle"]); if exists_group("sms_gateway.smpp_server:SMPPSERVER") { delete_group("sms_gateway.smpp_server:SMPPSERVER"); } add_group("sms_gateway.smpp_server:SMPPSERVER", ["tcp_ports", "4080", "server_host", "127.0.0.1", "server_port","950", "ESME_PASSWORD","password","ESME_SYSTEM_ID","smppclient"]); if exists_group("sms_gateway.smpp_relay:SMPPRELAY") { delete_group("sms_gateway.smpp_relay:SMPPRELAY"); delete_group("sms_gateway.smpp_relay:SMPP_RELAY"); } add_group("sms_gateway.smpp_relay:SMPPRELAY", ["server_port", "950", "tcp_ports", "8500", "server_host", "127.0.0.1"]); if exists_group("sms_gateway.gateway_profile:GATEWAY") { delete_group("sms_gateway.gateway_profile:GATEWAY"); } add_group("sms_gateway.gateway_profile:GATEWAY", ["select_re", "([0-9]*)", "mta_channel", "sms", "smsc_default_charset", "UTF-16-BE", "email_body_charset", "UTF-8", "email_header_charset", "UTF-8", "text_to_subject", "1"]);
Set the JMQ options to create non-delivery failure notifications of any SMS messages. For more information, see "Java Message Queue Notification Messages and Properties." To set the following options, see "Configure and Enable the Messaging Server jmqnotify Plugin":
NewMsg.enable -v 1
jmqHost -v "127.0.0.1"
jmqPort -v "7777"
jmqUser -v "user
jmqpwd -v "xxx"
DestinationType -v "queue"
jmqQueue -v "ucsms1"
Priority -v 3
ttl -v 1000
Persistent -v 1
maxheadersize -v 1024
noneinbox.enable -v 1
msgflags.enable -v 0
readmsg.enable -v 0