<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:int="http://www.springframework.org/schema/integration"
	xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">

	<import resource="classpath:smppConnection-context.xml"/>

	<!-- SENDS SMSs to a specific number -->
	<bean id="outboundSession" class="org.springframework.integration.smpp.session.SmppSessionFactoryBean">
		<property name="host" value="${smpp.host}" />
		<property name="port" ref="smppPort" />
		<property name="bindType" value="BIND_TX" />
		<property name="password" value="${smpp.password}" />
		<property name="addressRange" value="${test.dst.number}" />
		<property name="systemId" value="${smpp.systemId}" />
	</bean>

	<!-- RECEIVES SMSs from a specific number -->
	<bean id="inboundSession"
		class="org.springframework.integration.smpp.session.SmppSessionFactoryBean">
		<property name="host" value="${smpp.host}" />
		<property name="port" ref="smppPort" />
		<property name="bindType" value="BIND_RX" />
		<property name="password" value="${smpp.password}" />
		<property name="addressRange" value="${test.dst.number}" />
		<!-- this says: 'i only want to receive SMS at this addy, though i can
			also specify a range. It is, however, optional. This is particularly useful
			as a consumer, however. -->
		<property name="systemId" value="${smpp.systemId}" />
	</bean>

	<bean id="smppInboundChannelAdapter" class="org.springframework.integration.smpp.inbound.SmppInboundChannelAdapter">
		<property name="smppSession" ref="inboundSession" />
		<property name="channel" ref="inbound" />
	</bean>

	<bean id="smppOutboundChannelAdapter" class="org.springframework.integration.smpp.outbound.SmppOutboundChannelAdapter">
		<property name="smppSession" ref="outboundSession" />
	</bean>

	<int:outbound-channel-adapter ref="smppOutboundChannelAdapter"
		channel="outbound" />

	<int:channel id="outbound" />
	<int:channel id="inbound" />

</beans>
