praekelt/vumi — pull request #738 by smn (2014-03-12 09:26:15+00:00)
Title: Write USSD SMPP processor for Mica

```
2014-03-11 13:52:40+0000 [SmppTransceiverProtocol,client] >> {'body': {'mandatory_parameters': {'priority_flag': 0, 'source_addr': 'XXXXXXXXX', 'protocol_id': 0, 'replace_if_present_flag': 0, 'registered_delivery': 0, 'dest_addr_ton': 'unknown', 'source_addr_npi': 'unknown', 'schedule_delivery_time': '', 'dest_addr_npi': 'unknown', 'sm_length': 5, 'esm_class': 0, 'data_coding': 0, 'service_type': 'USSD', 'source_addr_ton': 'unknown', 'sm_default_msg_id': 0, 'validity_period': '', 'destination_addr': '', 'short_message': '*372#'}, 'optional_parameters': [{'length': 2, 'tag': 'user_message_reference', 'value': 12853}, {'length': 1, 'tag': 'ussd_service_op', 'value': '01'}]}, 'header': {'command_status': 'ESME_ROK', 'command_length': 65, 'sequence_number': 1913, 'command_id': 'deliver_sm'}}
2014-03-11 13:52:40+0000 [SmppTransceiverProtocol,client] Unhandled error in Deferred:
2014-03-11 13:52:40+0000 [SmppTransceiverProtocol,client] Unhandled Error
Traceback (most recent call last):
File "/mnt/praekelt/vumi-go/ve/src/vumi/vumi/transports/smpp/protocol.py", line 210, in dataReceived
self.on_pdu(unpack_pdu(data))
File "/mnt/praekelt/vumi-go/ve/src/vumi/vumi/transports/smpp/protocol.py", line 232, in on_pdu
return maybeDeferred(handler, pdu)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 139, in maybeDeferred
result = f(*args, **kw)
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1237, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
--- ---
File "/mnt/praekelt/vumi-go/ve/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1099, in _inlineCallbacks
result = g.send(result)
File "/mnt/praekelt/vumi-go/ve/src/vumi/vumi/transports/smpp/protocol.py", line 317, in handle_deliver_sm
handled = yield handler(pdu)
File "/mnt/praekelt/vumi-go/ve/src/vumi/vumi/transports/smpp/processors.py", line 206, in handle_ussd_pdu
d = self.handle_deliver_sm_ussd(pdu, pdu_params, pdu_opts)
File "/mnt/praekelt/vumi-go/ve/src/vumi/vumi/transports/smpp/processors.py", line 234, in handle_deliver_sm_ussd
its_session_number = int(pdu_opts['its_session_info'], 16)
exceptions.KeyError: 'its_session_info'
```