Use the "loopback" smsc. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Francisco Andrades Grassi Sent: Wednesday, 13 July, 2011 09:59 To: [email protected] Subject: communication between two ESMEs using opensmppbox
Hi, I've just compiled Kannel and openSMPPbox and I'm trying to use it as an SMSC simulator: two ESMEs connected to the opensmppbox routing traffic between them: ESME1 <----> opensmppbox <----> ESME2 I have the bearer box and the opensmppbox running, connected to each other. When I launch my ESMEs I can see they connect successfully to the opensmppbox, and when I send a message from ESME1 to the opensmppbox I can see the message is received and is delegated to the bearerbox. But that's as far as I can get, the bearerbox never sends the message back to the opensmppbox for it to deliver it to the ESME2, and instead it keeps trying to route the message indefinitely: 2011-07-13 02:37:42 [13217] [14] DEBUG: boxc_receiver: got boxc_id <SMS> from <127.0.0.1> 2011-07-13 02:38:10 [13217] [8] DEBUG: boxc_receiver: sms received 2011-07-13 02:38:10 [13217] [8] DEBUG: send_msg: sending msg to boxc: <SMS1> 2011-07-13 02:38:10 [13217] [7] DEBUG: sms_router: handling message (0x9f64378 vs 0x9f64378) 2011-07-13 02:38:10 [13217] [7] DEBUG: Routing failed, re-queued. 2011-07-13 02:38:10 [13217] [7] DEBUG: sms_router: handling message (0x9f64378 vs 0x9f64378) 2011-07-13 02:38:10 [13217] [7] DEBUG: Routing failed, re-queued. 2011-07-13 02:38:10 [13217] [7] DEBUG: sms_router: time to sleep 30.00 secs. I've tried using a 'smsbox-route' on my cannel.conf file, but I either do not know how to tell it to route back to opensmppbox or that's the wrong way? I've also tried using a loopback HTTP GET to return the message to the bearerbox, but although I can see the message being delivered via HTTP, it won't get back to opensmppbox: 2011-07-13 02:52:34 [13294] [21] DEBUG: Connecting nonblocking to <127.0.0.1> 2011-07-13 02:52:34 [13294] [2] DEBUG: HTTP: Creating HTTPClient for `127.0.0.1'. 2011-07-13 02:52:34 [13294] [2] DEBUG: HTTP: Created HTTPClient area 0x8f5fc80. ... 2011-07-13 02:52:34 [13294] [20] DEBUG: len: 193 2011-07-13 02:52:34 [13294] [20] DEBUG: size: 1024 2011-07-13 02:52:34 [13294] [20] DEBUG: immutable: 0 2011-07-13 02:52:34 [13294] [20] DEBUG: data: 47 45 54 20 2f 63 67 69 2d 62 69 6e 2f 73 65 6e GET /cgi-bin/sen 2011-07-13 02:52:34 [13294] [20] DEBUG: data: 64 73 6d 73 3f 75 73 65 72 6e 61 6d 65 3d 74 65 dsms?username=te 2011-07-13 02:52:34 [13294] [20] DEBUG: data: 73 74 65 72 26 70 61 73 73 77 6f 72 64 3d 66 6f ster&password=fo 2011-07-13 02:52:34 [13294] [20] DEBUG: data: 6f 62 61 72 26 74 6f 3d 25 32 42 31 32 33 34 35 obar&to=%2B12345 . 2011-07-13 02:52:34 [13294] [20] DEBUG: Octet string dump ends. 2011-07-13 02:52:34 [13294] [8] DEBUG: HTTP[MT2MO]: Got request `/cgi-bin/sendsms' 2011-07-13 02:52:34 [13294] [8] DEBUG: HTTP[MT2MO]: Received an HTTP request 2011-07-13 02:52:34 [13294] [8] DEBUG: HTTP[MT2MO]: Constructing new SMS 2011-07-13 02:52:34 [13294] [8] WARNING: smsbox_list empty! 2011-07-13 02:52:34 [13294] [8] DEBUG: HTTP[MT2MO]: Sending reply 2011-07-13 02:52:34 [13294] [8] DEBUG: HTTP: Resetting HTTPClient for `127.0.0.1'. 2011-07-13 02:52:34 [13294] [8] DEBUG: HTTP[MT2MO]: Destroying client information 2011-07-13 02:52:34 [13294] [4] WARNING: smsbox_list empty! 2011-07-13 02:52:34 [13294] [4] WARNING: smsbox_list empty! ... Is there a way to use Kannel/smppbox under these conditions? How can I use opensmppbox to route messages between two ESMEs? Thanks a lot. opensmppbox log ============== 2011-07-13 03:05:09 [13426] [2] DEBUG: SMPP[SMS]: Got PDU: 2011-07-13 03:05:09 [13426] [2] DEBUG: SMPP PDU 0x96637f8 dump: 2011-07-13 03:05:09 [13426] [2] DEBUG: type_name: submit_sm 2011-07-13 03:05:09 [13426] [2] DEBUG: command_id: 4 = 0x00000004 2011-07-13 03:05:09 [13426] [2] DEBUG: command_status: 0 = 0x00000000 2011-07-13 03:05:09 [13426] [2] DEBUG: sequence_number: 3 = 0x00000003 2011-07-13 03:05:09 [13426] [2] DEBUG: service_type: NULL 2011-07-13 03:05:09 [13426] [2] DEBUG: source_addr_ton: 1 = 0x00000001 2011-07-13 03:05:09 [13426] [2] DEBUG: source_addr_npi: 1 = 0x00000001 2011-07-13 03:05:09 [13426] [2] DEBUG: source_addr: "1234567" 2011-07-13 03:05:09 [13426] [2] DEBUG: dest_addr_ton: 1 = 0x00000001 2011-07-13 03:05:09 [13426] [2] DEBUG: dest_addr_npi: 1 = 0x00000001 2011-07-13 03:05:09 [13426] [2] DEBUG: destination_addr: "7654321" 2011-07-13 03:05:09 [13426] [2] DEBUG: esm_class: 0 = 0x00000000 2011-07-13 03:05:09 [13426] [2] DEBUG: protocol_id: 0 = 0x00000000 2011-07-13 03:05:09 [13426] [2] DEBUG: priority_flag: 0 = 0x00000000 2011-07-13 03:05:09 [13426] [2] DEBUG: schedule_delivery_time: NULL 2011-07-13 03:05:09 [13426] [2] DEBUG: validity_period: NULL 2011-07-13 03:05:09 [13426] [2] DEBUG: registered_delivery: 0 = 0x00000000 2011-07-13 03:05:09 [13426] [2] DEBUG: replace_if_present_flag: 0 = 0x00000000 2011-07-13 03:05:09 [13426] [2] DEBUG: data_coding: 0 = 0x00000000 2011-07-13 03:05:09 [13426] [2] DEBUG: sm_default_msg_id: 0 = 0x00000000 2011-07-13 03:05:09 [13426] [2] DEBUG: sm_length: 4 = 0x00000004 2011-07-13 03:05:09 [13426] [2] DEBUG: short_message: "test" 2011-07-13 03:05:09 [13426] [2] DEBUG: SMPP PDU dump ends. 2011-07-13 03:05:09 [13426] [2] DEBUG: Msg object at 0x96636d0: 2011-07-13 03:05:09 [13426] [2] DEBUG: type: sms 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.sender: 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string at 0x9663958: 2011-07-13 03:05:09 [13426] [2] DEBUG: len: 8 2011-07-13 03:05:09 [13426] [2] DEBUG: size: 1024 2011-07-13 03:05:09 [13426] [2] DEBUG: immutable: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: data: 2b 31 32 33 34 35 36 37 +1234567 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string dump ends. 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.receiver: 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string at 0x96638d8: 2011-07-13 03:05:09 [13426] [2] DEBUG: len: 8 2011-07-13 03:05:09 [13426] [2] DEBUG: size: 1024 2011-07-13 03:05:09 [13426] [2] DEBUG: immutable: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: data: 2b 37 36 35 34 33 32 31 +7654321 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string dump ends. 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.udhdata: 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.msgdata: 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string at 0x96612f8: 2011-07-13 03:05:09 [13426] [2] DEBUG: len: 4 2011-07-13 03:05:09 [13426] [2] DEBUG: size: 5 2011-07-13 03:05:09 [13426] [2] DEBUG: immutable: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: data: 74 65 73 74 test 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string dump ends. 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.time: 1310542509 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.smsc_id: 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.smsc_number: 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.foreign_id: 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.service: 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string at 0x9663920: 2011-07-13 03:05:09 [13426] [2] DEBUG: len: 8 2011-07-13 03:05:09 [13426] [2] DEBUG: size: 9 2011-07-13 03:05:09 [13426] [2] DEBUG: immutable: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: data: 74 65 6c 65 66 6d 69 61 id1 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string dump ends. 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.account: 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.id: 015683fa-2e0e-420e-984a-cccaf53c8763 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.sms_type: 2 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.mclass: -1 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.mwi: -1 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.coding: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.compress: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.validity: -1 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.deferred: -1 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.dlr_mask: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.dlr_url: 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.pid: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.alt_dcs: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.rpi: -1 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.charset: 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.boxc_id: 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string at 0x96637b8: 2011-07-13 03:05:09 [13426] [2] DEBUG: len: 3 2011-07-13 03:05:09 [13426] [2] DEBUG: size: 4 2011-07-13 03:05:09 [13426] [2] DEBUG: immutable: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: data: 53 4d 53 SMS 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string dump ends. 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.binfo: 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.msg_left: -1 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.split_parts: (nil) 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.priority: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.resend_try: -1 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.resend_time: -1 2011-07-13 03:05:09 [13426] [2] DEBUG: sms.meta_data: 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string at 0x96637a0: 2011-07-13 03:05:09 [13426] [2] DEBUG: len: 6 2011-07-13 03:05:09 [13426] [2] DEBUG: size: 1024 2011-07-13 03:05:09 [13426] [2] DEBUG: immutable: 0 2011-07-13 03:05:09 [13426] [2] DEBUG: data: 3f 73 6d 70 70 3f ?smpp? 2011-07-13 03:05:09 [13426] [2] DEBUG: Octet string dump ends. 2011-07-13 03:05:09 [13426] [2] DEBUG: Msg object ends. 2011-07-13 03:05:09 [13426] [1] DEBUG: SMPP[SMS]: Sending PDU: 2011-07-13 03:05:09 [13426] [1] DEBUG: SMPP PDU 0x9665b08 dump: 2011-07-13 03:05:09 [13426] [1] DEBUG: type_name: submit_sm_resp 2011-07-13 03:05:09 [13426] [1] DEBUG: command_id: 2147483652 = 0x80000004 2011-07-13 03:05:09 [13426] [1] DEBUG: command_status: 0 = 0x00000000 2011-07-13 03:05:09 [13426] [1] DEBUG: sequence_number: 3 = 0x00000003 2011-07-13 03:05:09 [13426] [1] DEBUG: message_id: "015683fa" 2011-07-13 03:05:09 [13426] [1] DEBUG: SMPP PDU dump ends. kannel.conf ========= group = core admin-port = 13000 smsbox-port = 13001 admin-password = bar admin-deny-ip = "*.*.*.*" admin-allow-ip = "*.*.*.*" log-file = "/tmp/kannel.log" log-level = 0 box-allow-ip = "*.*.*.*" access-log = "/tmp/access.log" group = smsc smsc = fake smsc-id = FAKE port = 20000 connect-allow-ip = *.*.*.* preferred-smsc-id = opensmppbox group = smsbox bearerbox-host = localhost sendsms-port = 13013 global-sender = 13013 log-file = "/tmp/smsbox.log" log-level = 0 access-log = "/tmp/access.log" group = smsc smsc = http smsc-id = MT2MO system-type = kannel smsc-username = tester smsc-password = foobar port = 14000 send-url = "http://localhost:14000/cgi-bin/sendsms" group = smsbox-route smsbox-id = opensmppbox shortcode = ".*" opensmpp.conf ============ group = core admin-port = 13000 smsbox-port = 13001 admin-password = bar admin-deny-ip = "*.*.*.*" admin-allow-ip = "*.*.*.*" log-file = "/tmp/kannel.log" log-level = 0 box-allow-ip = "*.*.*.*" access-log = "/tmp/access.log" group = opensmppbox opensmppbox-id = opensmppbox opensmppbox-port = 2345 bearerbox-host = localhost bearerbox-port = 13001 log-level = 0 log-file = opensmppbox.log our-system-id = opensmppbox smpp-logins = "/etc/kannel/smpplogins.txt" smpplogins.txt =========== id1 id1 SMS *.*.*.* id2 id2 SMS1 *.*.*.*
