<?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:context="http://www.springframework.org/schema/context"
	xmlns:int="http://www.springframework.org/schema/integration"
	xmlns:int-smpp="http://www.springframework.org/schema/integration/smpp"
	xsi:schemaLocation="
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/integration/smpp https://www.springframework.org/schema/integration/smpp/spring-integration-smpp.xsd">

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

	<int:channel id="inboundChannel" />
	<int:channel id="outboundChannel" />
	<int:channel id="receiptChannel" />

	<bean id="session"
		class="org.springframework.integration.smpp.session.SmppSessionFactoryBean">
		<property name="host" value="${smpp.host}" />
		<property name="port" ref="smppPort" />
		<property name="password" value="${smpp.password}" />
		<property name="systemId" value="${smpp.systemId}" />
		<property name="bindType" value="BIND_RX" />
		<property name="autoStartup" value="true" />
		<property name="addressRange" value="${smpp.systemId}" />
	</bean>

	<bean id="session2"
		class="org.springframework.integration.smpp.session.SmppSessionFactoryBean">
		<property name="host" value="${smpp.host}" />
		<property name="port" ref="smppPort" />
		<property name="password" value="${smpp.password}" />
		<property name="systemId" value="${smpp.systemId}" />
		<property name="bindType" value="BIND_TX" />
		<property name="autoStartup" value="true" />
	</bean>

	<int-smpp:inbound-channel-adapter channel="inboundChannel"
		smpp-session-ref="session" />

	<int-smpp:outbound-gateway request-channel="outboundChannel"
		reply-channel="receiptChannel" smpp-session-ref="session2" />

</beans>
