https://redmine.kannel.org/issues/649#note-1

2012/9/7 Eugene Prokopiev <[email protected]>

> Hi,
>
> I have installed kannel with this minimal but working configuration:
>
> group = core
> admin-port = 13000
> admin-password = admin
> smsbox-port = 13001
> dlr-storage = internal
>
> group = smsbox
> bearerbox-host = localhost
> smsbox-id = smsbox-0
> sendsms-port = 13013
>
> group = smsc
> smsc = fake
> smsc-id = smsc-0
> port = 10000
> connect-allow-ip = 127.0.0.1
>
> group = sendsms-user
> username = ""
> password = ""
> default-sender = +79314114119
>
> I need to receive messages via SMMP instead of HTTP. So I tried to
> install opensmppbox and add this lines to configuration:
>
> group = opensmppbox
> our-system-id = Inaccess
> opensmppbox-id = smppbox1
> opensmppbox-port = 13002
> smpp-logins = smpp-clients.conf
> bearerbox-host = 127.0.0.1
> bearerbox-port = 13000
>
> bearerbox can't start with it:
>
> 2012-09-07 16:08:12 [17154] [0] ERROR: Group 'opensmppbox' is no valid
> group identifier.
> 2012-09-07 16:08:12 [17154] [0] ERROR: Error found on line 29 of file
> `kannel.conf'.
> 2012-09-07 16:08:12 [17154] [0] PANIC: Couldn't read configuration
> from `kannel.conf'.
>
> So I need to create separate configuration files:
>
> $ cat opensmppbox.conf
> group = core
>
> group = opensmppbox
> our-system-id = Inaccess
> opensmppbox-id = smppbox-0
> opensmppbox-port = 13002
> smpp-logins = smpp-clients.conf
> bearerbox-host = 127.0.0.1
> bearerbox-port = 13000
> #log-file = log/opemsmppbox.log
>
> $ cat smpp-clients.conf
> test test test *.*.*.*
>
> Space after 'group = core' and commented log-file are mandatory. I
> can't run opensmppbox without it with different strange errors:
>
> 2012-09-07 16:22:30 [17257] [0] WARNING: DLR: using default 'internal'
> for storage type.
> 2012-09-07 16:22:30 [17257] [0] INFO: DLR using storage type: internal
> 2012-09-07 16:22:30 [17257] [0] WARNING: opensmmpbox: DLR: using
> default 'internal' for storage type.
> 2012-09-07 16:22:30 [17257] [0] PANIC: opensmppbox: DLR: storage type
> 'internal' don't implement needed functions
> 2012-09-07 16:22:30 [17257] [0] PANIC:
> /usr/sbin/opensmppbox(gw_backtrace+0xbe) [0x80960be]
> 2012-09-07 16:22:30 [17257] [0] PANIC:
> /usr/sbin/opensmppbox(gw_panic+0xd3) [0x80961a3]
> 2012-09-07 16:22:30 [17257] [0] PANIC:
> /usr/sbin/opensmppbox(box_dlr_init+0x208) [0x8052d58]
> 2012-09-07 16:22:30 [17257] [0] PANIC:
> /usr/sbin/opensmppbox(main+0xd7f) [0x805a04f]
> 2012-09-07 16:22:30 [17257] [0] PANIC:
> /lib/libc.so.6(__libc_start_main+0xe6) [0xb726fc96]
> 2012-09-07 16:22:30 [17257] [0] PANIC: /usr/sbin/opensmppbox() [0x80514a1]
>
> or:
>
> 2012-09-07 16:23:25 [17260] [0] PANIC: DLR: can't find group core
> 2012-09-07 16:23:25 [17260] [0] PANIC:
> /usr/sbin/opensmppbox(gw_backtrace+0xbe) [0x80960be]
> 2012-09-07 16:23:25 [17260] [0] PANIC:
> /usr/sbin/opensmppbox(gw_panic+0xd3) [0x80961a3]
> 2012-09-07 16:23:25 [17260] [0] PANIC:
> /usr/sbin/opensmppbox(dlr_init+0x24c) [0x805affc]
> 2012-09-07 16:23:25 [17260] [0] PANIC:
> /usr/sbin/opensmppbox(main+0xd73) [0x805a043]
> 2012-09-07 16:23:25 [17260] [0] PANIC:
> /lib/libc.so.6(__libc_start_main+0xe6) [0xb72c4c96]
> 2012-09-07 16:23:25 [17260] [0] PANIC: /usr/sbin/opensmppbox() [0x80514a1]
>
> I tried to send test SMPP message after running opensmppbox with this perl
> code:
>
> use Net::SMPP;
>
> my $smpp = Net::SMPP->new_transmitter('localhost',
>         port => 13002,
>         system_id => 'test',
>         password  => 'test'
> ) or die;
>
> $smpp->submit_sm(
>     destination_addr => '+44206064379',
>     short_message    => 'Test Message'
> ) or die;
>
> $smpp->unbind();
>
> Results are strange:
>
> 2012-09-07 16:28:30 [17276] [0] DEBUG: Started thread 1
> (opensmppbox.c:function)
> 2012-09-07 16:28:30 [17276] [1] DEBUG: Thread 1
> (opensmppbox.c:function) maps to pid 17276.
> 2012-09-07 16:28:30 [17276] [1] INFO: Client connected from <127.0.0.1>
> 2012-09-07 16:28:30 [17276] [1] DEBUG: Connecting to <127.0.0.1>
> 2012-09-07 16:28:30 [17276] [1] INFO: Connected to bearerbox at
> 127.0.0.1 port 13000.
> 2012-09-07 16:28:30 [17276] [1] DEBUG: Started thread 2
> (opensmppbox.c:smpp_to_bearerbox)
> 2012-09-07 16:28:30 [17276] [1] ERROR: opensmppbox: bearerbox_to_smpp:
> thread starts
> 2012-09-07 16:28:30 [17276] [2] DEBUG: Thread 2
> (opensmppbox.c:smpp_to_bearerbox) maps to pid 17276.
> 2012-09-07 16:28:30 [17276] [2] ERROR: opensmppbox: smpp_to_bearerbox:
> thread starts
> 2012-09-07 16:28:30 [17276] [2] DEBUG: SMPP[(null)]: Got PDU:
> 2012-09-07 16:28:30 [17276] [2] DEBUG: SMPP PDU 0x81fd7f0 dump:
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   type_name: bind_transmitter
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   command_id: 2 = 0x00000002
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   command_status: 0 = 0x00000000
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   sequence_number: 1 = 0x00000001
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   system_id: "test"
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   password: "test"
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   system_type: NULL
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   interface_version: 52 = 0x00000034
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   addr_ton: 0 = 0x00000000
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   addr_npi: 0 = 0x00000000
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   address_range: NULL
> 2012-09-07 16:28:30 [17276] [2] DEBUG: SMPP PDU dump ends.
> 2012-09-07 16:28:30 [17276] [2] DEBUG: SMPP[(null)]: Sending PDU:
> 2012-09-07 16:28:30 [17276] [2] DEBUG: SMPP PDU 0x81fe900 dump:
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   type_name: bind_transmitter_resp
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   command_id: 2147483650 =
> 0x80000002
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   command_status: 13 = 0x0000000d
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   sequence_number: 1 = 0x00000001
> 2012-09-07 16:28:30 [17276] [2] DEBUG:   system_id: NULL
> 2012-09-07 16:28:30 [17276] [2] DEBUG: SMPP PDU dump ends.
> 2012-09-07 16:28:31 [17276] [2] DEBUG: SMPP[(null)]: Got PDU:
> 2012-09-07 16:28:31 [17276] [2] DEBUG: SMPP PDU 0x81fd7f0 dump:
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   type_name: submit_sm
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   command_id: 4 = 0x00000004
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   command_status: 0 = 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   sequence_number: 2 = 0x00000002
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   service_type: NULL
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   source_addr_ton: 0 = 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   source_addr_npi: 0 = 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   source_addr: NULL
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   dest_addr_ton: 0 = 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   dest_addr_npi: 0 = 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   destination_addr: "+44206064379"
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   esm_class: 0 = 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   protocol_id: 0 = 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   priority_flag: 0 = 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   schedule_delivery_time: NULL
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   validity_period: NULL
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   registered_delivery: 0 =
> 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   replace_if_present_flag: 0 =
> 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   data_coding: 0 = 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   sm_default_msg_id: 0 = 0x00000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   sm_length: 12 = 0x0000000c
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   short_message: "Test Message"
> 2012-09-07 16:28:31 [17276] [2] DEBUG: SMPP PDU dump ends.
> 2012-09-07 16:28:31 [17276] [2] DEBUG: SMPP[(null)]: Sending PDU:
> 2012-09-07 16:28:31 [17276] [2] DEBUG: SMPP PDU 0x8200aa8 dump:
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   type_name: generic_nack
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   command_id: 2147483648 =
> 0x80000000
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   command_status: 14 = 0x0000000e
> 2012-09-07 16:28:31 [17276] [2] DEBUG:   sequence_number: 2 = 0x00000002
> 2012-09-07 16:28:31 [17276] [2] DEBUG: SMPP PDU dump ends.
> < long wait about 1 minute or more >
> ...
> 2012-09-07 16:29:34 [17276] [1] ERROR: Connection closed by the bearerbox.
> 2012-09-07 16:29:34 [17276] [1] ERROR: Connection closed by the bearerbox.
> 2012-09-07 16:29:34 [17276] [1] ERROR: Connection closed by the bearerbox.
> ...
>
> In bearerbox console I see:
>
> 2012-09-07 16:28:30 [17161] [2] DEBUG: HTTP: Creating HTTPClient for
> `127.0.0.1'.
> 2012-09-07 16:28:30 [17161] [2] DEBUG: HTTP: Created HTTPClient area
> 0x81b0268.
> < long wait about 1 minute or more >
> 2012-09-07 16:29:30 [17161] [1] DEBUG: Timeout for fd:29 appears.
> 2012-09-07 16:29:30 [17161] [1] DEBUG: HTTP: Destroying HTTPClient
> area 0x81b0268.
> 2012-09-07 16:29:30 [17161] [1] DEBUG: HTTP: Destroying HTTPClient for
> `127.0.0.1'.
>
> In perl console I see:
>
> $ ./send.pl
> < long wait about 1 minute or more >
> premature eof reading from socket at /usr/share/perl5/Net/SMPP.pm line
> 2398.
> Died at ./send.pl line 14.
>
> What's wrong with my configuration or code?
>
> --
> Regards,
> Eugene Prokopiev
>
>

Reply via email to