Re: Source address auto detect for short code

2015-10-14 Thread Andreas Fink
you can set ton/npi in the config file. its not a good idea to hardcode this 
into the binary as it would dissalow you to send international originating SMS 
for non shortcode.

> On 14 Oct 2015, at 14:20, Ahmed Shabana  wrote:
> 
> Dears at kannel devel mailing list ,
> 
> Have a nice day ,
> 
> Some of our SMPP SMSC provider ( specially Orange ) , claim that submitting 
> short code sender for MT SMSs must be follow below npi & ton value
> 
> I add below patch , and it working well . feel free to commit it to the trunk 
> if you need , or keep it in the mail list as a reference for others .
> 
> 
> Index: gw/smsc/smsc_smpp.c
> ===
> --- gw/smsc/smsc_smpp.c (revision 5110)
> +++ gw/smsc/smsc_smpp.c (working copy)
> @@ -82,6 +82,8 @@
>  #include "load.h"
> 
>   #define SMPP_DEFAULT_CHARSET "UTF-8"
>   +#define SHORT_CODE_MAX_LEN 0x06
>   +#define SHORT_CODE_MIN_LEN 0x04
> 
>/*
>  * Select these based on whether you want to dump SMPP PDUs as they are
> @@ -892,8 +894,11 @@
>   } else if 
> (charset_convert(pdu->u.submit_sm.source_addr, SMPP_DEFAULT_CHARSET, 
> octstr_get_cstr(smpp->alt_addr_charset)) != 0)
>   error(0, "Failed to convert source_addr from 
> charset <%s> to <%s>, will send as is.",
> SMPP_DEFAULT_CHARSET, 
> octstr_get_cstr(smpp->alt_addr_charset));
> -}
> -}
> +}
> +}else if(octstr_len(pdu->u.submit_sm.source_addr) < 
> SHORT_CODE_MAX_LEN && octstr_len(pdu->u.submit_sm.source_addr) > 
> SHORT_CODE_MIN_LEN){
> +   pdu->u.submit_sm.source_addr_ton = 
> GSM_ADDR_TON_ABBREVIATED ;
> +pdu->u.submit_sm.source_addr_npi = 
> GSM_ADDR_NPI_UNKNOWN ;
> +   }
> }
>   }



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: patch to allow data_coding to be set to 3

2015-10-08 Thread Andreas Fink

> On 08 Oct 2015, at 14:04, Hillel  wrote:
> 
> Hi Alex and Andreas,
> 
> Vodacom says send Latin-1 characters and set your data_coding field to 3 to 
> tell the SMSC to translate the characters from Latin-1 to GSM. So that if we 
> want to display the curly bracket ‘}’ you have to send the escape character 
> and the round bracket character: ESC + )  Data values:0x1B 0x29 and on the 
> phone you will see curly bracket ‘}’
> 

this is clearly non standard and it is not Latin1 neither. if you send } in 
UTF8 or latin1 into kannel then kannel will send 1B 29 on SMPP as thats the 
correct representaition in GSM cahracter set (DCS=0)

> How do you send this via Kannel if we can’t touch  the data_coding field?

you send "}" and kannel does the magic. You can see this in a tcpump or a 
kannel bearerbox core logfile (set log-level=0) in the submit_sm statement.

> If we can't send this correctly via Kannel to Vodacom SIM cards, will you 
> allow Kannel users to set the data_coding field?. (This means also allowing 
> the Kannel user to bypass the internal Kannel conversion so you can send 0x1B 
> 0x29 and the external SMSC will convert it to the curly bracket ‘} )

thats happening if you send =0=}

> 
> Below is our attempt to send the curly bracket ‘}’ if we can get this to work 
> we should be able to send all the other characters that are like this.
> If you see http://www.developershome.com/sms/gsmAlphabet.asp 
> 
> Right curly bracket is Hex 1B29 for GSM 7-bit default alphabet and 7D for ISO 
> 8859 Latin 1
> 
> lynx -dump 
> "http://41.185.24.138:13013/cgi-bin/sendsms?username=x=y=27831234567=%7D=27821278120=vodacom
>  
> 
>  "
> 
> In Smsbox it comes out as Right curly bracket:
> 2015-10-08 10:37:32 [28232] [3] INFO: sendsms sender: 
> to:<27831234567> msg:<}>
> 


> In Bearerbox it comes out as Right curly bracket:
> 2015-10-08 10:37:32 [28165] [12] DEBUG: SMPP[vodacom]: Sending PDU:
> 2015-10-08 10:37:32 [28165] [12] DEBUG: SMPP PDU 0x7f10a4007020 dump:
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   type_name: submit_sm
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   command_id: 4 = 0x0004
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   command_status: 0 = 0x
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   sequence_number: 2309 = 0x0905
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   service_type: NULL
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   source_addr_ton: 1 = 0x0001
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   source_addr_npi: 1 = 0x0001
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   source_addr: "27821278120"
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   dest_addr_ton: 1 = 0x0001
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   dest_addr_npi: 1 = 0x0001
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   destination_addr: "27831234567"
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   esm_class: 3 = 0x0003
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   protocol_id: 0 = 0x
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   priority_flag: 0 = 0x
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   schedule_delivery_time: NULL
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   validity_period: "151011103732000+"
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   registered_delivery: 0 = 0x
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   replace_if_present_flag: 0 = 
> 0x
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   data_coding: 0 = 0x
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   sm_default_msg_id: 0 = 0x
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   sm_length: 1 = 0x0001
> 2015-10-08 10:37:32 [28165] [12] DEBUG:   short_message: "}"

you should look at the bytes of the "short_message" not the visual 
representation. The visual representation is } but the bytes should be 1b 29. 
Check that with wireshark.

It could probably mean that your linx command sends some odd character set 
encoding in the HTTP request. The HTTP header will specify in which character 
set the request is.
Or you have some kannel config option to nail it to a specific one. Try the 
same with a browser or wget to see if you have different results.

> 
> But, on the cell phone it comes out as Small letter n with tilde.  Which is 
> 7D for the GSM 7-bit default alphabet
> This means Kannel is converting the 7D to }
> But Vodacom is not converting the 7D to } , as its expects the data_coding to 
> be 3 and to receive ESC + ) i.e. Data values:0x1B 0x29  so the cell phone 
> gets the wrong character.
> 
> If we try another approach and send %1B%29 which is the Right curly bracket 
> in GSM 7-bit default alphabet we get ?)
> on the cell phone.
> From bearerbox:   short_message: "?)"
> 
> Is there any way to send this via Kannel with its current internal encoding?

what version of kannel are you using? do you have any settings concerning 
character set in your 

Re: patch to allow data_coding to be set to 3

2015-10-07 Thread Andreas Fink
theres no need for having the SMSC do the latin1 to GSM transcoding as kannel 
already does this.
you feed kannel with latin1 or utf8 and kannel will make GSM out of it 
automatically.

What matters at the end is what the handset receives and the GSM character set 
is hardcoded in billions of phones. You can not send latin1 to phones but you 
can send the GSM character set to phones which has a few more chars than IA5 by 
now (by the use of some escape sequence they added things like | { } if I 
remember correctly). And in GSM things are slightly differnet as @ for example 
is encoded as 0x00.

Kannel does the conversion from whatever you feed it with to the GSM character 
set. There is no need to set coding value for this. This is only needed if you 
want to send raw bytes to kannel (and thus disable the internal conversion) for 
example when you send binary data.

So the key is to have your character set properly set in your http request 
header. Kannel defaults to UTF8. So when you feed latin1 characters to kannel, 
they should be translated already correctly to GSM and have the DCS values set 
correctly.

Its nice that Vodacom's SMSC has a _proprietary_ extension to do the  
conversion in the SMSC but Kannel doesn't need it to operate correctly.

> On 07 Oct 2015, at 15:12, hbil...@ecommunicate.biz wrote:
> 
> Hi Alex,
> 
> From this thread that you responded to see
> http://www.kannel.org/pipermail/users/2012-April/017611.html and the current
> user guide, it seems Kannel has never allowed data_coding to be set to 3.
> See  the coding parameter in the current spec
> http://www.kannel.org/download/kannel-userguide-snapshot/userguide.html#AEN5
> 058
> Coding Accepts values 0 to 2, for 7bit, 8bit or UCS-2.
> 0 causes data_coding 0 (for 7bit), 1 causes data_coding 4 (for 8bit) and 2
> causes data_coding 8 (for UCS-2).
> 
> Vodacom SA which has the largest mobile network in SA, has said to send the
> Extended GSM characters, we need to use Latin-1 characters and set our
> data_coding field to 3 to tell the SMSC to translate the characters from
> Latin-1 to GSM. (Note that standard ASCII and IA5 is a sub set of Latin-1.)
> However, need to be able to send the extended GSM characters using 7 bits
> without using Unicode as otherwise each SMS would then only be 70 characters
> and our clients would require many more SMSs to send the same message.
> 
> Do you have a patch, that will allow Kannel users to set the coding
> parameter to 3?
> If not, would you be open to someone committing a patch for this?
> 
> Thanks for all the amazing work you do for Kannel.
> 
> Kind Regards
> 
> Hillel Bilman
> Manager eCommunicate
> mailto: hbil...@ecommunicate.co.za
> Cell: 083-232
> Landline: 011-443-6164
> Fax: 088-011-443-6164
> 
> Mobile Wallets  - .mobi Sites – Mobile Apps(Android, iPhone, Blackberry,
> Nokia) -  Premium Rated SMSs and short codes - SMS competitions and
> campaigns – Lead Generation - opt-in subscription Billing – MMS campaigns -
> USSD campaigns - WAP - Outlook SMS – Bulk SMS and Bulk Email – Email 2 SMS 2
> Email - Developer Kit for Mobile Services integration - Voice Over IP
> services
> 
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Bug in Kannel Response Status codes

2015-09-28 Thread Andreas Fink
one possible reason for this is that kannel has an alternate route.
how does your allowed-smsc-id / denied-smsc-id entries look like?

> On 28 Sep 2015, at 11:07, Kirti Mandwade  wrote:
> 
> 
> Hello All,
> 
> Kannel does not give expected status codes when an smsc is down, stopped or 
> removed.
> 
> Here is what I did.
> 1) I ran smsc-stop command :
> lynx -dump 
> "http://localhost:13000/stop-smsc?password=admin-password=smsc-name 
> "
> 
> 2)Then i tried sending SMS and it gave me
> 
> 202 Accepted status from Kannel
> 
> 3) In the bearer box it gave :
> WARNING: Cannot find SMSCConn for message to <27800...>, rejected.
> 2015-09-09 15:38:42 [20697] [13] DEBUG: SMSC[UNKNOWN]: creating DLR message
> 2015-09-09 15:38:42 [20697] [13] WARNING: Message rejected by bearerbox, no 
> router!
> 
> 
> Then tried smsc-remove command
>   lynx -dump 
> "http://localhost:13000/remove-smsc?password=admin-password=smsc-name 
> "
> 
> and sent message.
> 
> According to Kannel
> Kannel svn-r5114 User's Guide.
> 
>  
> <>http://www.kannel.org/download/kannel-userguide-snapshot/userguide.html#AEN910
>  
> 
> 
> I should have got -  202 3: Queued for later delivery
> 
> but I got 202 Accepted status with the same error in the bearerbox
> 
> After that I tried removing confirguration for the smsc from directory that 
> Kannel looks for from the include statement and restarted kannel and sent SMS
> 
> Even after that i got the same results 202 Accepted status from Kannel and 
> error in bearerbox.
> 
> 
> Kannel should not give Accepted status if that SMSC is stopped, removed or 
> does not exist but Kannel accepts it and rejects the message in bearerbox.
> If Kannel will not respond with any other status then no one can find out 
> that messages were not sent and smsc was down or does not exist.
> 
> Here is my redmine link
> https://redmine.kannel.org/issues/744 
> 
> Please look into this issue.
> 
> Regards
> Kirti
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Kannel and FreeBSD

2015-06-03 Thread Andreas Fink
kannel runs without any issues on FreeBSD and Darwin (OS X) which is derived 
from FreeBSD.
The errors you see in the log basically mean your sockent connection drops. 
This can be a HTTP/1.1 session which closes after timeout or a SMPP connection 
which disconnects due to being idle.

So nothing wrong so far.

 On 04 Jun 2015, at 01:56, Danilo Baio db...@bsd.com.br wrote:
 
 Hello.
 
 Recently was updated the package Kannel on FreeBSD ports.
 I am testing and it's working, but there are some messages on log like these:
 
 After a send by :13013/cgi-bin/sendsms
 
 == /var/log/kannel/smsbox.log ==
 2015-05-18 09:57:56 [9014] [1] ERROR: Error reading from fd 26:
 2015-05-18 09:57:56 [9014] [1] ERROR: System error 54: Connection reset by 
 peer
 2015-05-18 09:57:56 [9014] [1] ERROR: Error reading from fd 27:
 2015-05-18 09:57:56 [9014] [1] ERROR: System error 54: Connection reset by 
 peer
 
 == /var/log/kannel/bearerbox.log ==
 2015-05-18 09:59:25 [9004] [1] ERROR: Error reading from fd 34:
 2015-05-18 09:59:25 [9004] [1] ERROR: System error 54: Connection reset by 
 peer
 
 
 -
 [Kannel /status]
 
 Kannel bearerbox version `1.4.4'. Build `May 18 2015 09:44:53', compiler 
 `4.8.4'. System FreeBSD, release 10.1-RELEASE-p9, version FreeBSD 
 10.1-RELEASE-p9 #0: Tue Apr 7 01:09:46 UTC 2015 
 r...@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC, machine 
 amd64. Hostname .my.hostname, IP X.X.X.X. Libxml version 2.9.2. Using 
 OpenSSL 1.0.1l-freebsd 15 Jan 2015. Compiled with MySQL 5.5.43, using MySQL 
 5.5.43. Using native malloc.
 
 Status: running, uptime 0d 0h 8m 10s
 
 WDP: received 0 (0 queued), sent 0 (0 queued)
 
 SMS: received 0 (0 queued), sent 3 (0 queued), store size -1
 SMS: inbound (0.00,0.00,0.00) msg/sec, outbound (0.02,0.01,0.01) msg/sec
 
 DLR: received 0, sent 0
 DLR: inbound (0.00,0.00,0.00) msg/sec, outbound (0.00,0.00,0.00) msg/sec
 DLR: 0 queued, using mysql storage
 
 Box connections:
 smsbox:smsbox, IP 127.0.0.1 (0 queued), (on-line 0d 0h 8m 7s)
 SMSC connections:
 smsc[smsc]SMPP:smpp3.:/::smpp (online 489s, 
 rcvd: sms 0 (0.00,0.00,0.00) / dlr 0 (0.00,0.00,0.00), sent: sms 3 
 (0.02,0.01,0.01) / dlr 0 (0.00,0.00,0.00), failed 0, queued 0 msgs)
 -
 
 This is my config file:
 http://dbaio.bs2cloud.com.br/kannel/kannel.conf.txt 
 http://dbaio.bs2cloud.com.br/kannel/kannel.conf.txt
 
 Log files with debug:
 http://dbaio.bs2cloud.com.br/kannel/bearerbox.log 
 http://dbaio.bs2cloud.com.br/kannel/bearerbox.log
 http://dbaio.bs2cloud.com.br/kannel/smsbox.log 
 http://dbaio.bs2cloud.com.br/kannel/smsbox.log
 
 
 I know that Kannel is main developed on Linux Systems but FreeBSD is also a 
 good plataform and used by many of kannel users.
 
 If anyone else could have a try on this platform it will be great.
 
 Thanks for your time.
 
 Best Regards.
 --
 Danilo G. Baio (dbaio)



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Getting transaction ID

2014-12-07 Thread Andreas Fink

 On 08 Dec 2014, at 07:32, Rao, Anil Kumar Brihmavar 
 anilkumar_...@intuit.com wrote:
 
 Hello,
 
  I am using Kannel Gateway to push SMS messages from my app server to CIMD2 
 SMSC. I have following questions.
 Currently I am using the http protocol format to push messages ( 
 http://localhost:13013/cgi-bin/sendsms?username=user111password=pass111to=8095017152text=test%20message
  ). I would like to keep a connection pool, would like to receive the 
 transaction ID then also have unicode support. What should I do for these ?

Ask for delivery reports. This will call you back with the information from the 
SMSC. See user's guide.
 My Kannel server is not taking http based request (using the above URL 
 format) coming from outside. What should I do to get this resolved ? Is there 
 a parameter to set up ?

under section
group = sendsms-user
check for user-allow-ip not being present or set to *.*.*.*

 
 Regards
 Anil K Rao
 
 Architect – txtWeb
 anilkumar_...@intuit.com mailto:anilkumar_...@intuit.com
 +91 8050 110011(Mobile)
 +91 8041 56184(Desk)
 
 Shortest path to information ? Short code 51115 is the answer.
 
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Incorrect DLR mapping in kannel 1.5.0

2014-11-24 Thread Andreas Fink
Dear Tanja

Please dont post to multiple mailing lists at the same time.

I looked at your traceilfe  20.11.2014_11_48_08:
There’s a few things which are abnormal.

originator is empty (0x00)
destination is alphanumeric “38970ZZ”

in a DLR the originator and destination should match the original SMS send but 
be swapped in direction
Above would mean that the originator alphanumeric sender “38970ZZ send a 
message to a non existing number 0x00. That doesn’t make sense.


The SMSC identifier is FF05551a6099 which hints a 32bit/64bit integer 
conversion with negative numbers could be lurking around the corner.
This is a valid identifier but maybe not the one you originally got when 
sending the message. You should check the submit_sm_ack which matches that 
specific message to see what’s returned there. if its the same then its ok.

the status says the messasge is EXPIRED.
the network error code is 0x600 as GSM error type. However GSM-MAP doesn’t have 
such an error code. If the bits are considered as little endian instead of big 
endian, then the error code would be 06 which is absent subscriber which would 
at least make some sense.

the message indicated is not in the DLR text below. Kannel can not find this 
message as it uses message-id (also known as “timestamp”) + destination number 
to match it in the DLR database but there is no such entry (unless you send to 
a empty number).
I would question the implementation of the SMSC you are connecting to.




 On 24 Nov 2014, at 11:11, Tanja Kipreska tanja.kipre...@gmail.com wrote:
 
 First 3 DLRs were with status=1(DELIVERED) and the 4th DLR was with status=2 
 (EXPIRED). Here are access.log details for the MSISDN I've tested with:
  2014-11-20 11:21:11 Sent SMS [SMSC:smsc4.7] [SVC:bulk] [ACT:] [BINF:] 
 [FID:9223372036854775807] [META:] [from:ONE] [to:076514006] 
 [flags:1:0:-1:-1:3] [msg:15:Test za DLR ONE]  [udh:0:]
 2014-11-20 11:23:17 Receive DLR [SMSC:smsc4.7] [SVC:bulk] [ACT:vasgw] [BINF:] 
 [FID:9223372036854775807] [META:?smpp?dlr_err=%03%00%00] [from:ONE] 
 [to:076514006] [flags:-1:-1: -1:-1:1] 
 [msg:126:id:ff02553314cb sub:001 dlvrd:001 submit date:1411201123 done 
 date:1411201123 stat:DELIVRD err:0 text:message Pocituvani t] [udh:0:]
 2014-11-20 11:36:46 Sent SMS [SMSC:smsc4.7] [SVC:bulk] [ACT:] [BINF:] 
 [FID:9223372036854775807] [META:] [from:ONE] [to:076514006] 
 [flags:1:0:-1:-1:3] [msg:15:Test za DLR ONE]  [udh:0:]
 2014-11-20 11:37:16 Receive DLR [SMSC:smsc4.7] [SVC:bulk] [ACT:vasgw] [BINF:] 
 [FID:9223372036854775807] [META:?smpp?dlr_err=%03%00%00] [from:ONE] 
 [to:076514006] [flags:-1:-1: -1:-1:1] 
 [msg:126:id:ff0455332830 sub:001 dlvrd:001 submit date:1411201137 done 
 date:1411201137 stat:DELIVRD err:0 text:message Pocituvani t] [udh:0:]
 2014-11-20 11:39:53 Sent SMS [SMSC:smsc4.7] [SVC:bulk] [ACT:] [BINF:] 
 [FID:9223372036854775807] [META:] [from:ONE] [to:076514006] 
 [flags:1:0:-1:-1:3] [msg:15:Test za DLR ONE]  [udh:0:]
 2014-11-20 11:40:13 Receive DLR [SMSC:smsc4.7] [SVC:bulk] [ACT:vasgw] [BINF:] 
 [FID:9223372036854775807] [META:?smpp?dlr_err=%03%06%00] [from:ONE] 
 [to:076514006] [flags:-1:-1: -1:-1:1] 
 [msg:126:id:ff082e0a7867 sub:001 dlvrd:001 submit date:1411200908 done 
 date:1411201140 stat:DELIVRD err:0 text:message Pocituvani t] [udh:0:]
 2014-11-20 11:40:54 Sent SMS [SMSC:smsc4.7] [SVC:bulk] [ACT:] [BINF:] 
 [FID:9223372036854775807] [META:] [from:ONE] [to:076514006] 
 [flags:1:0:-1:-1:3] [msg:15:Test za DLR ONE]  [udh:0:]
 2014-11-20 11:48:08 Receive DLR [SMSC:smsc4.7] [SVC:bulk] [ACT:vasgw] [BINF:] 
 [FID:9223372036854775807] [META:?smpp?dlr_err=%03%06%00] [from:ONE] 
 [to:076514006] [flags:-1:-1: -1:-1:2] 
 [msg:127:id:ff05551a6099 sub:001 dlvrd:001 submit date:1411151148 done 
 date:1411201148 stat:EXPIRED err:58 text:message Pocituvani t] [udh:0:]
 
 I am forwarding you details, SMPP deliver_sm PDUs received from the SMSC, 
 that kannel mapped into last 3 DLRs shown above. As you can see from the 
 attached traces, DLRs are intended for completely different initiated SMSes 
 (they have different originating and destination addresses). Please note that 
 traces(tcdumps) are taken from the production environment (having commercial 
 MSISDNs)thus i had to obfuscate them in the provided traces.
 
 At your disposal for further clarifications,
 Tanja
 
 On Mon, Nov 24, 2014 at 9:19 AM, Christopher Burke 
 christopher.bu...@simulity.com mailto:christopher.bu...@simulity.com 
 wrote:
 When the DLR-URL was called 4 times, what was the status of the DLR 
 (ACCEPTED/DELIVRD/ERROR etc). I suspect you’ll need to provide logs  
 configuration for additional assistance.
 
 Cheers,
 Christopher Burke
 http://simulity.com http://simulity.com/
 Office: +44 (0) 1248 679 281 tel:%2B44%20%280%29%201248%20679%20281
 Fax: +44 (0) 1248 660 323 tel:%2B44%20%280%29%201248%20660%20323
 

Re: Adding epoll support to Kannel

2014-11-14 Thread Andreas Fink
the question to ask is what kind of problem are we trying to solve?

I could imagine having a SMPP driver which has one thread reading all the 
incoming packets by sitting on a single poll call dealing with all the 
connections in parallel. This reduces the amount of threads but it also 
increases the workload per thread up to the extent that multi core CPU's would 
be not so efficiently used. It depends a lot on the environment you are in as 
well. So far I have not see any performance issues with Kannel and its 
threading model.

Also epoll is not supported on my favourite operating system and seems to exist 
only under Linux.

 Am 14.11.2014 um 22:27 schrieb Porter, Kelvin R. kelvin.por...@h3net.com:
 
 Hi,
 
 Epoll generally adds a lot of complexity.  Generally, using epoll implies 
 thread-pooling, use of semaphores, etc.  Is this consideration being driven 
 by profiling indicating that the processes are somehow being thread-bound?  
 Or some other consideration?
 
 Regards,
 
 Kelvin R. Porter
 
 -Original Message-
 From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Donald Jackson
 Sent: Friday, November 14, 2014 3:21 PM
 To: kannel_dev_mailinglist
 Subject: Adding epoll support to Kannel
 
 Hi all,
 
 Do any of you have any comments or concerns about potentially adding epoll 
 support to Kannel ?
 
 I think long term this could be used for better connection management rather 
 than the 'connection per thread' approach we currently make use of (mostly).
 
 Cheers,
 Donald
 




Andreas Fink

CEO DataCell ehf
CEO Backbone ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.datacell.com, www.backbone.is, www.finkconsulting.com www.fink.org
---
Jabber/XMPP: andr...@fink.org
ICQ: 8239353 Skype: andreasfink






signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Proposal: a more powerful SQL DLR storage

2014-11-07 Thread Andreas Fink
the purpose of the persistent storage is for temporary usage as DLR's can refer 
to SMS which have been sent a couple of days ago.
the DLR storage you want is what delivery reports are meant for and those are 
transmitted to the user requesting it
In addition to that the access logs already contains this data.
It would probably make more sense to offer a access log into SQL driver than to 
abuse the internal state cache mechanism.

 Am 07.11.2014 um 10:34 schrieb Vincenzo Romano vincenzo.rom...@notorand.it:
 
 Introduction
 Kannel has the ability to store the SMS DLRs also in SQL tables.
 The main aim for this is to provide for storage persistence against
 system crashes.
 For this reason a DB table is configured where kannel will insert
 details for submitted SMSs.
 Later, upon reaching the final status, those data will be searched and 
 deleted.
 
 Motivation
 This feature can be made more powerful with little changes to the system.
 Basically it's all about replacing the deletion with insertion at
 every single status change.
 This would create a SMS status history from which the user can
 extract an amount of useful information that's otherwise lost.
 
 Implementation
 On the software side of the feature, the code in gw/dlr.c needs to be
 changed in order to replace the calls to method dlr_remove with
 dlr_insert (or even dlr_update ).
 The underlying table needs to be supplemented at least with a real
 timestamp column (automatically calculated at every insertion) in
 order to retrieve either the latest status update or the initial
 details thanks to the ORDER BY predicate in either ASCending or
 DESCending direction.
 The actual queries used in dlr_*.c should also be reviewed in order to
 reflect thes changes, even if that can be avoided with intervention in
 the SQL with VIEWs and TRIGGERs.
 
 Note
 I recently started a thread on this topic in the users mailing list.
 It can be viewed here:
 http://www.kannel.org/pipermail/users/2014-November/021632.html
 And I have no idea on how the development organisation is done in Kannel.
 
 
 Thanks for the patience. Any feedback will be welcomed.
 




Andreas Fink

CEO DataCell ehf
CEO Backbone ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.datacell.com, www.backbone.is, www.finkconsulting.com www.fink.org
---
Jabber/XMPP: andr...@fink.org
ICQ: 8239353 Skype: andreasfink 






Re: +CME ERROR: Lower layer falure (SMS) While SEnding SMS using Kannel

2014-11-01 Thread Andreas Fink
 to connect SIMCOM SIM900A, it doesn't detect by 
 wvdialconf..What will be the reason..?
 Please help me..
 




Andreas Fink

CEO DataCell ehf
CEO Backbone ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.datacell.com, www.backbone.is, www.finkconsulting.com www.fink.org
---
Jabber/XMPP: andr...@fink.org
ICQ: 8239353 Skype: andreasfink 






Re: DLR Error Code

2014-11-01 Thread Andreas Fink
this error is sent to you by the SMSC. You have to ask your supplier what this 
error means. Kannel is only transporting it through.

 Am 01.11.2014 um 07:52 schrieb Joy Larnyoh jilarn...@nalosolutions.com:
 
 Dear All,
 
 Below is a sample DLR:
 msg:122:id:0142620394 sub:000 dlvrd:000 submit date:1411010631 done 
 date:1411010631 stat:UNDELIV err:602
 
 Grateful if you can assist with a full list of these error codes. Example in 
 this case is err:602
 
 Best Regards
 
 Joy Ivan 
 




Andreas Fink

CEO DataCell ehf
CEO Backbone ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.datacell.com, www.backbone.is, www.finkconsulting.com www.fink.org
---
Jabber/XMPP: andr...@fink.org
ICQ: 8239353 Skype: andreasfink 






Re: Initialization of device failed Error While connecting Kannel with GSM modem

2014-10-20 Thread Andreas Fink
this part hints that AT+IFC=2,2 does stop the modem from sending the data to 
your computer because the hardware handshake wires (RTS/CTS) are not connected 
and thus the modem waits on the computer to become available.

 Am 21.10.2014 um 05:54 schrieb Anjaly Kurian anjalykurian1...@yandex.com:
 
 2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: -- AT+IFC=2,2^M
 2014-10-21 09:00:44 [5744] [6] INFO: AT2[simcom]: cannot enable hardware 
 handshake




Andreas Fink




Re: Initialization of device failed Error While connecting Kannel with GSM modem

2014-10-20 Thread Andreas Fink
this is a hardware issue, not a software issue. Fix your serial port cable.

 Am 21.10.2014 um 06:59 schrieb Anjaly Kurian anjalykurian1...@yandex.com:
 
 Hi
 Thanks for your reply sir. How to solve this problem? Is it require to change 
 the configuration..?Please help me sir..
 -- 
 With regards,
 Anjaly Kurian
 
 21.10.2014, 08:44, Andreas Fink af...@list.fink.org:
 this part hints that AT+IFC=2,2 does stop the modem from sending the data to 
 your computer because the hardware handshake wires (RTS/CTS) are not 
 connected and thus the modem waits on the computer to become available.
 
 Am 21.10.2014 um 05:54 schrieb Anjaly Kurian anjalykurian1...@yandex.com:
 
 2014-10-21 09:00:37 [5744] [6] DEBUG: AT2[simcom]: -- AT+IFC=2,2^M
 2014-10-21 09:00:44 [5744] [6] INFO: AT2[simcom]: cannot enable hardware 
 handshake
 
 Andreas Fink
 
 -- 
 With regards,
 Anjaly Kurian




Andreas Fink

CEO DataCell ehf
CEO Backbone ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.datacell.com, www.backbone.is, www.finkconsulting.com www.fink.org
---
Jabber/XMPP: andr...@fink.org
ICQ: 8239353 Skype: andreasfink 






Re: Double hostname in DLR URL

2014-08-18 Thread Andreas Fink
No. but the problem is gone after a clean rebuild somehow.
very strange...

On 18 Aug 2014, at 13:58, Alexander Malysh amal...@kannel.org wrote:

 Hi Andreas,
 
 did you find anything? I never saw this on our side.
 
 Alex
 
 Am 27.07.2014 um 23:02 schrieb Andreas Fink af...@list.fink.org:
 
 Hi folks,
 
 I run into a very puzzling issue with the delivery of DLRs from Kannel.
 
 I have a script which submits SMS to kannel. This script constructs a DLR 
 URL like this:
 
 callback_url = 
 octstr_format(http://%s:%d/sms/response.php?priority=%d;,
  
 octstr_get_cstr(callback_host),
  
 (int)callback_port,ilm_prio);
  further parameters added...
 
 callback_host and callback_port are Octstr read from the config file and are 
 always constant. They do not contain spaces or any trailing tabs or the like
 Then this URL is urlencoded and passed on to the URL which is sent to kannel.
 Kannel is processing the request and comes back with a delivery report.
 The hostname passed is a straight IP address not a DNS name.
 
 
 This is the SMSBox Log on a DLR being sent back
 
 2014-07-27 20:27:06 [16079] [10] DEBUG:   Scheme: http://
 2014-07-27 20:27:06 [16079] [10] DEBUG:   Host: 10.195.198.70
 2014-07-27 20:27:06 [16079] [10] DEBUG:   Port: 80
 2014-07-27 20:27:06 [16079] [10] DEBUG:   Username: (null)
 2014-07-27 20:27:06 [16079] [10] DEBUG:   Password: (null)
 2014-07-27 20:27:06 [16079] [10] DEBUG:   Path: /sms/response.php
 2014-07-27 20:27:06 [16079] [10] DEBUG:   Query: {some parameters...}
 2014-07-27 20:27:06 [16079] [10] DEBUG:   Fragment: (null)
 2014-07-27 20:27:06 [16079] [10] DEBUG: HTTP: Reusing connection to 
 `10.195.198.70:80' (fd=31).
 2014-07-27 20:27:06 [16079] [10] DEBUG: Socket connected at once
 2014-07-27 20:27:06 [16079] [10] DEBUG: HTTP: Sending request:
 2014-07-27 20:27:06 [16079] [10] DEBUG: Octet string at 0x7f9dd3b00050:
 2014-07-27 20:27:06 [16079] [10] DEBUG:   len:  563
 2014-07-27 20:27:06 [16079] [10] DEBUG:   size: 1024
 2014-07-27 20:27:06 [16079] [10] DEBUG:   immutable: 0
 
 
 this is all correct so far and my script answers with a OK and 
 everything's fine.
 
 
 but then further down in the log I suddenly see this:
 
 
 2014-07-27 20:32:30 [16079] [10] DEBUG: Parsing URL `http://10.195.198.70, 
 10.195.198.70/sms/response.php?
 2014-07-27 20:31:03 [16079] [10] DEBUG:   Scheme: http://
 2014-07-27 20:31:03 [16079] [10] DEBUG:   Host: 85.195.198.70, 85.195.198.70
 2014-07-27 20:31:03 [16079] [10] DEBUG:   Port: 80
 2014-07-27 20:31:03 [16079] [10] DEBUG:   Username: (null)
 2014-07-27 20:31:03 [16079] [10] DEBUG:   Password: (null)
 2014-07-27 20:31:03 [16079] [10] DEBUG:   Path: /sms/response.php
 2014-07-27 20:31:03 [16079] [10] DEBUG:   Query: ...
 2014-07-27 20:31:03 [16079] [10] DEBUG:   Fragment: (null)
 2014-07-27 20:31:03 [16079] [10] ERROR: gethostbyname failed
 
 As you can see here, the IP address of the host is now twice in the hostname 
 and of course this is not resolvable.
 I verified and I am 100% sure that I pass it only once, not twice.
 And nothing changed between the first request and the second one.
 Its still the same running instance of my code calling kannel. Its still 
 passing the same DLR URL being passed.
 Its still the same smsbox running.
 
 Has anyone seen such issues before?
 Has there been any change in gwlib in regards to handling URL's?
 
 The version used is a SVN checkout from 24th of June.
 
 
 
 
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Double hostname in DLR URL

2014-07-27 Thread Andreas Fink
Hi folks,

I run into a very puzzling issue with the delivery of DLRs from Kannel.

I have a script which submits SMS to kannel. This script constructs a DLR URL 
like this:

callback_url = 
octstr_format(http://%s:%d/sms/response.php?priority=%d;,
 octstr_get_cstr(callback_host),
 (int)callback_port,ilm_prio);
further parameters added...

callback_host and callback_port are Octstr read from the config file and are 
always constant. They do not contain spaces or any trailing tabs or the like
Then this URL is urlencoded and passed on to the URL which is sent to kannel.
Kannel is processing the request and comes back with a delivery report.
The hostname passed is a straight IP address not a DNS name.


This is the SMSBox Log on a DLR being sent back

2014-07-27 20:27:06 [16079] [10] DEBUG:   Scheme: http://
2014-07-27 20:27:06 [16079] [10] DEBUG:   Host: 10.195.198.70
2014-07-27 20:27:06 [16079] [10] DEBUG:   Port: 80
2014-07-27 20:27:06 [16079] [10] DEBUG:   Username: (null)
2014-07-27 20:27:06 [16079] [10] DEBUG:   Password: (null)
2014-07-27 20:27:06 [16079] [10] DEBUG:   Path: /sms/response.php
2014-07-27 20:27:06 [16079] [10] DEBUG:   Query: {some parameters...}
2014-07-27 20:27:06 [16079] [10] DEBUG:   Fragment: (null)
2014-07-27 20:27:06 [16079] [10] DEBUG: HTTP: Reusing connection to 
`10.195.198.70:80' (fd=31).
2014-07-27 20:27:06 [16079] [10] DEBUG: Socket connected at once
2014-07-27 20:27:06 [16079] [10] DEBUG: HTTP: Sending request:
2014-07-27 20:27:06 [16079] [10] DEBUG: Octet string at 0x7f9dd3b00050:
2014-07-27 20:27:06 [16079] [10] DEBUG:   len:  563
2014-07-27 20:27:06 [16079] [10] DEBUG:   size: 1024
2014-07-27 20:27:06 [16079] [10] DEBUG:   immutable: 0


this is all correct so far and my script answers with a OK and everything's 
fine.


but then further down in the log I suddenly see this:


2014-07-27 20:32:30 [16079] [10] DEBUG: Parsing URL `http://10.195.198.70, 
10.195.198.70/sms/response.php?
2014-07-27 20:31:03 [16079] [10] DEBUG:   Scheme: http://
2014-07-27 20:31:03 [16079] [10] DEBUG:   Host: 85.195.198.70, 85.195.198.70
2014-07-27 20:31:03 [16079] [10] DEBUG:   Port: 80
2014-07-27 20:31:03 [16079] [10] DEBUG:   Username: (null)
2014-07-27 20:31:03 [16079] [10] DEBUG:   Password: (null)
2014-07-27 20:31:03 [16079] [10] DEBUG:   Path: /sms/response.php
2014-07-27 20:31:03 [16079] [10] DEBUG:   Query: ...
2014-07-27 20:31:03 [16079] [10] DEBUG:   Fragment: (null)
2014-07-27 20:31:03 [16079] [10] ERROR: gethostbyname failed

As you can see here, the IP address of the host is now twice in the hostname 
and of course this is not resolvable.
I verified and I am 100% sure that I pass it only once, not twice.
And nothing changed between the first request and the second one.
Its still the same running instance of my code calling kannel. Its still 
passing the same DLR URL being passed.
Its still the same smsbox running.

Has anyone seen such issues before?
Has there been any change in gwlib in regards to handling URL's?

The version used is a SVN checkout from 24th of June.






signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [PATCH] Generic TLV module functions - Re: UCP/EMI to support E50_HPLMN and E50_AC

2014-07-16 Thread Andreas Fink
While we think about changing tlv, we should also think about having a set of 
tlv which you can apply to a smsc.
In my case I have like 40 instances of the same SMSC and having 20 TLV configs 
for every smsc (as you specify smsc-id in it) is creating very long config 
files.

What about 

group = tlv
name = xxx
tag = xxx
length = xxx
type = INTEGER/OCTSTR/NULLTERMINATED
vendor-id = XXX


and then under SMSC

group = smpp
vendor-tlv = xxx...

this would automatically link a certain set of tlv's to a specific smpp.
not sure if protocol is really needed in the tlv in that case.


On 16 Jul 2014, at 17:35, Alexander Malysh amal...@kannel.org wrote:

 Hi,
 
 idea is good but TLV is SMPP specific IMHO. Therefore I would not expect this 
 as generic :-)
 
 Patch is hardcoded on many places. If you do it generic then please do it 
 instead of just to name it so.
 I would expect generic config groups that have proto inside of group and SMPP 
 PDU just
 fetch with constant they part instead of oct_imm(smpp-tlv).
 
 so the group would be:
 
 group = tlv  (Hier we have to think about better name, TLV is confusing)
 protocol = smpp/ucp/cimd2
 name = xxx
 tag = xxx
 length = xxx
 type = INTEGER/OCTSTR/NULTERMINATED
 smsc-id = xxx;xxx1
 
 Then SMPP PDU will just fetch by proto:
 
 generic_tlv_get_by_tag(TLV_PROTO_SMPP, smsc_id, tag);
 
 
 And please avoid using typedefs it's really bad style: 
 http://discuss.fogcreek.com/joelonsoftware1/default.asp?cmd=showixPost=10506
 
 Alex
 
 Am 16.07.2014 um 16:40 schrieb Stipe Tolj st...@kannel.org:
 
 Am 10.07.2014 19:59, schrieb marc-andre.gat...@gameloft.com:
 Hi,
 
 I'm using the meta-data to get the E50_HPLMN and set the E50_AC.
 
 here's the patch to support that for the EMI protocol. If you guys have
 a better way of doing so please feel free to give me a hint.
 
 I'd like to apply the patch in the main repo asap.
 
 Hi Mark,
 
 thanks a lot for the patch, we appreciate your willingness to contribute.
 
 In fact I had this being tackled in a more generic way, pulling the SMPP TLV 
 code out of the SMPP specific modules into a generic gw/generic_tlv.[ch] 
 module that can be used by any SMSC module.
 
 Please find it attached to this mail for review and voting for commiting to 
 svn trunk. (Though, this WILL go into svn post 1.4.4-stable release).
 
 The SMPP module is modified accordingly, along with additions for CIMD2. I'm 
 sure you will be able to add EMI/UCP too using the same function set.
 
 Stipe
 
 -- 
 ---
 Kölner Landstrasse 419
 40589 Düsseldorf, NRW, Germany
 
 Kannel Foundation tolj.org system architecture
 http://www.kannel.org/http://www.tolj.org/
 
 mailto:stolj_{at}_kannel.org  mailto:st_{at}_tolj.org
 ---
 gateway-generic-tlv.diff
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Throttling Error

2014-07-03 Thread Andreas Fink
there is nothing to be done about this. Kannel does stop sending if it gets a 
throttling error and resumes a little bit later.
This is part of the protocol and does not require any further config settings

On 03 Jul 2014, at 05:08, Алексей Мальгин alexey.mal...@gmail.com wrote:

 Hello,
  
 We need help with processing  Throttling Error. SMSC requires us to wait 60 
 seconds and resend request. Can you help us to setup kannel well? Our config 
 in attachment. Is it possible?
  
 We use Kannel 1.5.0 with sqlbox, smpp 3.4.
 sqlbox.confkannel.conf



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Throttling Error

2014-07-03 Thread Andreas Fink
This is the expected behaviour. It will retry a few seconds later.
You can see in the log that after every throttling error you got, it stops 
sending for 2 seconds.

On 03 Jul 2014, at 09:44, Алексей Мальгин alexey.mal...@gmail.com wrote:

 Thanks for the response!
  
  there is nothing to be done about this. Kannel does stop sending if it gets 
  a throttling error and resumes a little bit later.
  This is part of the protocol and does not require any further config 
  settings
  
 But it has not stopped sending. It's just resends PDU later, but still 
 sending new submit_sm for other messages. See attached log, please.
  
  Yup. Alexey, you should contact your SMSC operator and ask them to modify 
  throttling limit for you to reflect your needs. (e.g. at least 
  10sms/second).
  
 It’s test connection with new SMSC. It has limit 20 sms per minute in test 
 mode.
  
  
 From: spameden [mailto:spame...@gmail.com] 
 Sent: Thursday, July 03, 2014 1:45 PM
 To: Andreas Fink
 Cc: Алексей Мальгин; devel Devel
 Subject: Re: Throttling Error
  
  
  
 
 2014-07-03 10:16 GMT+04:00 Andreas Fink af...@list.fink.org:
 there is nothing to be done about this. Kannel does stop sending if it gets a 
 throttling error and resumes a little bit later.
 This is part of the protocol and does not require any further config settings
  
 Yup. Alexey, you should contact your SMSC operator and ask them to modify 
 throttling limit for you to reflect your needs. (e.g. at least 10sms/second). 
  
 On 03 Jul 2014, at 05:08, Алексей Мальгин alexey.mal...@gmail.com wrote:
  
 Hello,
  
 We need help with processing  Throttling Error. SMSC requires us to wait 60 
 seconds and resend request. Can you help us to setup kannel well? Our config 
 in attachment. Is it possible?
  
 We use Kannel 1.5.0 with sqlbox, smpp 3.4.
 sqlbox.confkannel.conf
  
  
 smsc.log



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Throttling Error

2014-07-03 Thread Andreas Fink

On 03 Jul 2014, at 09:47, marc.bazi...@orange.com wrote:

 Hi
 You can set up the configuration file with sms-resend-freq ( in sec ) and  
 sms-resend-retry (number of retry ) in order to change the default value for 
 retry.
 You can , by doing this , simulate a retry mechanism that you can find on 
 smsc server
 br
 Marc
 

this is the retry mechanism which has nothing to do with the throttling as far 
as I know.
The throttling affects a link as a whole, not an individual SMS.



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Throttling Error

2014-07-03 Thread Andreas Fink
FYI, the standard doesnt say how long you have to wait until you retry after 
getting a Throttled error.
It only says:

Throttling error (ESME has exceeded allowed message limits).

This type of error is usually returned where an ESME has exceeded a 
predefined messaging rate restriction applied by the operator.


If you wait 60 seconds before retrying it will slow your sending down a hell of 
a lot.
Its totally ok to retry a couple of seconds later to see if we still exceed 
allowed message limits.

There's nothing wrong with that. This is not an error. This is what it is meant 
to be.

 
On 03 Jul 2014, at 09:58, Алексей Мальгин alexey.mal...@gmail.com wrote:

 Hi,
  
 Thanks for the response!
  
 It will resolve problem with resending interval, but how can I make kannel 
 stop sending PDU for some time after this error? Not for this message, for 
 all messages in queue.
  
 From: khaoula.zou...@sofrecom.com [mailto:khaoula.zou...@sofrecom.com] 
 Sent: Thursday, July 03, 2014 2:46 PM
 To: Алексей Мальгин; devel@kannel.org
 Subject: RE: Throttling Error
  
 Hello,
  
 I think this can be configured with this release using parameters : 
 sms-resend-freq and sms-resend-retry.
 I give you an example : sms-resend-freq = 900 (15 mins) and sms-resend-retry 
 = 10 : means that the retry will be done 10 times every 15 minutes after 
 receiving the 0x0058 error code for throttling error.
  
 Hope this could help you..
 Regards,
  
 De : devel [mailto:devel-boun...@kannel.org] De la part de ??? ???
 Envoyé : jeudi 3 juillet 2014 04:08
 À : devel@kannel.org
 Objet : Throttling Error
  
 Hello,
  
 We need help with processing  Throttling Error. SMSC requires us to wait 60 
 seconds and resend request. Can you help us to setup kannel well? Our config 
 in attachment. Is it possible?
  
 We use Kannel 1.5.0 with sqlbox, smpp 3.4.



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Throttling Error

2014-07-03 Thread Andreas Fink

On 03 Jul 2014, at 10:21, marc.bazi...@orange.com wrote:

 If you want to check this behaviour,
 turned off your mobile , a take a tcpdump trace , and send one message by 
 one, until you get an error from the smsc, ( usually teh maximum message per 
 subscriber on the smsc configuration are betwwen 10 and 25 ) depending the 
 operator
 normally you will get an 0x14 error message ( message queue full ) but 
 often you will receive a 0x 58 error that are throttling error for a 
 message queue full situation.
 on this case, the retry parameter will allow you to manage the retry queue on 
 kannel . if there is no paramter , kannel will take the default value ( if i 
 am not mistaken it is 10 attempts per minute )
 hope it help
 br
 Marc


We have two different things here:

MessageQueueFull is telling you that the SMSC doesn't want to store further 
messages going to the destination number because it can not forward them to the 
mobile at the moment because either the sim storage on the phone does not have 
space to store additional new messages (on very old mobiles) or the SMSC 
already has a certain amount of SMS to that destination in the queue and 
doesn't want to add more to avoid flooding. In other words MessageQueueFull is 
the message telling you that this specific destination number should be retried 
later.

Throttling error however does affect ALL the traffic going to the SMS, not only 
a specific destination. This is meant for flow control between the ESME to the 
SMSC. So it tells Kannel to stop back and send slower because the SMSC can or 
do not wish to process it as fast. Usually it is a rate limit set contractual 
wise and implemented technically.

So the correct behaviour is
MessageQueueFull = put the message on to the retry mechanism to retry 
again later. This affects a single number.
Throttling Error = stop for a small moment and continue again. Simply 
retry as long as  you get ThrottlingError again. This affects all messages.

If you get ThrottlingError for a messageQueueFull situation, then the SMSC is 
not correctly implementing the SMPP specs.
Our SMSC for example would give you a ThrottlingError only in two cases:

a) you exceed the configured rate limit
b) you are out of credit (in which case no further messages are accepted at 
all).

MessageQueueFull would only be returned if the mobile returns this to us 
(memory capacity exceeded).



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Does opensmppbox and smsbox have serious memory issues?

2014-04-28 Thread Andreas Fink


 ==31087== 4,986,528 (77,472 direct, 4,909,056 indirect) bytes in 4,842
 blocks are definitely lost in loss record 813 of 813
 ==31087==at 0x4027434: malloc (vg_replace_malloc.c:291)
 ==31087==by 0x80970B3: gw_native_malloc (gwmem-native.c:87)
 ==31087==by 0x80A37A1: octstr_create_from_data_real (octstr.c:263)
 ==31087==by 0x80A3916: octstr_create_real (octstr.c:245)
 ==31087==by 0x80A908E: octstr_format_valist_real (octstr.c:2480)
 ==31087==by 0x80A9366: octstr_format (octstr.c:2469)
 ==31087==by 0x80534F5: boxc_route_msg_to_smsc (opensmppbox.c:1791)
 ==31087==by 0x8057AAE: smpp_to_bearerbox (opensmppbox.c:1638)
 ==31087==by 0x80983AE: new_thread (gwthread-pthread.c:385)
 ==31087==by 0x46F9C38: start_thread (pthread_create.c:304)
 ==31087==by 0x482F78D: clone (clone.S:130)

this seems to be a leak in opensmppbox in this code segment (handle_pdu) in 
opensmppbox.c around line 1634


case submit_sm:
msg = pdu_to_msg(box, pdu, reason);
msg2 = msg;
if (msg == NULL) {
resp = smpp_pdu_create(generic_nack, 
pdu-u.submit_sm.sequence_number);
resp-u.generic_nack.command_status = 
SMPP_ESME_RUNKNOWNERR;
}
else {
Octstr *smsc_id = boxc_route_msg_to_smsc(box, msg);  
-smsc_id is allocated but never freeed.
check_multipart(box, msg, msg_to_send, msg2, 
parts_list);
msg-sms.smsc_id = smsc_id ? octstr_duplicate(smsc_id) 
: NULL; /* its duplicated here... */
msg-sms.boxc_id = octstr_duplicate(box-boxc_id);
msg_dump(msg, 0);
resp = smpp_pdu_create(submit_sm_resp, 
pdu-u.submit_sm.sequence_number);
msgid = generate_smppid(msg);
msg-sms.dlr_url = octstr_duplicate(msgid);
resp-u.submit_sm_resp.message_id = msgid;
if (msg_to_send) {
if (DLR_IS_ENABLED(msg2-sms.dlr_mask)) {
hold_service = msg2-sms.service;
msg2-sms.service = 
octstr_format(%ld, msg2-sms.time);
msgid = generate_smppid(msg2);
if (parts_list) {
msg2-sms.dlr_url = 
concat_msgids(msgid, parts_list);
}
dlr_add(box-boxc_id, msgid, msg2);
octstr_destroy(msgid);
octstr_destroy(msg2-sms.service);
msg2-sms.service = hold_service;
}
uuid_unparse(msg2-sms.id, id);
msgid = octstr_create(id);
dict_put(box-msg_acks, msgid, resp);
octstr_destroy(msgid);
resp = NULL;
send_msg(box-bearerbox_connection, box, msg2);
if (parts_list) {
/* destroy values */
gwlist_destroy(parts_list, 
msg_destroy_item);
}
}
octstr_destroy(smsc_id); /* fix for this leak */
}
break;


This is a leak which would leak a few bytes per SMS.




signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Does opensmppbox and smsbox have serious memory issues?

2014-04-27 Thread Andreas Fink
If there's a memory leak (which it looks like) it should be relatively easy to 
spot and fix.
valgrind should be able to tell you where the blocks are allocated which are 
not freed.

On 26.04.2014, at 22:31, hbil...@ecommunicate.biz wrote:

Hi Rene and other Kannel developers,

Hanh posted his Valgrind research to the user group for smsbox and
opensmppbox.  His results seem interesting and so I'm copying them to this
thread so the Kannel developers can view them.
These results can be viewed by following the thread on Wed, Apr 23, 2014 at
3:41 AM, by Hanh Le Bich hanhmi...@gmail.com with the Subject: Re: 2
Questions re Redis/Debian.
(The email subject is not related to this issue.)

His research shows that opensmppbox and smsbox may have serious memory
issues.
I use the word may as until others have confirmed his results, there could
be a mistake somewhere.
Is there anyone who has a test environment that can follow his approach and
confirm for the Kannel community if opensmppbox and smsbox have serious
memory issues?

His approach is:
Let me describe a little bit for my application back end. It's  pretty
simple: i make a loop that for each second, it push an sms via kannel
CGI for 1K mobile numbers, that mean throughput is 1000 msg/sec.
My kannel configuration is simple too, it's only smsbox - bearerbox
- SMSC (via smpp), no file storage, no SQL, no dlr (actually
dlr-mask=8).

For smsbox:
In the pass when using ver 1.4.3, it was fine for years. After
upgrade to 1.5.0, after each few days, i realized smsbox is reset,
then i found it exhaust my memory. It's funny that smsbox consume the
mem and doesn't release. Example, if it occupies 50% your mem and you
stop sms pushing, it will 50% forever except the box restarting.
That's all, same server with no other tasks, same back end, just
different kannel version.

Just paste the valgrind sum in here:

==27581== LEAK SUMMARY:
==27581==definitely lost: 1,077,904 bytes in 67,369 blocks
==27581==indirectly lost: 673,660 bytes in 67,366 blocks
==27581==  possibly lost: 160 bytes in 13 blocks
==27581==still reachable: 1,240 bytes in 39 blocks
==27581== suppressed: 0 bytes in 0 blocks
==27581== Reachable blocks (those to which a pointer was found) are
not shown.
==27581== To see them, rerun with: --leak-check=full
--show-leak-kinds=all ==27581== ==27581== For counts of detected and
suppressed errors, rerun with: -v ==27581== ERROR SUMMARY: 3 errors
from 3 contexts (suppressed: 45 from 10)

For opensmppbox
opensmppbox  drains your memory 10 times faster than smsbox
==31087== LEAK SUMMARY:
==31087==definitely lost: 78,944 bytes in 4,882 blocks
==31087==indirectly lost: 4,911,232 bytes in 4,859 blocks
==31087==  possibly lost: 48,496 bytes in 74 blocks
==31087==still reachable: 3,124,401 bytes in 26,735 blocks
==31087== suppressed: 0 bytes in 0 blocks
==31087== Reachable blocks (those to which a pointer was found) are
not shown.
==31087== To see them, rerun with: --leak-check=full
--show-leak-kinds=all ==31087== ==31087== For counts of detected and
suppressed errors, rerun with: -v ==31087== ERROR SUMMARY: 10 errors
from 10 contexts (suppressed: 45 from 10)

Regards









Andreas Fink

CEO DataCell ehf
CEO Backbone ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.datacell.com, www.backbone.is, www.finkconsulting.com www.fink.org
---
Jabber/XMPP: andr...@fink.org
ICQ: 8239353 Skype: andreasfink






signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [PATCH] validity period check (internal)

2014-01-08 Thread Andreas Fink
dcs is implemented since a long time


On 08 Jan 2014, at 14:50, Ahmed Shabana a.shab...@cequens.com wrote:

 Dear Kannel Devels,
 
   I want to patch kannel source but need first to check with you if this 
 could be useful or this feature already exist , 
 
   some provider require special Data_Coding fields to proper handle 
 message encoding i.e. Data_Coding 
 
 Best regards,
 a.shabana
 
 
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Blocked ports for MO (generic http smsc)

2013-07-23 Thread Andreas Fink
in this context the key question is if your smsc configs for http smsc's shares 
the same receive port because for every http-smsc sending is a http client 
while receiving is a http server. Every http-smsc must have its own http-server 
as they dont know of each other. If you have two http-smscs with the same 
receive port, the described outcome could very well be as one http-smsc 
receiver thread would steal tasks from the other.

could that be your issue?

On 22.07.2013, at 22:12, Brian McCavour bmccav...@yahoo.com wrote:

 
 Hi Andreas,
 
 Thanks for your response. Sorry I was not more clear :) 
 I only have 1 http server. The modifications I've done is to add custom types 
 of http smsc. I never touched any of the underlying code however, I just copy 
 pasted the generic implementation (in smsc_http.c), and made new send/receive 
 functions per type. Then I added a few other configuration options for the 
 smsc. So all of the threading / networking code is unmodified (except what 
 I've added to try and fix this issue)
 
 From what I can understand, this 1 http server thread in kannel will do:
 Look for a new server socket, add 1 new server socket to the list of file 
 descriptors if a new socket found
 Poll given the list of FD
 Handle data
 Check if we need to close any sockets
 During startup as we're looping through SMSC in CFG (bb_smscconn 
 smsc2_start), for each http smsc it calls http_open_port_if, which should (I 
 believe?) wakeup the server thread, basicaly restarting back at 1. again.
 
 So what I expect to see, when I have 4 http smsc in my .conf is 1, 2, 1, 2, 
 1, 2, 1, 2, which each new socket connection interupting and adding its 
 socket to the list of FD, before going back to polling.
 
 What I am actually seeing through, is that it will block during the poll, and 
 the new sockets being added still in the main thread get added to the 
 new_server_sockets correctly, but the polling thread never wakes up to 
 pickup this new socket. So the fix that I did was just to move the start of 
 the http server from attempting to start it everytime you try and open an 
 http port, to just openeing it 1 time after reading in all the smsc from CFG. 
 The I changed from adding 1 socket per itteration, to add all new server 
 sockets to the FD list in 1 iteration.
 
 Maybe I am just really misunderstanding what is happening, but my hack did 
 fix the problem, so it must somehow be related.
 
 What are your thoughts?
 
 thx,
 Brian
 
 
 
 From: Andreas Fink af...@list.fink.org
 To: Brian McCavour bmccav...@yahoo.com 
 Cc: devel Devel devel@kannel.org 
 Sent: Monday, July 22, 2013 3:37:17 PM
 Subject: Re: Blocked ports for MO (generic http smsc)
 
 If I understand you right, you have some code to run virtually multiple http 
 servers which do different things?
 You must be aware that gwlib is build the way that it runs multiple threads 
 polling of the same incoming port. In other words if you run on port 80 a min 
 webserver to serve documents, then every thread waits on something to happen 
 and if an incoming data arrives any of the worker thread catches it and 
 processes it.
 As in many places inside kannel/gwlib this is done using internal pipes where 
 the waiting threads are sitting inside a poll and the thread who discovered 
 there's work to do actually writes a byte into this pipe and thus waking up 
 any or all of the waiting threads.
 
 Now if you run multiple servers, lets say on port 80 and port 443, you need 
 to separate this mechanism. Which means every group of listening threads for 
 either port must have its own pipe its listening to. If I guess correctly, 
 you have an extension built which runs multiple http servers and does 
 something with it
 
 I have used gwlib with multiple http servers without a problem. I believe 
 gwlib is doing the right thing but you might need to create a second 
 instance. But without seeing your code modifications, its impossible to 
 answer that.
 
 On 22.07.2013, at 21:20, Brian McCavour bmccav...@yahoo.com wrote:
 
 Hi,
 
 I was investigating an issue I had on my customized Kannel where only the 
 first Http SMSC, of many http smsc, would be able to receive MO. The other 
 sockets would simply hang (or so it appeared).
 
 I discovered that basically the http server thread was getting blocked on 
 the thread poll, and until I send a message through to a port that is 
 already in the list, it ill never pickup any of those requests.
 Basically, in http.c, the function server_thread() picks up the first http 
 SMSC, adds it to struct pollfd tab[MAX_SERVERS];
 Then if ((ret = gwthread_poll(tab, n, -1.0)) == -1)   will block 
 waiting for data on the socket.
 
 But if there is another server to be added afterwards, this gets called from 
 http.c: int http_open_port_if(int port, int ssl, Octstr *interface);
 Now it looks like this should wake up that polling thread, and add the new 
 port to tab data structure above, and go back to waiting

Re: Kannel 1.5 DLR - segmentation fault

2013-05-16 Thread Andreas Fink
there's two issues to solve here:
a) why are you getting a DLR for a message you have sent but don't remember.
b) why is it bailing out at this time because this should simply ignore the DLR 
in that case.


for b) we need a backtrace, a PANIC log or something like that to find out what 
is creating the segfault (PANIC does it on purpose but the panic output is what 
we must be able to see). You should compile kannel with symbols on or run it in 
gdb and do a backtrace there.

for a) this could be a config issue of all kinds or simply a bug but I guess 
it's the first. So how this is configured exactly has to be analyzed.

Maybe you can share an example of the exact URL's as passed out and back into 
kannel.


On 16.05.2013, at 13:04, Adam Pinter adam.pin...@dream.hu wrote:

 Hello everyone,
 
 I have a problem with the DLR on kannel 1.5
 The remote SMSC sending DLRs which are not found in our DLR table as you can 
 see in attached logs.
 This causes segmentation fault end kills kannel.
 
 I've found a patch to solve this problem which trying to find the DLR in 
 table for X times, but after X attempts the problem is same: DLR not found 
 braerbox stops and segmentation fault
 
 Anyone can help me with it?
 Thanks
 Adam
 
 Logs:
 
 smsbox.log
 
 2013-05-16 11:03:34 [14915] [0] ERROR: connect to 127.0.0.1 failed
 2013-05-16 11:03:34 [14915] [0] ERROR: System error 111: Connection refused
 2013-05-16 11:03:34 [14915] [0] DEBUG: Connecting to 127.0.0.1
 2013-05-16 11:03:34 [14915] [0] ERROR: connect to 127.0.0.1 failed
 2013-05-16 11:03:34 [14915] [0] ERROR: System error 111: Connection refused
 2013-05-16 11:03:34 [14915] [0] ERROR: error connecting to server `localhost' 
 at port `29005'
 2013-05-16 11:03:34 [14915] [0] PANIC: Couldn't connect to the bearerbox.
 2013-05-16 11:03:34 [14915] [0] PANIC: 
 /usr/local/kannel15/sbin/smsbox(gw_backtrace+0xad) [0x808b44d]
 2013-05-16 11:03:34 [14915] [0] PANIC: 
 /usr/local/kannel15/sbin/smsbox(gw_panic+0xe8) [0x808b548]
 2013-05-16 11:03:34 [14915] [0] PANIC: 
 /usr/local/kannel15/sbin/smsbox(main+0x1040) [0x8055dd0]
 2013-05-16 11:03:34 [14915] [0] PANIC: 
 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7112450]
 2013-05-16 11:03:34 [14915] [0] PANIC: /usr/local/kannel15/sbin/smsbox 
 [0x8054531]
 
 kannel.log
 -
 2013-05-16 11:03:23 [14504] [8] DEBUG: boxc_receiver: sms received
 2013-05-16 11:03:23 [14504] [8] DEBUG: send_msg: sending msg to box: 
 127.0.0.1
 2013-05-16 11:03:23 [14504] [8] DEBUG: boxc_receiver: sms received
 2013-05-16 11:03:23 [14504] [8] DEBUG: send_msg: sending msg to box: 
 127.0.0.1
 2013-05-16 11:03:23 [14504] [8] DEBUG: boxc_receiver: sms received
 2013-05-16 11:03:23 [14504] [8] DEBUG: send_msg: sending msg to box: 
 127.0.0.1
 2013-05-16 11:03:23 [14504] [6] PANIC: /usr/local/kannel15/sbin/bearerbox 
 [0x80fc18d]
 2013-05-16 11:03:23 [14504] [6] PANIC: [0xb77c5440]
 2013-05-16 11:03:23 [14504] [6] PANIC: /usr/local/kannel15/sbin/bearerbox 
 [0x80a338f]
 2013-05-16 11:03:23 [14504] [6] PANIC: /usr/local/kannel15/sbin/bearerbox 
 [0x80a4156]
 2013-05-16 11:03:23 [14504] [6] PANIC: /usr/local/kannel15/sbin/bearerbox 
 [0x80a523d]
 2013-05-16 11:03:23 [14504] [6] PANIC: /usr/local/kannel15/sbin/bearerbox 
 [0x80e5edc]
 2013-05-16 11:03:23 [14504] [6] PANIC: /lib/tls/i686/cmov/libpthread.so.0 
 [0xb752a4fb]
 
 Smsc.log
 --
 2013-05-16 11:03:23 [14504] [6] DEBUG: DLR from SMSCremotesmsc for 
 DST06301234567. Attempt 19 of 20.
 2013-05-16 11:03:23 [14504] [6] DEBUG: Sleeping for 1.000 seconds
 2013-05-16 11:03:23 [14504] [6] DEBUG: sql: SELECT `mask`, `service`, `url`, 
 `source`, `destination`, `boxc` FROM `dlrtablename` WHERE `smsc`=? AND `ts`=? 
 AND `destination` LIKE CONCAT('%', ?) LIMIT 1
 2013-05-16 11:03:23 [14504] [6] DEBUG: column=mask buffer_type=252 
 max_length=0 length=65535
 2013-05-16 11:03:23 [14504] [6] DEBUG: column=service buffer_type=252 
 max_length=0 length=65535
 2013-05-16 11:03:23 [14504] [6] DEBUG: column=url buffer_type=252 
 max_length=0 length=65535
 2013-05-16 11:03:23 [14504] [6] DEBUG: column=source buffer_type=252 
 max_length=0 length=65535
 2013-05-16 11:03:23 [14504] [6] DEBUG: column=destination buffer_type=252 
 max_length=0 length=65535
 2013-05-16 11:03:23 [14504] [6] DEBUG: column=boxc buffer_type=252 
 max_length=0 length=65535
 2013-05-16 11:03:23 [14504] [6] DEBUG: DLR from SMSCremotesmsc for 
 DST06301234567. Attempt 20 of 20.
 2013-05-16 11:03:23 [14504] [6] WARNING: DLR[mysql]: DLR from 
 SMSCremotesmsc for DST06301234567 not found after 20 attempts.
 2013-05-16 11:03:44 [15036] [6] INFO: EMI2[remotesmsc]: connecting to Primary 
 SMSC





+CMS ERROR 512 with Wavecom

2013-03-20 Thread Andreas Fink
anyone have a clue why I get this error 512?
Its a wavecom modem. Incoming messages do work and get routed correctly. SIM is 
O2 in UK.
The devices worked with the same setting with other SIM cards.
The SIM works in a phone sending SMS.

2013-03-20 21:12:24 [1190] [6] DEBUG: AT2[port02]: send command status: 1
2013-03-20 21:12:24 [1190] [6] DEBUG: AT2[port02]: -- 
0011000B911487667733F3A706F0B79C0E9301
2013-03-20 21:12:24 [1190] [6] DEBUG: AT2[port02]: -- ^Z
2013-03-20 21:12:24 [1190] [6] DEBUG: AT2[port02]: -- 
2013-03-20 21:12:24 [1190] [6] DEBUG: AT2[port02]: -- +CMS ERROR: 512
2013-03-20 21:12:24 [1190] [6] ERROR: AT2[port02]: +CMS ERROR: +CMS ERROR: 512
2013-03-20 21:12:24 [1190] [6] ERROR: AT2[port02]: +CMS ERROR: User abort or MM 
establishment failure (SMS) (512)





Re: Problem with send several SMSs with kannel

2013-03-18 Thread Andreas Fink
It is recommended to send every SMS individually as if you specify  delivery 
reports or similar requirements, you need to distinguish every individual SMS 
from each other. Those things are extremely difficult if you send one message 
with 1000 destination numbers. Delivery reports will acknowledge any message, 
not a specific one as there's no way to distinguish them from each other as you 
have only one URL which is always the same one.

On 18.03.2013, at 16:59, l@mailcity.it wrote:

 Hi guys,
 
 with my company we are trying to send several (we mean something like 
 5000-1-15000
 SMS for any send) messages using SMPP and kannel (our smsc has ask us to use 
 kannel
 framework in order to connect to their SMPP server).
 
 Actually in order to make it works we have two BIG problems:
 
 [preamble]
 Looking at the kannel documentation here:
 http://kannel.org/download/kannel-userguide-snapshot/userguide.html#POSTXML
 
 it's possible to use an XML post in order to send N SMSs with one single post.
 Something like:
 
 danumber/number/da
 danumber/number/da
 danumber/number/da
 [...]
 
 The BIG questions are:
 
 1 - How it's possible setup more binfo (billing info profile) for any number 
 setup on
 this single post? It's look that is supported only 1 binfo profile for post 
 sending, with
 the problem that if I need to send SMSs worldwide, my smsc cannot distinct 
 the price of
 the SMSs.
 
 2 - In develop enviroment, while we are trying to send however this SMSs (and 
 they arrive
 on the phone) the dr (delivery report) works only sometime (and randomly).
 In fact for example if I try to send 3 smss (or more) in the way described 
 before, we
 receive sometimes only 1 dr, and sometimes non of them.
 Looking on the status of the kannel server (i mean [servername]:13000/status) 
 we have
 that the most part of the delivery report are still in queued and never 
 sended. Have you
 some ideas on why this happen?
 
 Thank you for your support.
 
 
 This message was sent using IMP, the Internet Messaging Program.
 
 





Re: USSD: Mallformed destination_addr `(null)', may not be empty. Discarding MO message

2013-01-14 Thread Andreas Fink
there is your error in the log:

2012-11-27 11:38:35 [6369] [6] DEBUG:   dest_addr_ton: 0 = 0x
2012-11-27 11:38:35 [6369] [6] DEBUG:   dest_addr_npi: 0 = 0x
2012-11-27 11:38:35 [6369] [6] DEBUG:   destination_addr: NULL
2012-11-27 11:38:35 [6369] [6] ERROR: SMPP[USSD]: Mallformed destination_addr 
`(null)', may not be empty. Discarding MO message.

talk to your supplier and ask them why they send you no destination address.

On 14.01.2013, at 09:11, kayode tobi kay4bl...@yahoo.co.uk wrote:

 
 Hi Team,
 
 I have been very successful in using kannel (with binds to SMSC) to deliver 
 MT messages to handsets.
 
 I have just been given a project that involves receiving MO messages from a 
 USSD gateway and I am getting the Error above.
 
 When I send *300# from the phone, I get USSDC: Rejected by ESME back on the 
 phone.
 
 Attached to this mail is the complete error from my log and my kannel config 
 (Kannel bearerbox version `svn-r4979M')
 
 Kindly assist to check where this error is coming from and if I am doing 
 something wrong.
 
 Thank you
  
 Best Regards,
 Kayode
 
 
 
 
 
 
 
 
 COMPLETE ERRORKANNEL CONF



Re: USSD: Mallformed destination_addr `(null)', may not be empty. Discarding MO message

2013-01-14 Thread Andreas Fink
I'm sure this can be patched to make it work. but its not really intentional to 
have a field destination address.
the data is what the user types. As this is a session, this makes sense.


You can temporary comment out this section in gw/smsc/smsc_smpp.c (line 442-464 
) to see if that works around the problem.


/*
 * Follows SMPP spec. v3.4. issue 1.2
 * it's not allowed to have destination_addr NULL
 */
if (pdu-u.deliver_sm.destination_addr == NULL) {
error(0, SMPP[%s]: Malformed destination_addr `%s', may not be empty. 
  Discarding MO message., octstr_get_cstr(smpp-conn-id),
  octstr_get_cstr(pdu-u.deliver_sm.destination_addr));
*reason = SMPP_ESME_RINVDSTADR;
goto error;
}




On 14.01.2013, at 13:04, kayode tobi kay4bl...@yahoo.co.uk wrote:

 Hi Andreas,
 
 I am so grateful for your response.
 
 However, I have been to this supplier with this question, but they claim this 
 is how they push requests to all connected clients via SMPP.
 
 Please look at this again:
 
 2012-11-27 11:38:35 [6369] [6] DEBUG: SMPP[USSD]: throughput (0.00,0.00)
 2012-11-27 11:38:35 [6369] [6] DEBUG: Optional parameter tag (0x001e)
 2012-11-27 11:38:35 [6369] [6] DEBUG: Optional parameter length read as 33
 2012-11-27 11:38:35 [6369] [6] DEBUG: Optional parameter tag (0x0202)
 2012-11-27 11:38:35 [6369] [6] DEBUG: Optional parameter length read as 15
 2012-11-27 11:38:35 [6369] [6] DEBUG: Optional parameter tag (0x0203)
 2012-11-27 11:38:35 [6369] [6] DEBUG: Optional parameter length read as 13
 2012-11-27 11:38:35 [6369] [6] DEBUG: Optional parameter tag (0x0501)
 2012-11-27 11:38:35 [6369] [6] DEBUG: Optional parameter length read as 1
 2012-11-27 11:38:35 [6369] [6] DEBUG: Found configured optional parameter 
 `mydata'
 2012-11-27 11:38:35 [6369] [6] DEBUG: Optional parameter tag (0x0424)
 2012-11-27 11:38:35 [6369] [6] DEBUG: Optional parameter length read as 5
 2012-11-27 11:38:35 [6369] [6] DEBUG: SMPP[USSD]: Got PDU:
 2012-11-27 11:38:35 [6369] [6] DEBUG: SMPP PDU 0x7ff7c8001550 dump:
 2012-11-27 11:38:35 [6369] [6] DEBUG:   type_name: data_sm
 2012-11-27 11:38:35 [6369] [6] DEBUG:   command_id: 259 = 0x0103
 2012-11-27 11:38:35 [6369] [6] DEBUG:   command_status: 0 = 0x
 2012-11-27 11:38:35 [6369] [6] DEBUG:   sequence_number: 1 = 0x0001
 2012-11-27 11:38:35 [6369] [6] DEBUG:   service_type: USSD
 2012-11-27 11:38:35 [6369] [6] DEBUG:   source_addr_ton: 1 = 0x0001
 2012-11-27 11:38:35 [6369] [6] DEBUG:   source_addr_npi: 1 = 0x0001
 2012-11-27 11:38:35 [6369] [6] DEBUG:   source_addr: 2347055932235
 2012-11-27 11:38:35 [6369] [6] DEBUG:   dest_addr_ton: 0 = 0x
 2012-11-27 11:38:35 [6369] [6] DEBUG:   dest_addr_npi: 0 = 0x
 2012-11-27 11:38:35 [6369] [6] DEBUG:   destination_addr: NULL
 2012-11-27 11:38:35 [6369] [6] DEBUG:   esm_class: 1 = 0x0001
 2012-11-27 11:38:35 [6369] [6] DEBUG:   registered_delivery: 0 = 0x
 2012-11-27 11:38:35 [6369] [6] DEBUG:   data_coding: 0 = 0x
 2012-11-27 11:38:35 [6369] [6] DEBUG:   message_payload:
 2012-11-27 11:38:35 [6369] [6] DEBUG:Octet string at 0x7ff7c80018c0:
 2012-11-27 11:38:35 [6369] [6] DEBUG:  len:  5
 2012-11-27 11:38:35 [6369] [6] DEBUG:  size: 6
 2012-11-27 11:38:35 [6369] [6] DEBUG:  immutable: 0
 2012-11-27 11:38:35 [6369] [6] DEBUG:  data: aa 19 0c 36 02   
  ...6.
 2012-11-27 11:38:35 [6369] [6] DEBUG:Octet string dump ends.
 2012-11-27 11:38:35 [6369] [6] DEBUG:   receipted_message_id:
  
  When the highlighted data: aa 19 0c 36 02 was decripted, it revealed the 
 code *300# which I presume should be the destination address.
 
 1. Kindly enlighten me what this should be, because they claim my app 
 (kannel) is what is not accepting the destination address.
 
 2. Do you think I am missing anything in the kannel config? If yes, can u let 
 me see a sample kannel USSD config?
 
 3. Can I set configure kannel to accept NULL destination address?
 
 Thank you so much for your time.
 
 
 Best Regards,
 Kayode
 
 
 
 
 
 
 
 
 
 From: Andreas Fink af...@list.fink.org
 To: kayode tobi kay4bl...@yahoo.co.uk 
 Cc: devel@kannel.org devel@kannel.org 
 Sent: Monday, 14 January 2013, 9:20
 Subject: Re: USSD: Mallformed destination_addr `(null)', may not be empty. 
 Discarding MO message
 
 there is your error in the log:
 
 2012-11-27 11:38:35 [6369] [6] DEBUG:   dest_addr_ton: 0 = 0x
 2012-11-27 11:38:35 [6369] [6] DEBUG:   dest_addr_npi: 0 = 0x
 2012-11-27 11:38:35 [6369] [6] DEBUG:   destination_addr: NULL
 2012-11-27 11:38:35 [6369] [6] ERROR: SMPP[USSD]: Mallformed destination_addr 
 `(null)', may not be empty. Discarding MO message.
 
 talk to your supplier and ask them why they send you no destination address.
 
 On 14.01.2013, at 09:11, kayode tobi kay4bl...@yahoo.co.uk wrote:
 
 
 Hi Team,
 
 I have been very successful in using kannel (with binds to SMSC

Re: Bulk SMS individual response for each number

2012-12-05 Thread Andreas Fink
this is conceptually not possible. If you send multiple SMS in one go, kannel 
sees this as one transaction and thus can only acknowledge one.
So the best is to send them one by one.

On 05.12.2012, at 09:36, Steven Nsubuga snsub...@applab.org wrote:

 In the event that I send an SMS to 2 numbers via kannel, ie to=178+179, is it 
 possible to get a separate response from kannel for each of the 2 numbers I 
 have specified? This would  mostly help in the event that one of the numbers 
 is wrong, for example in my smsbox setup I have set sendsms-chars = 
 0123456789 +- meaning that if I had to=abc that would be rejected by 
 kannel. However, when I include that wrong format in a multi-send, ie 
 to=abc+178, I do not get any error and the correct number 178 does receive 
 the SMS. So my question is, is it possible to receive from kannel a separate 
 response for each recipient?





Re: sim-buffering

2012-12-02 Thread Andreas Fink
the phone most probably doesn't support this mode. its a limit of the hardware 
you are using.
To receive lots of sms you should use reliable gsm modems or get incoming 
messages directly from an operator's smsc or from a incoming proxy provider.

On 03.12.2012, at 06:48, Navdeep Bagga ad...@navdeepbagga.com wrote:

 I am using Nokia 7210 phone to configure gateway, to send sms.
 I am facing problem in receiving sms.
 I came to know from mailing list archives that sim-buffering should be
 true to receive sms but whenever I run bearrebox with true value
 giving GENERIC ERROR
 Is phone compatible for receiving purpose or I need modem for that.
 
 -- 
 Navdeep Bagga
 Happy Bird
 [W] http://navdeepbagga.com
 [T]  http://www.navdeepbagga.com/category/daily-diary-3/
 





Re: Kannel and GSM Modem

2012-11-07 Thread Andreas Fink

On 07.11.2012, at 07:44, Saifullah saiful...@banglaphone.net.bd wrote:

 Hi Wlly Mularto
 
 Thanks for your reply. It help me very much. I have one important
 question. Sppose I am sending SMS from kannel to GSM Modems whick work as
 SMSC what number will be shown on the display of destination user? Will it
 be number of GSM Modem number or Kannel sending number? Do the modems
 Nokia Premicell, Siemens M20, Wavecom WM02-G1800 modem support networkin
 tcp/ip?
 
 Thanks in advance.


ghe gsm modems are actually not a real SMSC as it submits a SMS-MO to a real 
SMSC who then delivers it to the destination. As such the deliver over a GSM 
modem is working the same way as if you would type an SMS on a phone which 
results in the SIM card's number to be sent as originators.

Some of the modems of today do support GRPS networking (as tcp/ip). If you talk 
about access from kannel to the gsm modems, there are some devices which have a 
gsm modem built in and then present it on a ethernet (usually for IP dial-out). 
Kannel doesnt need TCP/IP to talk to the modem but a serial port. I have some 
boxes out of china which connect 16 or 32 or 64 GSM modem to a computer by a 
simple USB cable. The computer will get the same amount of serial ports which 
then can be used directly from kannel.






Re: GSM Modem is not sending SMS or even not putting into queue

2012-10-08 Thread Andreas Fink

On 08.10.2012, at 19:39, virendra bhati virbh...@gmail.com wrote:

 Hi Team,
 
 I have installed Kannel and working perfectly with Ubuntu 12.04.1 LTS. But I 
 am not able to installed BluOcean™ USB GSM / GPRS Modem. Could you please 
 help me so that I will configure and used my GSM modem for sending SMS from 
 Kannel.

do you have a manual for it?
what kind of GSM modem options have you configured?
what does the bearerbox.log say if you enable log-level = 0 ?

Usually its only a question of finding the right init strings...(which can be 
tricky at times...)

 
 
 
 -- 
 
 Thanks and regards
 
  Virendra Bhati
 +91-9718500594
 Asterisk Developer
 E-mail-: virbh...@gmail.com
 Skype id:- virbhati2
 New Delhi(India)
 
 



Re: GSM Modem is not sending SMS or even not putting into queue

2012-10-08 Thread Andreas Fink
you have 

modemtype = Bluocean

but no modem definition with that name in the config file.
Try adding this:

group = modems
id = Bluocean
name = Bluocean
speed = 115200
detect-string = Bluocean
detect-string2 = 
init-string = AT+CNMI=2,2,2,1,0
enable-hwhs = 
need-sleep = true
no-pin = true
no-smsc = false
sendline-sleep = 100
keepalive-cmd = AT
broken = false
message-storage = SM
hardware-flow-control = false
reset-string = AT+CFUN=1


You might have to play with the init string, hardware handshake, speed  etc.
Above settings is what I use with my wavecom modems which are pretty much 
following the GSM standards.

Trial and error helps there. Just set it up and watch the bearerbox logfile to 
see what kannel does do when talking to the modem and how the modem reacts. 
Especially in cases where you have lots of incoming SMS or delivery reports.

On 09.10.2012, at 06:04, virendra bhati virbh...@gmail.com wrote:

 1) do you have a manual for it?
 
 http://www.bluocean.biz/gsm_modem.html#usb_gprs
 model 2 is the GSM modem..
 
 2) what kind of GSM modem options have you configured?
 
 group = core
 admin-port = 13000
 smsbox-port = 13001
 admin-password = hariom
 status-password = foo
 admin-deny-ip = 
 admin-allow-ip = 
 log-level = 0
 log-file = /var/log/kannel/kannel.log
 box-deny-ip = *.*.*.*
 box-allow-ip = 127.0.0.1
 access-log = /var/log/kannel/access.log
 store-location= /var/log/kannel/a-z.log
 smsbox-max-pending = 10
 unified-prefix = 91,0091,+91,091 
 
 group = smsc
 smsc = at 
 smsc-id = Bluocean
 modemtype = Bluocean
 device = /dev/ttyUSB0
  my-number = +6583640330
 speed = 115200
 log-level = 0  
 log-file = /var/log/kannel/smsc.log
 
 group = wapbox
 bearerbox-host = localhost
 log-file = /var/log/kannel/wapbox.log
 log-level = 0
 
 # MODEM DEFINITIONS
 group = modems
 id = wavecom
 name = wavecom
 detect-string = wavecom
 init-string = ATZ
 reset-string = ATZ 
 
 group = smsbox
 bearerbox-host = localhost
 sendsms-port = 13003
 global-sender = 9718500594
 #sendsms-url = http://localhost:13003/cgi-bin/sendsms;
 access-log = /var/log/kannel/smsaccess.log
 log-file = /var/log/kannel/smsbox.log
 log-level = 0
 
 
 # SEND-SMS USERS
 
 group = sendsms-user
 username = virendra
 password = bhati
 
 #-
 # SERVICES
 
 group = sms-service
 keyword = default
 text = This facility is down for maintenance.
 accept-x-kannel-headers = true
 max-messages = 1
 concatenation = true
 get-url = 
 http://localhost/playsms/plugin/gateway/kannel/geturl.php?t=%tq=%qa=%a;
 
 group = mysql-connection
 id = mydlr
 host = localhost
 username = root
 password = 
 database = playsms
 max-connections = 1
 
 group = dlr-db
 id = mydlr
 table = dlr
 field-smsc = smsc
 field-timestamp = ts
 field-destination = destination
 field-source = source
 field-service = service
 field-url = url
 field-mask = mask
 field-status = status
 field-boxc-id = boxc3)what does the bearerbox.log say if you enable log-level 
 = 0 ?
 
 what does the bearerbox.log say if you enable log-level = 0 ?
 Right now dedicated server center is down when come up then I will provide 
 that details as well.
 On Mon, Oct 8, 2012 at 11:12 PM, Andreas Fink af...@list.fink.org wrote:
 
 On 08.10.2012, at 19:39, virendra bhati virbh...@gmail.com wrote:
 
 Hi Team,
 
 I have installed Kannel and working perfectly with Ubuntu 12.04.1 LTS. But I 
 am not able to installed BluOcean™ USB GSM / GPRS Modem. Could you please 
 help me so that I will configure and used my GSM modem for sending SMS from 
 Kannel.
 
 do you have a manual for it?
 what kind of GSM modem options have you configured?
 what does the bearerbox.log say if you enable log-level = 0 ?
 
 Usually its only a question of finding the right init strings...(which can be 
 tricky at times...)
 
 
 
 
 -- 
 
 Thanks and regards
 
  Virendra Bhati
 +91-9718500594
 Asterisk Developer
 E-mail-: virbh...@gmail.com
 Skype id:- virbhati2
 New Delhi(India)
 
 
 
 
 
 
 -- 
 
 Thanks and regards
 
  Virendra Bhati
 +91-9718500594
 Asterisk Developer
 E-mail-: virbh...@gmail.com
 Skype id:- virbhati2
 New Delhi(India)
 
 



Re: Delivery Report Inquiry

2012-09-13 Thread Andreas Fink

On 13.09.2012, at 11:06, khaled mohamed kmoha...@razytech.com wrote:

 
 
 MR(s);
  we try to get delivery report from kannel i found away on kannel 
 1.4. user's guide  using the dlr-mask and dlr-url (in chapter 9 sms delivery 
 report).
   i have some questions hope to get answers.
   1:   shall we make a URL to to get delivery reports on it?
   2:  written in user's guide URL for example 
 dlr-url=http://www.xyz.com/cgi/dlr.php?type=%d  what is d? is it the 
 number referred to delivery report type  and if it_ shall we make 
  number of web pages equivalent to kind of delivery reports we 
 need please explain that?

%d contains the status of the delivery.
you get called when the message gets buffered first for example and lateron 
again when its delivered. The values match the request values in dlr_mask.


   3:shall we pass the dlr-url in the link of sending message beside 
 dlr_mask?

yes. Otherwise kannel doesn't know where to call you back on

   4:if the answer of 1 is yes here some code of java script that some 
 one who use kannel published it on line i want also some explain. on it 

 // This is an imaginary phone number
 var number  = +22  //  shall it change to the number we 
 send to after sending or we change it before or what?
  
 // This is the SMS content
 var text= encodeURIComponent(Hello World!) //   shall it change to the  
 message we send to after sending or we change it before or what?  
  
 // This is the URL that is called when the deliver report is received
 var dlr_url = 
 encodeURIComponent(http://localhost/my_app/recieve_delivery_report?status=%d;)
  
 // This is the default send_sms url defined by kannel
 var send_url = 
 http://localhost:13001/cgi-bin/sendsms?username=testerpassword=foobar;
  
 // This is the final send_sms link
 var link= send_url + to= + number + text= + text + 
 dlr-mask=31dlr-url= +dlr_url
  
 window.location = link
  

this looks kind of ok. You might want to add a component to the DLR url such as 
your own internal message id. Kannel will just play it back to you 1:1. So it 
can help you to find the data of the original message. A database record ID for 
example.


 finally is it work with Quescom 400 gate way device?

Can't answer that. No idea what this device is

 
 please answer me urgently as quickly as you can
 
 hope i help improving kannel.
 
 with all my best wishes and thanks.
 
 Eng: khaled mohamed
 Razytech. compnay
 cairo Egypt 
 



Re: delivery report

2012-08-27 Thread Andreas Fink
if your mask is 31, you ask for values 1,2,4,8,16
Check the doc what they mean.
In other words, you only get what you asked for and SUBMIT (SMS has hit SMSC) 
is one of them

If you are only interested in final delivery/failure, then use a value of 3 
(1+2 = success + failure)

On 27.08.2012, at 09:32, KC kiangchi...@dv9.com wrote:

 Hi Willy,
 
 Thanks for the response. Dlr-Mask is 31. Last time we can accept the delivery 
 status success report.
 I just tried to restart the kannel and send a test SMS. Now I can receive the 
 SUCESSS delivery report after
 restarting the kannel. Do you know what cause this issues ?
 
 Thanks
 KC
 
 On 27/8/2012 3:06 PM, Willy Mularto wrote:
 This should be posted to users's list. There are some possibilities:
 1. What is your dlr-mask?
 2. Have you checked with your telco?
 3. or have you checked  the bearerbox log?
 
 
 
 On Aug 27, 2012, at 1:52 PM, KC wrote:
 
 Dear Support,
 
 I have tried to set the following
 
 
 dlr-mask=31dlr-url=http://127.0.0.1/dlr.php?dlr=%ddest=%preport=%ALogID=
 
 Previously we still can receive the delivery status report success 1 from 
 the dlr-url.
 
 Since last 2 weeks our system never received the delivery success report (1 
 : delivery success).
 
 Now the system only receive the following delivery status
 
 8  : smsc submit
 16 : smsc reject
 
 
 Can you please advice ?
 
 Regards,
 KC
 
 Willy Mularto
 F300HD+MR18DE (NLC1725)
 
 
 
 
 
 
 
 
 
 
 





Re: Make Gateway Errors

2012-08-20 Thread Andreas Fink
did you run ./configure ?
I've compiled kannel on Linux ARM before (on a pandaboard running Ubuntu) and 
had no problem with it.
./configure checks for various va_list variants. 

On 20.08.2012, at 15:12, Michael Black acct.sh...@gmail.com wrote:

 Hello.
 
 I am currently trying to build kannel from source (on arm, if i wasnt then 
 I'd use the i386 binary). However, make says there's an error:
 
 gwlib/log.c: 434: error: invalid operations to binary == (have 'va_list' and 
 'void *')
 
 Line 434 is '(if args == NULL)'
 Excert below:
 
 static void PRINTFLIKE(1,0) kannel_syslog(char *format, va_list args, int 
 level)
 {
 char buf[4096]; /* Trying to syslog more than 4K could be bad */
 int translog;
 
 if (level = sysloglevel  dosyslog) {
 if (args == NULL) {
 strncpy(buf, format, sizeof(buf));
 buf[sizeof(buf) - 1] = '\0';
 } else {
 vsnprintf(buf, sizeof(buf), format, args);
 /* XXX vsnprint not 100% portable */
 }
 
 switch(level) {
 case GW_DEBUG:
 translog = LOG_DEBUG;
 break;
 case GW_INFO:
 translog = LOG_INFO;
 break;
 case GW_WARNING:
 translog = LOG_WARNING;
 break;
 case GW_ERROR:
 translog = LOG_ERR;
 break;
 case GW_PANIC:
 translog = LOG_ALERT;
 break;
 default:
 translog = LOG_INFO;
 break;
 }
 syslog(translog, %s, buf);
 }
 }
 
 -- Forwarded message --
 From: Michael Black acct.sh...@gmail.com
 Date: Aug 19, 2012 1:46 PM
 Subject: Make Gateway Errors
 To: devel-subscr...@kannel.org
 
 Hello,
 
 I am currently attempting to build kannel from source; however, make says 
 there's an error:
 
 gwlib/log.c:434 error: invalid operations to binary == (have 'va_list' and 
 'void *')
 
 if (level = sysloglevel  dosyslog) {
 if (args == NULL) {
 strncpy(buf, format, sizeof(buf));
 buf[sizeof(buf) - 1] = '\0';
 } else {
 vsnprintf(buf, sizeof(buf), format, args);
 /* XXX vsnprint not 100% portable */
 }
 
 switch(level) {
 case GW_DEBUG:
 
 Whats wrong?
 
 Mark
 



Re: (RESOLVED) Make Gateway Errors

2012-08-20 Thread Andreas Fink
that doesn't necessary mean it will work... va_args are sometimes passed by 
value, sometimes passed by reference. it depends on the OS.


On 20.08.2012, at 23:46, Michael Black acct.sh...@gmail.com wrote:

 Thanks to Andreas and Rene for helping me fix this error:
 
 When I tried Rene's suggestion, i got an error similar to the original one. I 
 tried to make 'args' pass by reference when eval'd in the if statement, and 
 now it works:
 
 gwlib/log.c:434
  if (arg == NULL)   //orig 
  if (args == NULL) {  //corrected
 
 Sorry for wasting your time
 
 Gratefully,
 
 Mike
 
 On Aug 20, 2012 4:18 PM, Rene Kluwen rene.klu...@chimit.nl wrote:
 I am not into this stuff at all.
 
 But what if you change line 434 to:
 
  
 
 if ((void *)args == NULL)
 
  
 
 Probably you will run into other errors as well. But if this is the only 
 thing, here goes.
 
  
 
 == Rene
 
  
 
 From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On 
 Behalf Of Michael Black
 Sent: Monday, 20 August, 2012 20:41
 To: de...@vm1.kannel.org
 Subject: Fwd: Re: Make Gateway Errors
 
  
 
 Hello to all,
 
 I was working with Andreas regarding an error i received while attempting to 
 make Kannel 1.4. I am using ubuntu maverick, 2.6.32.21. I followed the 
 instructions in the online READM. All correspondence is forwarded, below.
 
 -- Forwarded message --
 From: Michael Black acct.sh...@gmail.com
 Date: Aug 20, 2012 11:29 AM
 Subject: Re: Make Gateway Errors
 To: Andreas Fink af...@list.fink.org
 
 
 Also, im using ubuntu maverick
 
 So you should be getting the stdarg.h any minute now...you said it was an 
 easy fix? Im guessing it wasnt as easy as editing a few lines of stdarg.h, eh?
 
 I scanned some of the source so (as far as i know), i cant be rid of 
 kannel_syslog, and in the gwlib/log.c it uses it extensively, so you didnt 
 comment anything out in the log.c, right?
 
 Honestly, i really appreciate your help!
 
 On Aug 20, 2012 11:13 AM, Andreas Fink af...@list.fink.org wrote:
 
 I've run into this problem when porting gwlib to another platform. it has to 
 do with how the system deals with standard arguments. on some va-list is a 
 pointer, on others its some kind of struct etc.
 
 I dont remember exactly how I solved it but its realtively easy to do. And 
 actually I thought configure does it but apparently it doesnt
 
  
 
 On 20.08.2012, at 17:05, Michael Black acct.sh...@gmail.com wrote:
 
 
 
 
 Also, i followed the instructions in the README 
 http://www.kannel.org/download/1.4.3/README-1.4.3
 
 ./configure
 touch .depend 
 make depend 
 make (stuck here)
 
 On Aug 20, 2012 10:57 AM, Michael Black acct.sh...@gmail.com wrote:
 
 # uname -a
 Linux localhost 2.6.32.21-gd2764ed #1 PREEMPT Tue Oct 26 16:04:03 CST 2010 
 armv7l GNU/Linux
 
 On Aug 20, 2012 10:09 AM, Andreas Fink af...@list.fink.org wrote:
 
 what OS are you using?
 
  
 
 On 20.08.2012, at 16:08, Michael Black acct.sh...@gmail.com wrote:
 
 
 
 
 Yeah, i ran ./configure the first time, i then removed the *.o's/linkeds and 
 ran make again but im getting the same error
 
 On Aug 20, 2012 9:15 AM, Andreas Fink af...@list.fink.org wrote:
 
 did you run ./configure ?
 
 I've compiled kannel on Linux ARM before (on a pandaboard running Ubuntu) and 
 had no problem with it.
 
 ./configure checks for various va_list variants. 
 
  
 
 On 20.08.2012, at 15:12, Michael Black acct.sh...@gmail.com wrote:
 
 
 
 
 Hello.
 
 I am currently trying to build kannel from source (on arm, if i wasnt then 
 I'd use the i386 binary). However, make says there's an error:
 
 gwlib/log.c: 434: error: invalid operations to binary == (have 'va_list' and 
 'void *')
 
 Line 434 is '(if args == NULL)'
 Excert below:
 
 static void PRINTFLIKE(1,0) kannel_syslog(char *format, va_list args, int 
 level)
 {
 char buf[4096]; /* Trying to syslog more than 4K could be bad */
 int translog;
 
 if (level = sysloglevel  dosyslog) {
 if (args == NULL) {
 strncpy(buf, format, sizeof(buf));
 buf[sizeof(buf) - 1] = '\0';
 } else {
 vsnprintf(buf, sizeof(buf), format, args);
 /* XXX vsnprint not 100% portable */
 }
 
 switch(level) {
 case GW_DEBUG:
 translog = LOG_DEBUG;
 break;
 case GW_INFO:
 translog = LOG_INFO;
 break;
 case GW_WARNING:
 translog = LOG_WARNING;
 break;
 case GW_ERROR:
 translog = LOG_ERR;
 break;
 case GW_PANIC:
 translog = LOG_ALERT;
 break;
 default:
 translog = LOG_INFO;
 break;
 }
 syslog(translog, %s, buf);
 }
 }
 
 -- Forwarded message --
 From: Michael Black acct.sh...@gmail.com
 Date: Aug 19, 2012 1:46 PM
 Subject: Make Gateway Errors
 To: devel-subscr...@kannel.org
 
 
 Hello,
 
 I am currently attempting to build

Re: at smsc bug

2012-08-06 Thread Andreas Fink
gw/smsc/smsc_at.c line 252 access modem definitions. I guess a make clean makes 
it work.

On 06.08.2012, at 18:45, Rene Kluwen rene.klu...@chimit.nl wrote:

 Output from gdb:
  
 at2_open_device (privdata=0x9d712e0) at gw/smsc/smsc_at.c:252
 252 if(privdata-modem-hardware_flow_control) {
 (gdb) backtrace
 #0  at2_open_device (privdata=0x9d712e0) at gw/smsc/smsc_at.c:252
 #1  0x0808764d in at2_test_speed (privdata=0x0, speed=5) at 
 gw/smsc/smsc_at.c:2595
 #2  0x080877ca in at2_device_thread (arg=0x9d75240) at gw/smsc/smsc_at.c:2577
 #3  0x080d3541 in new_thread (arg=0x9d71420) at gwlib/gwthread-pthread.c:362
 #4  0x009bc45b in start_thread () from /lib/libpthread.so.0
 #5  0x0091423e in clone () from /lib/libc.so.6
  
 From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
 Sent: Monday, 06 August, 2012 18:38
 To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
 Subject: RE: at smsc bug
  
 Could it be that privdata-modem still has a NULL value at that time?
  
 =+= Rene
  
  
 From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
 Sent: Monday, 06 August, 2012 18:32
 To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
 Subject: RE: at smsc bug
  
 If I comment out the lines between:
  
 #if defined(CRTSCTS) and #endif, then it works.
  
 Weird…
  
 == Rene
  
 From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On 
 Behalf Of Rene Kluwen
 Sent: Monday, 06 August, 2012 18:21
 To: 'Andreas Fink'; de...@vm1.kannel.org
 Subject: RE: at smsc bug
  
 These are the changes that were made since the version that worked (see 
 attached document).
 I tried both hardware-flow-control = true and false. Both gave me the same 
 error.
  
 == Rene
  
  
 From: Andreas Fink [mailto:af...@list.fink.org] 
 Sent: Monday, 06 August, 2012 18:07
 To: Rene Kluwen
 Subject: Re: at smsc bug
  
 please run it in with log-level=0 and send the output of the logfile so we 
 can see the backtrace of the issue.
  
 On 06.08.2012, at 18:01, Rene Kluwen rene.klu...@chimit.nl wrote:
  
 
 When starting current head revision in combination with a huwaei usb modem, I 
 get the following.
 An older version of bearerbox has been working perfectly for some months 
 already. This happened when I tried to upgrade.
 This is on a production machine, so it is a little bit hard to debug. The 
 only thing that left me was downgrading again.
  
 Logs:
  
 2012-08-06 17:55:07 [6608] [0] INFO: 
 2012-08-06 17:55:07 [6608] [0] INFO: Kannel bearerbox II version svn-r4988 
 starting
 2012-08-06 17:55:07 [6608] [0] INFO: MAIN: Start-up done, entering mainloop
 2012-08-06 17:55:07 [6608] [0] DEBUG: AT2[hvgsmsc]: start called
 2012-08-06 17:55:07 [6608] [6] DEBUG: Thread 6 
 (gw/smsc/smsc_at.c:at2_device_thread) maps to pid 6608.
 2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: detecting modem speed.
 2012-08-06 17:55:07 [6608] [6] INFO: AT2[hvgsmsc]: opening device
 2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: device opened. Telnet 
 mode = 0
 2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80e8ebd]
 2012-08-06 17:55:07 [6608] [6] PANIC: [0x160440]
 2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x808764d]
 2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80877ca]
 2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80d3541]
 2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libpthread.so.0 [0x9bc45b]
 2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libc.so.6(clone+0x5e) [0x91423e]
 Segmentation fault
  
 Config:
  
 group = smsc
 smsc-id = hvgsmsc
 smsc = at
 modemtype=auto
 device=/dev/ttyUSB0
 my-number=+316xxx
 pin = 
 connect-allow-ip = 127.0.0.1
 sms-center = +316540881000
 log-level = 0
 sim-buffering = true
  
 group = modems
 id = huawei
 name = Huawei
 detect-string = huawei
 detect-string2 = K3765
 init-string = ATQ0 V1 E1 S0=0 C1 D2 +FCLASS=0; +CNMI=1,1,0,2,0; +CMEE=1
 message-storage = SM
 message-start = 0
  
  



Re: at smsc bug

2012-08-06 Thread Andreas Fink
ok it was in fact a bug. If no modem definition was used it was accessing 
memory which was never allocated.
SVN now has a fix for it.


On 06.08.2012, at 18:49, Rene Kluwen rene.klu...@chimit.nl wrote:

 I could “fix” it by changing line 252 of smsc_at.c to:
  
 if(privdata-modem  privdata-modem-hardware_flow_control) {
  
 But… This assumes that if there’s still no modem detected at that time, 
 hardware flow control is disabled.
 If that is not a correct assumption, the expression needs to be inverted.
  
 == Rene
  
 From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
 Sent: Monday, 06 August, 2012 18:46
 To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
 Subject: RE: at smsc bug
  
 Output from gdb:
  
 at2_open_device (privdata=0x9d712e0) at gw/smsc/smsc_at.c:252
 252 if(privdata-modem-hardware_flow_control) {
 (gdb) backtrace
 #0  at2_open_device (privdata=0x9d712e0) at gw/smsc/smsc_at.c:252
 #1  0x0808764d in at2_test_speed (privdata=0x0, speed=5) at 
 gw/smsc/smsc_at.c:2595
 #2  0x080877ca in at2_device_thread (arg=0x9d75240) at gw/smsc/smsc_at.c:2577
 #3  0x080d3541 in new_thread (arg=0x9d71420) at gwlib/gwthread-pthread.c:362
 #4  0x009bc45b in start_thread () from /lib/libpthread.so.0
 #5  0x0091423e in clone () from /lib/libc.so.6
  
 From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
 Sent: Monday, 06 August, 2012 18:38
 To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
 Subject: RE: at smsc bug
  
 Could it be that privdata-modem still has a NULL value at that time?
  
 =+= Rene
  
  
 From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
 Sent: Monday, 06 August, 2012 18:32
 To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
 Subject: RE: at smsc bug
  
 If I comment out the lines between:
  
 #if defined(CRTSCTS) and #endif, then it works.
  
 Weird…
  
 == Rene
  
 From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On 
 Behalf Of Rene Kluwen
 Sent: Monday, 06 August, 2012 18:21
 To: 'Andreas Fink'; de...@vm1.kannel.org
 Subject: RE: at smsc bug
  
 These are the changes that were made since the version that worked (see 
 attached document).
 I tried both hardware-flow-control = true and false. Both gave me the same 
 error.
  
 == Rene
  
  
 From: Andreas Fink [mailto:af...@list.fink.org] 
 Sent: Monday, 06 August, 2012 18:07
 To: Rene Kluwen
 Subject: Re: at smsc bug
  
 please run it in with log-level=0 and send the output of the logfile so we 
 can see the backtrace of the issue.
  
 On 06.08.2012, at 18:01, Rene Kluwen rene.klu...@chimit.nl wrote:
  
 
 When starting current head revision in combination with a huwaei usb modem, I 
 get the following.
 An older version of bearerbox has been working perfectly for some months 
 already. This happened when I tried to upgrade.
 This is on a production machine, so it is a little bit hard to debug. The 
 only thing that left me was downgrading again.
  
 Logs:
  
 2012-08-06 17:55:07 [6608] [0] INFO: 
 2012-08-06 17:55:07 [6608] [0] INFO: Kannel bearerbox II version svn-r4988 
 starting
 2012-08-06 17:55:07 [6608] [0] INFO: MAIN: Start-up done, entering mainloop
 2012-08-06 17:55:07 [6608] [0] DEBUG: AT2[hvgsmsc]: start called
 2012-08-06 17:55:07 [6608] [6] DEBUG: Thread 6 
 (gw/smsc/smsc_at.c:at2_device_thread) maps to pid 6608.
 2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: detecting modem speed.
 2012-08-06 17:55:07 [6608] [6] INFO: AT2[hvgsmsc]: opening device
 2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: device opened. Telnet 
 mode = 0
 2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80e8ebd]
 2012-08-06 17:55:07 [6608] [6] PANIC: [0x160440]
 2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x808764d]
 2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80877ca]
 2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80d3541]
 2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libpthread.so.0 [0x9bc45b]
 2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libc.so.6(clone+0x5e) [0x91423e]
 Segmentation fault
  
 Config:
  
 group = smsc
 smsc-id = hvgsmsc
 smsc = at
 modemtype=auto
 device=/dev/ttyUSB0
 my-number=+316xxx
 pin = 
 connect-allow-ip = 127.0.0.1
 sms-center = +316540881000
 log-level = 0
 sim-buffering = true
  
 group = modems
 id = huawei
 name = Huawei
 detect-string = huawei
 detect-string2 = K3765
 init-string = ATQ0 V1 E1 S0=0 C1 D2 +FCLASS=0; +CNMI=1,1,0,2,0; +CMEE=1
 message-storage = SM
 message-start = 0
  
  



Re: dlr-retry-queue patch

2012-07-23 Thread Andreas Fink
Dear Kevin,

The DLR database entry is a temporary one. The Kannel instance which sends the 
submit_sm is the entity which also will get the delivery reports. So you should 
not have any issues in replication. The only reason why you would have this is 
if you have multiple kannel's on multiple machines connecting to the same smsc 
with the same user-id. The work around is simply to use different user-id's so 
the SMSC will route the delivery report back to the kannel which originally 
submitted the SMS. Then  every kannel can and should have his private DLR 
storage. Replication might be useful for backup purposes or failover but that's 
about it. Should one kannel fail, another kannel on another machine can be 
fired up with the failed kannel's username and database access to take over 
that load.

Maybe you explain better what you are trying to achieve...



On 23.07.2012, at 11:43, Stevenard, Kevin (Kevin) wrote:

 Hello Kannel users,
 
 I have written a patch on the smsc_smpp connector to implement a DLR retry 
 queue. In our services we are highly dependent of delivery reports. We were 
 first using a patch 
 (http://www.blogalex.com/wp-content/uploads/2009/05/kannel-dlr-retry.patch) 
 but we were not happy with the following:
 - blocking io thread due to the sleep implemented at dlr search level
 - preventing instant deliver_sm_resp (due also to the sleep blocking io 
 thread)
 - system wide retry, can not be configured per account
 
 As our setup is composed of several servers in a 'cluster' each server is 
 running Kannel with several smpp/emi binds and each server is writing 
 delivery reports in a local MySQL backend. We then use master-master 
 replication to spread dlr entries on all servers.
 As we have multiple servers and multiple binds its possible to get a dlr 
 through a deliver_sm before we received the submit_sm_resp containing the 
 message id or before the dlr entry is written and replicated in other db 
 servers (even with a lag  1sec).
 
 So the patch is adding a queue per smscconn and creates for each of them a 
 dedicated thread to re-process dlr that have not been found in the dlr store, 
 if not configured no queue and no thread are created. 
 
 To configure it:
 dlr-retry-count: Number of attempts to process a delivery report if not found 
 in the delivery reports store. Defaults to 0 times (disabled).
 dlr-retry-interval: This timer specifies the interval time between delivery 
 reports retries. Defaults to 60 seconds.
 
 #sample in a group = smsc  smsc = smpp:
 dlr-retry-interval = 60
 dlr-retry-count = 3
 
 
 dlr-retry-queue.patch





Patch for more detailled modem use.

2012-06-21 Thread Andreas Fink
: %d,%d,%s, 
selection_type,operator_name_format,operator_code[0]);
+O_DESTROY(privdata-current_operator);
+privdata-current_operator = octstr_create(operator_code);
+   at2_update_status(privdata);
+   continue;
+}
+   if (octstr_search(line, octstr_imm(+CMTI:), 0) != -1 
|| 
 octstr_search(line, octstr_imm(+CDSI:), 0) != -1) {
 /* 
  * we received an incoming message indication
@@ -929,7 +987,6 @@
 return ret;
 }
 
-
 static int at2_read_delete_message(PrivAT2data* privdata, int message_number)
 {
 char cmd[20];
@@ -1400,6 +1457,9 @@
 reconnecting = 1;
 goto reconnect;
 }
+
+   at2_send_modem_command(privdata,AT+CSQ, 5, 0);
+   at2_send_modem_command(privdata,AT+COPS?, 5, 0);
 idle_timeout = time(NULL);
 }
 
@@ -1426,7 +1486,7 @@
 at2_destroy_modem(privdata-modem);
 octstr_destroy(privdata-device);
 octstr_destroy(privdata-ilb);
-octstr_destroy(privdata-lines);
+   O_DESTROY(privdata-lines);
 octstr_destroy(privdata-pin);
 octstr_destroy(privdata-validityperiod);
 octstr_destroy(privdata-my_number);
@@ -1526,7 +1586,12 @@
 privdata-pending_incoming_messages = gwlist_create();
 
 privdata-configfile = cfg_get_configfile(cfg);
-
+   privdata-rssi = -1;
+   privdata-ber = -1;
+   privdata-current_operator = NULL;
+   privdata-imsi=NULL;
+   privdata-cardnumber=NULL;
+   privdata-msisdn=NULL;
 privdata-device = cfg_get(cfg, octstr_imm(device));
 if (privdata-device == NULL) {
 error(0, AT2[-]: 'device' missing in at2 configuration.);
@@ -2846,7 +2911,7 @@
 modem-keepalive_cmd = cfg_get(grp, octstr_imm(keepalive-cmd));
 if (modem-keepalive_cmd == NULL)
 modem-keepalive_cmd = octstr_create(AT);
-
+
 modem-message_storage = cfg_get(grp, octstr_imm(message-storage));
 if (cfg_get_integer(modem-message_start, grp, 
octstr_imm(message-start)))
 modem-message_start = 1;
@@ -3431,3 +3496,20 @@
 }
 }
 
+void at2_update_status(PrivAT2data *privdata)
+{
+   Octstr *old = privdata-conn-smsc_specific_status;
+   privdata-conn-smsc_specific_status = octstr_format(CurrentOperator: 
%s,(privdata-current_operator ? 
octstr_get_cstr(privdata-current_operator):));
+   if(privdata-rssi=0)
+   octstr_format_append(privdata-conn-smsc_specific_status, 
Signal: %d,privdata-rssi);
+   if(octstr_len(privdata-imsi)0)
+   octstr_format_append(privdata-conn-smsc_specific_status, 
IMSI: %s,octstr_get_cstr(privdata-imsi));
+   if(octstr_len(privdata-cardnumber)0)
+   octstr_format_append(privdata-conn-smsc_specific_status, 
CardNumber: %s,octstr_get_cstr(privdata-cardnumber));
+   octstr_format_append(privdata-conn-smsc_specific_status, Device: 
%s,octstr_get_cstr(privdata-device));
+   if(privdata-msisdn)
+   octstr_format_append(privdata-conn-smsc_specific_status, 
MSISDN: %s,octstr_get_cstr(privdata-msisdn));
+
+   if(old)
+   octstr_destroy(old);
+}
sh-3.2# 
Also in my setup delivery reports don't work but i have not figured out why yet. Looks like the modems never give them back to me. Anybody seen this working in his setup?Andreas Fink

Re: Kannel configuration/keywords

2012-05-31 Thread Andreas Fink

something like this routes everything coming in.
max-messages will make sure the answer of that URL does not get sent back 
(assuming the answers will be pushed independently instead).


group = sms-service
keyword = default
url = 
http://localhost/incoming.php?from=%qto=%Qtext=%budh=%usmsc=%fcoding=%cdcs=%Ots=%T;
max-messages = 0



On 31.05.2012, at 13:44, Tone Irene Andersen wrote:

 Hi. Thank you for reply.
  
 Could you show me how to setup kannel for this kind of forwarding?
  
  
 Regards,
  
 Tone Irene Andersen
  
 From: Andreas Fink
 Sent: Thursday, May 31, 2012 1:36 PM
 To: Tone Irene Andersen
 Subject: Re: Kannel configuration/keywords
  
 
  
 
  
 On 31.05.2012, at 13:30, Tone Irene Andersen wrote:
 
 Hi..
 I am about to start my own sms company. Ive been looking at kannel and some 
 other sms gateways, i will only need one gateway that can act as the message 
 processor since i have a smpp connection to a company.
  
 However ive been reading and reading about kannel. Its configuration and how 
 to get config and such into mysql. The userguide is hard to read for some 
 people since its so development focused.
  
 I have a few scenarios where i would like to have this in mysql.
  
 1) Several keywords, on different virtual mobile numbers. This process to 
 rewrite the config files, and then restart kannel would be a big problem. 
 Would this be possible to add to mysql? And if so, how?
 2) Callback on Two-way sms. DLR etc. I need this to be put into different 
 get-url’s, and a way to handle that was to be able to put them into mysql. 
 If this is possible? Please put me in the right direction.
  
 you can simply have kannel forward all your incoming data into a PHP script 
 which then looks up the database and forwards accordingly.
 
  
  
 Thank you in advance for help.
  
 Mvh / Best Regards
 
 
 Tone Irene Andersen
 
  
  
  
 
 Andreas Fink
 SMSRelay AG
 -
 Tel: +41-61-333 Fax: +41-61-331
 Mobile: +41 78 66 77 333
 Address: Clarastrasse 3, 4058 Basel, Switzerland
 E-Mail:  af...@smsrelay.com
 Homepage: http://www.smsrelay.com
 -
 ICQ: 8239353 MSN: andr...@fink.org Skype: andreasfink
 iChat: af...@mac.com Yahoo: finkconsulting AIM: smsrelay
 Global.AQ SMS: +88234 7000 00 12
 



Re: Problem with cgi-bin/sendsms when using deferred=0

2012-05-23 Thread Andreas Fink
is 0 really current time and not 1.1.1970  maybe?

In that case the SMSC is absolutely right in rejecting a delivery in the past.

On 23.05.2012, at 16:07, Alexander Malysh wrote:

 Hi Tanja,
 
 please keep devel@ in CC...
 
 It's not really a BUG of Kannel because in SMPP it's not defined that 
 schedule_delivery_time should be in the future.
 Therefore Kannel does what you are asking for, send schedule_delivery_time 
 with current time.
 
 We can workaround it in kannel BUT it's mostly your bug to sent deferred=0 
 since you know SMSC doesn't accept it.
 
 Thanks,
 Alex
 
 P.S. I will fix it in SVN...
 
 Am 23.05.2012 um 15:47 schrieb Tanja Kipreska:
 
 Hello Alexander,
 
 Please find attached requested log(s). I was sending SMS to 38976514008.
 
 Meanwhile I was analyzing the code and I believe that changing line no. 963 
 in smsc_smpp.c from 
 
 if (msg-sms.deferred != SMS_PARAM_UNDEFINED) {
 
 to
 
 if ((msg-sms.deferred)(msg-sms.deferred != SMS_PARAM_UNDEFINED)) {
 
 may solve the problem.
 
 Looking forward to your answer.
 
 Regards,
 Tanja
 
 On Wed, May 23, 2012 at 11:30 AM, Alexander Malysh amal...@kannel.org 
 wrote:
 Hi,
 
 could you please provide debug log for this submit_sm?
 
 Thanks,
 Alex
 
 Am 22.05.2012 um 16:45 schrieb Tanja Kipreska:
 
  Dear All,
 
  I've noticed problem with kannel 1.5.0 when I'm submitting AO-MT sms using 
  cgi-bin/sendsms deferred parameter. Namely, when i put deferred=0 in the 
  URL the message is rejected by the SMS center with error Invalid 
  scheduled delivery time. I'm currently using kannel 1.3.1 in production 
  and have performed the same test and message was accepted and successfully 
  delivered.
 
  Can this be categorized as bug in kannel 1.5.0 and be fixed soon?
 
  Thanks in advance,
  Tanja
 
 
 
 logs.zip
 



Re: Send User Data question

2012-04-04 Thread Andreas Fink
you have to URL encode your bytes.
what you are doing is you are sending a text containing FF 06... characters not 
the bytes they should represent

Try with text= %FF%06%01...

On 04.04.2012, at 07:44, George Karagheaur wrote:

 Dear all,
 I am stuck in a simple i think problem, but already 2 nights without sleep :) 
 Maybe somebody can guide me.
 
 I am trying to send some data message using kannel and calling HTTP GET like 
 this:
 
 http://YYY:XX/cgi-bin/sendsms?username=xpassword=to=xfrom=text=FF0601010013010013800C00310031003000200070002E0800dlr-mask=31pid=127coding=1mclass=2
 
 i need the text body to be transmited as it is to the sim card, instead i get:
 
 2012-04-04 05:37:21 [283] [6] DEBUG: data: 46 46 30 36 30 31 30 31 30 30 31 
 33 30 31 30 30 FF06010100130100
 2012-04-04 05:37:21 [283] [6] DEBUG: data: 31 33 38 30 30 43 30 30 33 31 30 
 30 33 31 30 30 13800C0031003100
 2012-04-04 05:37:21 [283] [6] DEBUG: data: 33 30 30 30 32 30 30 30 37 30 30 
 30 32 45 30 38 3000200070002E08
 2012-04-04 05:37:21 [283] [6] DEBUG: data: 30 30 00
 
 I need this FF and so on to be send exactly as data.
 
 Can somebody tell me, where i am making mistake, because i am sure the 
 problem is very simple, but still cant find it :(
 -- 
 Best regards,
 George Karagheaur
 Mob: +79165482960
 Skype: george.karagheaur
 Email/MSN: george.karaghe...@gmail.com
 
 



Re: how many smsboxs can connect to bearerbox?

2012-02-29 Thread Andreas Fink
there is no absolute limit. All smsboxes would share the incoming MO's in a 
load sharing fashion.

On 03.02.2012, at 19:01, zhu shi song wrote:

 I have one application that have many smsboxs.  Each smsbox needs connect to 
 the same bearerbox.  I want to know how many smsboxs can beaerbox can support 
 and about the performance in this situation. 



Re: Sqlbox DCS problem

2012-01-03 Thread Andreas Fink

They told me that the messages where being sent with DCS=216. They told me to 
set DCS to 1 if I'm sending 7-bit messages or DCS to 3 or 0 if I'm submitting 
ISO (8-bit message).

This is not really fully correct. Check out GSM 03.38 spec for values of DCS 
(http://www.3gpp.org/ftp/Specs/archive/03_series/03.38/0338-720.zip).
Value 216 = binary 1101 100
Which stands for

1101 = Message Waiting Indication Group
   1 = set Indication Active
   0 = reserved
   00 voicemail message waiting


In other words this message will switch on the voicemail indicator.

The voicemail indicator might not be supported on newer smartphones but older 
Nokias usually show a tape reel  (something like 0_0).
So this is a valid DCS message to go over the air.

Note: the SMPP DCS representation might not be the same as the GSM DCS 
representation in some cases.

For example your provider is saying DCS = 0 means 8 bit ISO but DCS=0 means 
default character set which is not ISO but GSM charset.
DCS=1 means 8 bit data, DCS=2 means UCS2 (UTF-16) and DCS=3 is a reserved value.

the SMPP specification lists this:

BitsMeaningNotes

 SMSCDefaultAlphabet

0001 IA5(CCITTT.50)/ASCII(ANSIX3.4) b)

0010 Octet unspecified (8-bit binary)   b)

0011 Latin1(ISO-8859-1) b)

0100 Octet unspecified (8-bit binary)   a)

0101 JIS(X0208-1990)b)

0110 Cyrllic(ISO-8859-5)b)

0111 Latin/Hebrew (ISO-8859-8)  b)

1000 UCS2(ISO/IEC-10646)a)

1001 PictogramEncoding  b)

1010 ISO-2022-JP(MusicCodes)b)

1011 reserved

1100 reserved

1101 Extended Kanji JIS(X 0212-1990)b)

1110 KSC5601b)

 reserved



1011 reserved

1100 GSMMWIcontrol-see[GSM03.38]d)

1101 GSMMWIcontrol-see[GSM03.38]d)

1110 reserved

 GSMmessageclasscontrol-see[GSM03.38] e) 







Notes:

a. These coding schemes are common to GSM, TDMA and CDMA. The SMPP protocol 
allows ESME applications to use the same DCS value (i.e. the GSM 03.38 value) 
for all three technologies.

b. In cases where a Data Coding Scheme is defined for TDMA and/ or CDMA but not 
defined for GSM, SMPP uses GSM 03.38 reserved values.

c. There is no default setting for the data_coding parameter.

d. The data_coding parameter will evolve to specify Character code settings 
only. Thus the recommended way to specify GSM MWI control is by specifying the 
relevant settings in the optional parameters _ms_msg_wait_facilities and 
ms_validity.

e. The data_coding parameter will evolve to specify Character code settings 
only. Thus the recommended way to specify GSM message class control is by 
specifying the relevant setting in the optional parameter dest_addr_subunit.




On 03.01.2012, at 19:08, Jorge Raimundo wrote:

 Hi Semion!
 
 Thanks for your reply!
 
 How exactly should I configure smsbox and sqlbox to act like you describe? 
 I'm sorry to ask you this, but I'm a newbie to kannel and I'm still 
 discovering how all the pieces fit together.
 
 Best regards,
 Jorge
 
 On Tue, Jan 3, 2012 at 5:51 PM, Semion Spivak sem...@smscoin.com wrote:
 Hi Jorge,
 
 To check what should be put to the database, try to connect sqlbox as 
 following:
 
 Smsbox - sqlbox - bearerbox
 
 Then, send a test sms via http request to smsbox, providing it with 
 dlr-mask=31 and dlr-url containing url-encoded values. The sqlbox should 
 create a correct sql row in the db and pass the message to the bearerbox. 
 Also, turn on the sql logging in your db before you check it, to catch the 
 insert command.
 
 -- 
 Sent from my Android phone with K-9 Mail. Please excuse my brevity.
 
 
 Jorge Raimundo jorge.raimu...@multivision.pt wrote:
 Hi all!
 
 I'm using sqlbox to send messages via SMPP, but I'm getting a very strange 
 problem.
 
 I've decided to use smsbox to handle the DLR via the dlr_url.
 
 So let me see if I can explain all the situations occurring.
 
 1st insertion on the database:
 INSERT INTO send_sms( momt, sender, receiver, msgdata, sms_type, dlr_mask, 
 dlr_url) VALUES ('MT', 'MV', '+3519**67', 'Hello world', 2, 31, 
 'http://my_domain/services/teste.php?type=%d%destination=91**7');
 
 As you can see, the URL has an error (it should have type=%ddestination 
 instead of type=%d%destination). This ended up in having a DLR with the 
 status of 8 (!?) not properly registered by the php script since the url is 
 malformed.
 
 2nd insertion on the database:
 INSERT INTO send_sms( momt, sender, receiver, msgdata, sms_type, dlr_mask, 
 dlr_url) VALUES ('MT', 'MV', '+3519**67', 'Hello world', 2, 31, 
 'http://my_domain/services/teste.php?type=%ddestination=91**7');
 
 This ended up in having a DLR with the status of 16 properly registered by my 
 php script (yes, it works with the dlr_url not encoded).
 
 At this 

SMPP bug?

2011-12-07 Thread Andreas Fink
Hi folks,

I run into an issue that delivery reports from our SMSC are not correctly 
processed in Kannel. Instead of a delivery report, kannel shows a incoming SMS.
I think the culprit lies in the following code:

smsc_smpp.c line 1549

   if (pdu-u.deliver_sm.esm_class  (0x04|0x08|0x20)) {

debug(bb.sms.smpp,0,SMPP[%s] handle_pdu, got DLR,
  octstr_get_cstr(smpp-conn-id));

According to SMPP 3.4 spec section 5.2.17 0x04 means Delivery, 0x08 means SME 
Manual/User Acknowledgment but value 0x20 is not defined. However value 0x10 
would be Intermediate notification requested.


Now could it be that either someone uses 0x20 as reserved value for a specific 
purpose or simply its a typo and it should be 0x10.

Any comments?


Andreas Fink
SMSRelay AG
-
Tel: +41-61-333 Fax: +41-61-331 
Mobile: +41 78 66 77 333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  af...@smsrelay.com
Homepage: http://www.smsrelay.com
-
ICQ: 8239353 MSN: andr...@fink.org Skype: andreasfink
iChat: af...@mac.com Yahoo: finkconsulting AIM: smsrelay
Global.AQ SMS: +88234 7000 00 12







Re: different opensmppbox-user routing to different smscs

2011-10-20 Thread Andreas Fink

On 20.10.2011, at 15:57, Steven König wrote:

 Hi,
 
 i have another question on opensmppbox and bearerbox.
 
 I would like to route two users who connect to opensmppbox via smpp to two 
 different smscs in the bearerbox.
 Since i understood the documentation, the routing takes the third value in 
 the smpp-logins of each value as smsbox-id for teh request.

this should be smsc-id, not smscbox-id
two different things.

 Then it passes the sms with this smsbox-id (e.g. smpp1 for sms originated by 
 user1) to the bearerbox.
 The bearerbox takes the assigned sms-route and routes the sms to the smsc-id 
 specified in the sms-route.
 
 Thats how I understood the Documentation. But with the test-scenario below it 
 doesn't work. The messages from user1 are sent over both smscs (smsc1 and 
 smsc2).
 
 What configuration-parameter is missing for such a routing?
 
 Thanks,
 Steven König
 
 
 Test-Scenario:
 
 smpplogins.txt:
 user1 pass1 smpp1 *.*.*.*
 user2 pass2 smpp2 *.*.*.*
 
 
 opensmppbox.conf:
 group = opensmppbox
 opensmppbox-id = smppbox1
 opensmppbox-port = 2346
 bearerbox-host = localhost
 bearerbox-port = 13001
 log-level = 0
 log-file = /var/log/kannel/opensmppbox.log
 our-system-id = KANNELSMSC
 smpp-logins = /etc/kannel/smpplogins.txt
 
 
 kannel.conf:
 group = core
 admin-port = 13000
 smsbox-port = 13001
 admin-password = bar
 log-file = /var/log/kannel/kannel-core.log
 log-level = 0
 access-log = /var/log/kannel/kannel-access.log
 store-file = /var/spool/kannel/kannel_core.store
 box-deny-ip = *.*.*.*
 box-allow-ip = 127.0.0.1
 
 # SMSBOX SETUP
 
 group = smsbox
 bearerbox-host = 127.0.0.1
 sendsms-port = 13013
 log-file = /var/log/kannel/smsbox_core.log
 log-level = 0
 access-log = /var/log/kannel/smsbox_access.log
 global-sender = 0815
 
 group = smsbox-route
 smsbox-id = smpp1
 smsc-id = smsc1
 
 group = smsbox-route
 smsbox-id = smpp2
 smsc-id = smsc2
 
 group = smsc
 smsc = http
 system-type = generic
 port = 13015
 smsc-id = smsc1
 denied-smsc-id = smsc2
 send-url = 
 http://192.168.10.99/sendtest.php?from=%Pto=%ptext=%bdcs=%Oudh=%ucharset=%Cmsgid=%i;
 status-success-regex = Sent.
 status-permfail-regex = error
 status-tempfail-regex = retry later
 generic-status-sent = 200
 generic-status-error = 404
 
 group = smsc
 smsc = http
 system-type = generic
 port = 13016
 smsc-id = smsc2
 denied-smsc-id = smsc1
 send-url = 
 http://192.168.10.100/sendtest.php?from=%Pto=%ptext=%bdcs=%Oudh=%ucharset=%Cmsgid=%i;
 status-success-regex = Sent.
 status-permfail-regex = error
 status-tempfail-regex = retry later
 generic-status-sent = 200
 generic-status-error = 404
 
 





Re: Using smppbox id

2011-10-19 Thread Andreas Fink
but its not an excuse for a totally wrecked design bug

On 19.10.2011, at 15:19, Rene Kluwen wrote:

 Like I said before: In clients.txt, you can put system-type to the
 opensmppbox-id and you are all set.
 
 == Rene
 
 
 -Original Message-
 From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
 Of Aarno Syvänen
 Sent: Wednesday, 19 October, 2011 09:35
 To: devel@kannel.org Devel
 Subject: Re: Using smppbox id
 
 
 In my case, there is an application between bearerbox and smppbox.
 Thus application must route to smppbox and not to its clients.
 
 Aarno
 
 
 On 18.10.2011, at 23:25, Rene Kluwen wrote:
 
 In this case the boxcid represents the particular ESME in subject to route
 the DLR/MO back to.
 Every ESME represents a different box as far as bearerbox is concerned.
 Multiple clients mean multiple bearerbox connections.
 What is (in your opinion) the bug in this logic?
 
 == Rene
 
 -Original Message-
 From: Andreas Fink [mailto:af...@list.fink.org] 
 Sent: Tuesday, 18 October, 2011 17:47
 To: Rene Kluwen
 Cc: devel Devel
 Subject: Re: Using smppbox id
 
 On 18.10.2011, at 17:44, Rene Kluwen wrote:
 
 Once you look further in the opensmppbox documentation, you will see that
 system-type (or system-id if use-systemid-as-smsboxid is set to true) is
 used as boxcid whilst communicating to bearerbox.
 This is to facilitate the proper return path for DLR's (and also: MO's)
 to
 the different ESME clients that are connected to opensmppbox.
 
 Secondly: You are right that opensmppbox-id is useless for routing
 purposes.
 That's why it is never used.
 
 but the purpose of the box-id is the routing back to the proper box.
 That's
 why I believe this is  a bug
 if you want to carry along ESME system type information to the bearerbox
 for
 logging or whatever, that's fine but it shouldnt be in the box-id as that
 has a clear purpose.
 
 
 
 
 
 
 
 
 
 
 
 





Re: Using smppbox id

2011-10-18 Thread Andreas Fink
The system type has nothing to do with the box-id.

The boxid is used to connect to bearerbox and is also used to route delivery 
reports back.
Oone box can only have one ID which is transmitted initially at connection time 
so having multiple smpp users sending this way different box-id's back would 
not make any sense at all as it would not get back due to the routing in 
bearerbox.

Secondly at the time OpenSMPPBox connects to bearerbox, the box-id is not yet 
set. In other words only the default routing is used which makes the use of 
box-id useless.

In our case we might have multiple boxes connected to one bearerbox. Such as a 
SMSBox and a OpenSMPPBox (or our own box which is in the workings). in this 
case bearerbox needs to know on which link the connection was coming from to 
send back the  delivery report through the right path.



On 18.10.2011, at 17:26, Rene Kluwen wrote:

 What you can do instead of changing the code is specify your smppboxid as a
 system-type in clients.txt.
 
 Wouldn't that be the same?
 
 -Original Message-
 From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
 Of Aarno Syvänen
 Sent: Tuesday, 18 October, 2011 15:02
 To: devel@kannel.org Devel
 Subject: Using smppbox id
 
 Hi List,
 
 simply changing box id in outgoing message to refer smppbox, and not to its
 client
 
 
 





Re: Using smppbox id

2011-10-18 Thread Andreas Fink
On 18.10.2011, at 17:44, Rene Kluwen wrote:

 Once you look further in the opensmppbox documentation, you will see that
 system-type (or system-id if use-systemid-as-smsboxid is set to true) is
 used as boxcid whilst communicating to bearerbox.
 This is to facilitate the proper return path for DLR's (and also: MO's) to
 the different ESME clients that are connected to opensmppbox.
 
 Secondly: You are right that opensmppbox-id is useless for routing purposes.
 That's why it is never used.

but the purpose of the box-id is the routing back to the proper box. That's why 
I believe this is  a bug
if you want to carry along ESME system type information to the bearerbox for 
logging or whatever, that's fine but it shouldnt be in the box-id as that has a 
clear purpose.





Re: A new builder on OpenIndiana (OpenSolaris)

2011-01-18 Thread Andreas Fink



On 19.01.2011, at 04:51, Lou Picciano wrote:

 Dear Kannel Friends,
 
 Hope this is the right place to ask, and that the inquiry is welcome!
 
 Am a new builder of kannel; hoping to build it on OpenIndiana - the 
 reincarnation of OpenSolaris. Right off the bat, it seem that make is having 
 trouble identifying the architecture, though configure is having no trouble; 
 it is idnetifying the system as i386-pc-solaris2.11. 

that seems somewhat correct if you run it on a i386 system.

 Have managed to determine that platform testing in configure.in is happening, 
 but really can't branch from there without 'professional guidance'! (I must 
 be getting something right, as kannel builds on Mac with no error.)
 
 Had anyone built kannel on OpenIndiana?
 
 utils/start-stop-daemon.c:94:2: #error Unknown architecture - cannot build 
 start-stop-daemon

I presume the configure file doesn't have a setting for i386-pc-solaris but 
only one for sparc solaris.
the start-stop-daemon isn't really needed anymore as kannel boxe's all have 
built-in daemonization and watchdogs.


 
 Thanks in advance, Lou
 
 




Andreas Fink

Fink Consulting GmbH
SMSRelay AG
DataCell ehf

---
Tel: +41-61-330 Fax: +41-61-331
Mobile: +41 78 66 77 333 (new!)
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.finkconsulting.com www.smsrelay.com www.datacell.com
---
ICQ: 8239353 MSN: m...@gni.ch AIM: smsrelay
Skype: andreasfink
Yahoo: finkconsulting 
Global.AQ SMS: +88234 7000 00 12

http://a-fink.blogspot.com/



Re: [BUG] Incorrect BIND Status for given command after reconnecting

2011-01-13 Thread Andreas Fink
there's nothing wrong in the trace you sent.


connection is lost:   2011-01-13 11:46:43 [27081] [45] ERROR: System error 104: 
Connection reset by peer
connection is reestablished: 2011-01-13 11:46:48 [27081] [45] DEBUG: Connecting 
to 213.139.63.193
BIND is sent: 2011-01-13 11:46:49 [27081] [45] DEBUG:   type_name: bind_receiver
BIND Is acknowledged: 2011-01-13 11:46:49 [27081] [45] DEBUG:   type_name: 
bind_receiver_resp

after this, the connection is live.

so this:

2011-01-13 11:47:19 [27081] [45] ERROR: SMPP[XYZ]: SMSC rejected last command, 
code 0x0004 (Incorrect BIND Status for given command).

should never occur because the connection is in fact proper established.
This is a protocol violation on the remote side in my understanding.

What Kannel could do better is to terminate the connection if such an error is 
sent.

On 13.01.2011, at 13:38, Mohammed Saleem wrote:

 
 Dear Kannelers
 
 Log Attached
 
 I am using svn kannel, I had an issue with SMPP, kannel doesn't reconnect 
 well when the connection is lost (reset) it reconnects and reports that the 
 connection is online, but it is not. all sent PDUs gets a reply with 
 generic_nack because the connection is not bound
 
 Do we have a bug here? I think kannel should monitor the last valid 
 enquire_link_resp received and reconnects at certain timeout?
 
 Thanks
 
 
 Best Regards,
 Mohammed M I Sleem
 
 http://www.abusleem.net  - Personal blog
 
 http://www.freakle.com - The Search Freak
 
 smsc_smpp_error_log.txt



Re: Patch: EMI UUCP DLRs (final)

2010-07-21 Thread Andreas Fink
just dont send two MT's to the same device in the same second. This is the fix. 
delay the second part for 2 sec so they can not get the same timestamp.

On 21.07.2010, at 09:23, Alexander Malysh wrote:

 Hi,
 
 2 MT at the same time are just not fixable for EMI due to the protocol flaw...
 
 Thanks,
 Alexander Malysh
 
 Am 21.07.2010 um 01:00 schrieb Vincent CHAVANIS:
 
 
 I'm +0 for this patch
 because i really dislike the LIKE '%searches', they are *extremely* slow
 but this is at least the most advanced patch that partially fixes the EMI's 
 dlr issue.
 *but* you still have an issue if 2 MTs are send in the same second (same ts) 
 to the same destination.
 which DLR will you take ? Assuming you're using an 'trans-id' for each MT,
 you have 1/2 (or more) chance to call the wrong one (depending on how this 
 was inserted on your db)
 I personnally experienced this on *hudges* MT pushes.
 
 Vincent
 
 
 Le 20/07/2010 23:05, Alexander Malysh a écrit :
 Hi Nikos,
 
 +1 except some indents issues but I will fix it myself...
 
 Any test results from users?
 
 Thanks,
 Alexander Malysh
 
 
 Am 20.07.2010 um 12:07 schrieb Nikos Balkanas:
 
 
 OK. I believe this is it.
 
 BR,
 Nikos
 - Original Message - From: Alexander Malyshamal...@kannel.org
 To: Nikos Balkanasnbalka...@gmail.com
 Cc: Byron Kiourtzoglouki...@intracom.gr;devel@kannel.org
 Sent: Tuesday, July 20, 2010 12:14 PM
 Subject: Re: Patch: EMI UUCP DLRs (final)
 
 
 Hi Nikos,
 
 see below ...
 
 Am 20.07.2010 um 03:03 schrieb Nikos Balkanas:
 
 
 Hi Alex,
 
 Please see inlined comments: I am still waiting feedback from some users 
 testing it.
 
 
 - Original Message - From: Alexander Malyshamal...@kannel.org
 To: Nikos Balkanasnbalka...@gmail.com
 Cc: Byron Kiourtzoglouki...@intracom.gr;devel@kannel.org
 Sent: Tuesday, July 20, 2010 1:14 AM
 Subject: Re: Patch: EMI UUCP DLRs (final)
 
 
 
 Hi Nikos,
 
 
 I'm back from vacation and here are comments to your patch. Patch looks 
 OK but still some things to fix:
 
 
 --- gw/dlr_mem.c (revision 4833)
 +++ gw/dlr_mem.c (working copy)
 @@ -125,8 +125,28 @@
 /* XXX: check destination addr too, because e.g. for UCP is not enough 
 to check only
   *  smsc and timestamp (timestamp is even without milliseconds)
   */
 -if(octstr_compare(dlr-smsc,smsc) == 0  
 octstr_compare(dlr-timestamp,ts) == 0)
 +if (dst){
 +   Octstr *dst_min;
 +   int len1 = octstr_len(dlr-destination), len2 = octstr_len(dst);
 +
 +   if (len1  len2)
 +  return(1);
 +
 +   dst_min = octstr_duplicate(dlr-destination);
 +   if (len1  len2)
 + octstr_delete(dst_min, 0, len1 - len2);
 +
 +   if (octstr_compare(dlr-smsc, smsc) == 0  octstr_compare(dlr-
 +   timestamp, ts) == 0  octstr_compare(dst_min, dst) == 0) {
 +   octstr_destroy(dst_min);
 return 0;
 +   }
 +   octstr_destroy(dst_min);
 +}
 +else
 +   if (octstr_compare(dlr-smsc, smsc) == 0  octstr_compare(dlr-
 +   timestamp, ts) == 0)
 +   return 0;
 
 
 why so complicated?
 if (dst) {
 pos = octstr_len(dlr-destination) - octstr_len(dst);
 if(pos  0)
pos = 0;
 if (octstr_compare(dlr-smsc, smsc) == 0  
 octstr_compare(dlr-timestamp, ts) == 0  
 octstr_search(dlr-destination, dst, pos) !  = -1)
return 0;
 } else ...
 
 Same degree of complexity. You use octstr_search, I use octstr_compare. 
 Personally I wouldn't use either, but octstr_search is slightly faster. 
 The only reason I used octstr_delete  compare is because you told me to 
 use truncate on a copy, and I even asked you twice about it. Will change 
 it.
 
 It's not the same. In my version you don't need  duplicate, destroy etc. 
 and it just simpler to read...
 
 
 
 --- gw/dlr_sdb.c (revision 4833)
 +++ gw/dlr_sdb.c (working copy)
 +if (dst)
 +   like = octstr_format(AND \%S\ LIKE '%%%S' %s, 
 fields-field_dst,
 +  dst, sdb_get_limit_str());
 +else
 +   like = octstr_imm(sdb_get_limit_str());
 
 
 why not keep sdb_get_limit() in place and do it as for other DBs?
 and \%S... seems to be wrong...
 
 I don't understand what you are asking for here. The code was like that 
 before and I didn't change it. \%S\ is a typo. Will fix.
 
 why did you put sdb_get_limit_str() here? it should be keep in sql = 
 octstr_format(select ... %s, sdb_get_limit_str, ...)...
 
 
 
 
 --- gw/dlr.c (revision 4833)
 +++ gw/dlr.c (working copy)
  Msg *msg = NULL;
   struct dlr_entry *dlr = NULL;
 + Octstr *dst_min = NULL;
 
 
 indents
 
 
 +if (use_dst  dst) {
 +   dst_min = octstr_duplicate(dst);
 +   int len = octstr_len(dst);
 +
 +   if (len  MIN_DST_LEN)
 +  octstr_delete(dst_min, 0, len - MIN_DST_LEN);
 + }
 
 I see. Intends are 3 spaces, instead of 4. That's why I don't use spaces. 
 I tried my best, but please feel free to adjust them exactly the way you 
 like them.
 
 :) kannel uses 4 spaces instead of tabs...
 
 
 
 indents...
 
 
  /* destroy struct 

Re: Kannel not doign parallel processing - delay of MO senigns to HTTP trigger as logn as 30 mnts

2010-04-05 Thread Andreas Fink
this sounds more like your webserver is not able to handle the load.
Kannel  can handle 2000 sms per seconds. I have seen that working.

You should look deeper into your logfiles to see what's causing the delay.

On 05.04.2010, at 18:30, andros agena wrote:

 We are in production with Kannel with the below version:
  
 At heavy traffic (30,000 messages or so for 15 mnts) We are facing delays of 
 30 to 45 mnts for MO received from SMSC to be sent to HTTP trigger. We see 
 messages in Kannel log but we onyl get the MOs  to http trigger servlet after 
 30 to 40 mnts of delay. This is happeneing at high loads - say 20,000 
 messages in 15 mnts span
 When we see the queue status it shows 0 in queue. We think it is not doing 
 parallel processing but one by one message handover to http trigger.
  
 Please help us. Is there any configuration we need to set for multi 
 processing of messages
 ?
  ---
 Kannel bearerbox version `cvs-20090729'.
 Build `Jul 29 2009 20:44:55', compiler `3.4.6 20060404 (Red Hat 3.4.6-10)'.
 System Linux, release 2.6.9-78.ELlargesmp, version #1 SMP Wed Jul 9 16:03:59 
 EDT 2008, machine x86_64.
 Hostname abc..com, IP xx.xx.xx.xx
 Libxml version 2.6.16.
 Using OpenSSL 0.9.7a Feb 19 2003.
 Compiled with MySQL 5.1.36, using MySQL 5.1.22-rc.
 Using native malloc.
 Status: running, uptime 30d 18h 7m 18s
 WDP: received 0 (0 queued), sent 0 (0 queued)
 SMS: received 174291 (0 queued), sent 395217 (0 queued), store size -1
 SMS: inbound (0.62,0.78,0.07) msg/sec, outbound (1.77,1.61,0.15) msg/sec
 DLR: 0 queued, using internal storage
 Box connections:
 smsbox:LSMPP, IP xx.xx.xx.xx (0 queued), (on-line 30d 18h 7m 12s)  
 SMSC connections:
 PARSMSC[PARSMSC]SMPP:xxx.xxx.xxx.:/:acdefg:SMPP (online 
 29343s, rcvd 173533, sent 395217, failed 5147, queued 0 msgs)
 



Re: Patch: mysql dlr pairing problem

2010-03-26 Thread Andreas Fink

On 26.03.2010, at 10:23, Gabor Maros wrote:

 
 Hi,
 
 I've got a patch, but do not know how to submit it here. I enclosed the
 patch and try to give a description, please accept it.
 http://old.nabble.com/file/p28039894/dlr_mysql.diff dlr_mysql.diff 
 http://old.nabble.com/file/p28039894/dlr_mysql.c_new dlr_mysql.c_new 
 
 Those messages are sent in the same secundum get the same FID from the same
 emi smsc. Incoming delivery notifications must be paired not just according
 to the FID but the target phone number. I corrected the 1.4.3 Stable code
 and enclosed both the diff and the new code itself.

There are two issues with your patch:

The timestamp is not unique in EMI/UCP however using the number can be an 
issue. For example in the case I have seen, I send to 079 2457333, but the 
delivery report comes back with 0041792457333. In other words, the SMSC does do 
numberconversions which makes above code fail.

The second issue is that for all the other drivers, the ts value is unique 
and thus no other field needs to be used. I can imagine some protocols not 
coming back with any phone number but only a message-id. So those drivers would 
fail all the time.

It might be better to do a search by ts and if that returns more than 1 record, 
then search by ts+number and if that returns 0, then search for a record with 
the same last 5 digits or so.

It's not perfect but that's a limitation of EMI/UCP implementations of CMG. In 
our own SMSC, the TS value is larger and always unique which avoids the issue 
(on the other hand we always use SMPP).






Andreas Fink

Fink Consulting GmbH
Global Networks Schweiz AG
BebbiCell AG
IceCell ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.finkconsulting.com www.global-networks.ch www.bebbicell.ch
---
ICQ: 8239353 MSN: m...@gni.ch AIM: smsrelay Skype: andreasfink
Yahoo: finkconsulting SMS: +41792457333

http://a-fink.blogspot.com/





Re: ç VS Ç in GSM 7 bit alphabet

2010-03-17 Thread Andreas Fink
I had this discussion a few days back.

Fact is that 03.38 specifies uppercase cedille
Fact is that Sony Ericsson show uppercase cedille
Nokia shows lowercase cedille however.

The spec is whatever the spec is. its in there since many many years and was 
never changed.

The change  I did in kannel is to accept upper and lower case and translate it 
on outgoing to 0x09 but on incoming translate it to uppercase. This at least 
means that if someone submits lowercase cedille, it gets mapped to c cedille 
(whatever the phone displays) instead of simply a c or a question mark.

On 17.03.2010, at 10:34, Guillaume Cottenceau wrote:

 Folks,
 
 I always believed that Ç was in GSM 7 bit alphabet, but not ç (it
 is stupid, but that's beyond the point).
 
 But I was pointed to that document recently:
 
 http://www.unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT
 
 excerpts:
 
 # This table contains the data the Unicode Consortium has on how
 #   ETSI GSM 03.38 7-bit default alphabet characters map into Unicode.
 # This mapping is based on ETSI TS 100 900 V7.2.0 (1999-07), with
 # a correction of 0x09 to *small* c-cedilla, instead of *capital*
 # C-cedilla.
 #
 (...)
 #
 #   The ETSI GSM 03.38 specification shows an uppercase C-cedilla
 #   glyph at 0x09. This may be the result of limited display
 #   capabilities for handling characters with descenders. However, the
 #   language coverage intent is clearly for the lowercase c-cedilla, as 
 shown
 #   in the mapping below. The mapping for uppercase C-cedilla is shown
 #   in a commented line in the mapping table.
 
 I believe it is relevant to Kannel because there is to and from
 GSM 7-bit alphabet conversions in Kannel, of course, for MO/MT
 transmissions. In Kannel implementation, seemingly relevant
 excerpts from gateway-1.4.3/gwlib/latin1_to_gsm.h include:
 
 /* 0xc7 */ 0x09, /* pc: NON PRINTABLE */(Ç)
 
 and
 
 /* 0xe7 */ NRP, /* pc: NON PRINTABLE */ (ç)
 
 What do you think? Should both of these chars rather map to 0x09?
 Have you ever seen a phone displaying ç from 0x09 from a GSM 7
 bit message (me never)?
 
 -- 
 Guillaume Cottenceau
 





Re: smpp support in kannel

2010-01-07 Thread Andreas Fink

On 06.01.2010, at 18:27, bmoyn...@vodafone.ie wrote:

 Hello,
 I cant seem to find documentation in relation to SMPP support in 
 Kannel.
 Does Kannel support reception of SMPP operations over TCP?

It supports SMPP client use but not being a SMPP server.
In other words, kannel connects to SMPP SMSC's and can send and receive SMS but 
it does not pose a s a SMSC server. The user access API is HTTP. That's the 
purpose of kannel.


 Can someone point me towards the handling code?
 
 Basically I have an application and I want it to bind and submit 
 messages to the Kannel GW.
 The messages I want to send and test include
 o single submit operations
 o submits with SAR
 o submits with large payload
 o submit with udh

look at the kannel documentation. There's many examples there. segmentation and 
reassembly is done transparently (if configured for).

 Does Kannel support reception of SAR, UDH and so on?

yes

 Does it handle the re-assembly of the TCP payload whereby multiple tcp 
 socket reads may be required to get the appropriate stream of bytes required.

Kannel supports the reception of multiple SMS parts from more than one TCP 
socket if its considered the same SMSC (smsc-id is the same). This is also used 
to improve speed on sending when using in non windowed mode.

 
 All feedback appreciated.
 
 Thank you.
 Bob
 
 
 I'm using Vodafone Mail - to get your free mobile email account go to 
 http://www.vodafone.ie
 Use of Vodafone Mail is subject to Terms and Conditions  
 http://www.vodafone.ie/terms/website
 
 
 





Re: debug

2009-12-28 Thread Andreas Fink
you should not use pthread_create but the kannel gwlib functions to create 
threads. I presume the thread has no way to find the console. Thats the 
additional stuff the kannel gwlib sets up for you.

On 28.12.2009, at 15:45, Esteban Cacavelos wrote:

 Hi there, i have the following problem: 
 
 i am trying to get information about strings through octstr_dum function but 
 the function never returns. 
 
 the call is made from a thread that is created in the main program. 
 
 
 
 int main (int argc, char *argv[])
 {
 
   Octstr *a;
 
   int cf_index;
   
pthread_t trhdReadBD;  
 
gwlib_init(); 
a = octstr_format(sdfdsf);
 
octstr_dump(a, 0); /*that works correctly*/
 
 
 pthread_create (trhdReadBD, NULL, vo_ptrReadBD,NULL);
pthread_join (trhdReadBD, NULL);
 
 
   return 0;
 }
 
 void *vo_ptrReadBD(void *unused){
 
 Octstr *string
 
 
 
 string = octstr_format(sdfdsf);
 
 /*the string is correctly charged*/
 printf (the string is : %s,octstr_get_cstr(string)  );
 
octstr_dump(string, 0);/*this doesn't work correctly*/
 
 }
 
 Thanks !
 
 
 



Re: Does Kannel Support IA5

2009-12-03 Thread Andreas Fink
Why not simply use UTF-8  as the character set to submit? Kannel converts it to 
the GSM character set when possible or to UCS2.

On 03.12.2009, at 16:52, Hillel wrote:

 Hi,
  
 We are using SMPP version 3.4 with Kannel CVS and Centos and for one operator 
 they require the IA5 character set.
 Kannel is giving the following error:
  
 2009-12-02 17:51:43 [2547] [23] ERROR: Failed to convert string from UTF-8 
 to IA5 - probably broken type names.
 2009-12-02 17:51:43 [2547] [23] ERROR: Failed to convert msgdata from charset 
 UTF-8 to IA5, will send as is.
  
 Would developers recommend using ASCII as the charset even though it not 
 exactly the same? 
 Or is there any other way?
  
 thanks



Re: DLR counters on the status page

2009-11-26 Thread Andreas Fink
php version = 6.0??
thats not existing yet.


On 25.11.2009, at 14:37, Vincent CHAVANIS wrote:

 Hi,
 
 You have short_open_tag ? on index.php  xmltoarray.php
 And *shouldn't* be like this as described in the php guidelines
 for further php releases (eg. = php 6.0)
 
 Could you please fix this asap?
 
 Then, i think we have to make a default working config
 for people who just want to quickly test this contrib.
 
$configs = array(
array( base_url = http://127.0.0.1:13000;,
   status_passwd = foo,
   admin_passwd = bar,
   name = Kannel default
 ),
);
 
 Also, you can also credit yourself ;-)
 as you re-wrote the script.
 
 Thanks
 
 Vincent.
 
 
 Alejandro Guerrieri a écrit :
 Commited to CVS.
 Regards,
 -- 
 Alejandro Guerrieri
 aguerri...@kannel.org
 On 24/11/2009, at 12:14, Alexander Malysh wrote:
 Alex, could you please commit this patch?
 
 Thanks,
 Alexander Malysh
 
 Am 17.11.2009 um 20:40 schrieb Alejandro Guerrieri:
 
 Please find a zip with the full folder attached.
 
 It's almost a full code rewrite, with lots of changes on the code 
 structure and UI as well, apart from support for the dlr fields.
 
 I'm working on a completely new, ajaxified version as well, stay tuned ;)
 
 Regards,
 -- 
 Alejandro Guerrieri
 aguerri...@kannel.org
 
 kannel-monitor.zip
 On 15/11/2009, at 15:44, Alexander Malysh wrote:
 
 Hi,
 
 @Alex: any news about kannel-monitor patch?
 
 Thanks,
 Alexander Malysh
 
 Am 11.11.2009 um 19:47 schrieb Alejandro Guerrieri:
 
 Working on it already, it'll be ready for tomorrow probably.
 
 Regards,
 -- 
 Alejandro Guerrieri
 aguerri...@kannel.org
 
 
 





Re: Interface to bearerbox

2009-11-19 Thread Andreas Fink
simplest is to do it before submitting from the application to kannel.
no end user uses kannel direct. End users use some Apache website who then 
forwards the SMS via PHP script or something similar to Kannel. Its way easier 
to solve the issue there. Kannel does nothing else than convert it to SMPP at 
the end but on the front end you have much more information. For example if you 
decide to block a certain spammer, you simply rate limit his IP address  to a 
certain level. A human will not type 100 sms per second. So giving him 1 sms 
per 2 minutes is a viable step. You don't have that information inside kannel.

On 19.11.2009, at 10:39, Nikos Balkanas wrote:

 Hi,
  
 Therefore I believe you have your answer. As Andreas says, in many countries 
 in Europe and the US, it is illegal to wiretap the content of your clients. 
 In other countries, like India, as you say, you are supposed to. If that code 
 was introduced in kannel, even if configurable, it could create a lashback 
 and possibly legal problems to operators using kannel in Europe.
  
 I feel that the best way would be an external application/process that could 
 be introduced in the flow and would be implemented only when required. 
 However, I don't know how difficult it is. For MTs you would have to support 
 HTTP  SMMP (examples for the latter you can find in test/drive_smpp.c). But 
 for MOs you would have to implement pretty much most of the smscs, if you 
 plan to do something more than simple dropping. Or use the smsc-reroute 
 option to route it to your application and reintroduce it later on.
  
 BR,
 Nikos
 - Original Message -
 From: Sreekanth GS
 To: Andreas Fink
 Cc: devel@kannel.org
 Sent: Thursday, November 19, 2009 9:58 AM
 Subject: Re: Interface to bearerbox
 
 Hello Andreas,
 
 1. A2P messaging does not come under privacy of information. Hence, it is 
 legal for us to track each and every A2P messages.
 
 2. Neither operator nor sender takes responsibility for spam in the court of 
 law, and the only liable person is the channel provider, that is us.
 
 3. We can only disconnect the client from sending further messages, and can 
 file a suit against that person for sending spam, however, TRAI, the govt. 
 body in our country strictly wants all vendors to enforce spam prevention 
 mechanisms, to identify and reject spams. So spam is indeed defined by us and 
 TRAI.
 
 4. The sending customer puts in an ALPHA sender ID, and hence cannot be 
 tracked as originator. Hence, all complaints finally has us as land point.
 
 5. Network congestion occurs, and queues build up. We often need to prevent 
 certain messages from getting delivered late hours, but send them next day.
 
 We have assembled an 8 member team to start working on the project.
 
 Regards,
 Sreekanth
 
 
 On Thu, Nov 19, 2009 at 12:31 PM, Andreas Fink af...@list.fink.org wrote:
 there's an additional issue here.
 how to define spam.
 in my case, the customer who sends the message is the originator. He is 
 liable for any spam complaints. However I can not filter messages away 
 because what I see as spam he might not see as spam and the receiver 
 neither. The receiver might have agreed to receive advertisement messages 
 from the sender. 
 
 The second issue is that we are not allowed to look at the content. Privacy 
 laws are very strict. Telecommunications  are covered under privacy. You can 
 not wiretap your customers phone line neither.
 
 The third issue is the customer pays you money to deliver the messages. So 
 you are obliged to deliver them.
 
 Normally what we see is that operators put pretty clear rules into their 
 contracts. If you get complaints from the receivers, you can simply hold the 
 sender liable. In other words, Â not your problem.
 
 On 19.11.2009, at 06:43, Alejandro Guerrieri wrote:
 
 smppbox has a plugin mechanism you could hook into. That would be the most 
 elegant approach imho. Check the examples, there's a C plugin showing how to 
 do it.
 
 Regards,
 --
 Alejandro Guerrieri
 aguerri...@kannel.org
 
 
 
 On 19/11/2009, at 4:23, Sreekanth GS wrote:
 
 Hello Nikos,
 
 1. The SMPP Connection is not used by a single client, he re-distributes it 
 to n levels. So the source of spam may not be from the direct client. In 
 countries like ours [India], there is no spam filtration from the operator, 
 and we are directly connected to the operator. So, above us, no spam 
 filtration works.
 
 2. We transmit around 1-1.5 million messages a day, in a 16 hour window, 
 and hence we badly need the spam filtration mechanism, and it is not viable 
 for us to reject messages assuming spam, and we can only hold, verify and 
 then release to the SMSC.
 
 3. Even if a message is caught as spam, and rejected, we need to 
 acknowledge back that it was rejected due to spam. I really dont think a 
 firewall would be above to send back that rejected PDU information, rather 
 than dropping the packets.
 
 Regards,
 Sreekanth
 
 2009/11/19 Nikos

Re: Interface to bearerbox

2009-11-18 Thread Andreas Fink
there's an additional issue here.
how to define spam.
in my case, the customer who sends the message is the originator. He is liable 
for any spam complaints. However I can not filter messages away because what I 
see as spam he might not see as spam and the receiver neither. The receiver 
might have agreed to receive advertisement messages from the sender. 

The second issue is that we are not allowed to look at the content. Privacy 
laws are very strict. Telecommunications  are covered under privacy. You can 
not wiretap your customers phone line neither.

The third issue is the customer pays you money to deliver the messages. So you 
are obliged to deliver them.

Normally what we see is that operators put pretty clear rules into their 
contracts. If you get complaints from the receivers, you can simply hold the 
sender liable. In other words,  not your problem.

On 19.11.2009, at 06:43, Alejandro Guerrieri wrote:

 smppbox has a plugin mechanism you could hook into. That would be the most 
 elegant approach imho. Check the examples, there's a C plugin showing how to 
 do it.
 
 Regards,
 --
 Alejandro Guerrieri
 aguerri...@kannel.org
 
 
 
 On 19/11/2009, at 4:23, Sreekanth GS wrote:
 
 Hello Nikos,
 
 1. The SMPP Connection is not used by a single client, he re-distributes it 
 to n levels. So the source of spam may not be from the direct client. In 
 countries like ours [India], there is no spam filtration from the operator, 
 and we are directly connected to the operator. So, above us, no spam 
 filtration works.
 
 2. We transmit around 1-1.5 million messages a day, in a 16 hour window, and 
 hence we badly need the spam filtration mechanism, and it is not viable for 
 us to reject messages assuming spam, and we can only hold, verify and then 
 release to the SMSC.
 
 3. Even if a message is caught as spam, and rejected, we need to acknowledge 
 back that it was rejected due to spam. I really dont think a firewall would 
 be above to send back that rejected PDU information, rather than dropping 
 the packets.
 
 Regards,
 Sreekanth
 
 2009/11/19 Nikos Balkanas n...@amdtelecom.net
 Hi,
 
 I will have to agree with Alvaro. Data mining, fraud, illegal and spam 
 messages are a can of worms that if kannel ever gets into, there is no way 
 out, with all legal ramifications. Not to mention a performance killer. Plus 
 a modular front end filtering would be much more flexible and customizable.
 
 For the smppbox interface I would like to stress 2 things:
 
 1) The average spammer or drug dealer won't use an SMPP connection to send 
 their messages. Upstream ESMEs will take responsibility for filtering them.
 2) An intelligent firewall could be used, one that would block all offensive 
 packages, based on content.
 
 BR,
 Nikos
 
 - Original Message - From: sreeka...@tngicube.co.in
 To: Alvaro Cornejo cornejo.alv...@gmail.com
 Cc: devel@kannel.org
 Sent: Thursday, November 19, 2009 2:41 AM
 
 Subject: Re: Interface to bearerbox
 
 
 Hello Alvaro,
 
 Indeed the same would suffice for kannel, but when the it comes to usage 
 with smppbox, I personally don't think it is enough for that is our 
 experience.
 
 Regards,
 Sreekanth
 Sent from BlackBerry® on Airtel
 
 -Original Message-
 From: Alvaro Cornejo cornejo.alv...@gmail.com
 Date: Wed, 18 Nov 2009 18:55:44
 To: Sreekanth GSsreeka...@tngicube.co.in
 Cc: devel@kannel.org
 Subject: Re: Interface to bearerbox
 
 Hi
 
 Kannel is a backend or a gateway for sending/receiving messages.
 Kannel is designed to handle huge amount of SMS traffic transparently
 to/from any external application, so you don΄t need to handle all kind
 of protocol issues.
 
 All you said is usually done through an external application of your
 own, with whom you can do all filtering/billing/features you
 need/want/desire.
 
 You do not need to patch / modify kannel for do what you want. Just
 with your own frontend will suffice.
 
 Regards
 
 Alvaro
 
 On Wed, Nov 18, 2009 at 6:27 PM, Sreekanth GS sreeka...@tngicube.co.in 
 wrote:
 Hello All,
 
 We are presently engaged in using kannel as our SMPP Client, and for the
 backend of smppbox. However, the interfacing to bearerboxes has been quite
 inadequate for us.
 
 Hence, we plan to develop a viable interface to bearerbox that will/can:
 
 1. Accept connections from smppbox, smsbox, sqlbox etc.
 2. Log received MSG structs to a db pool.
 3. Select specific messages from db pool using regex.
 4. Transmit selected messages in (3) to bearerbox.
 
 Similarly, catch MO/DLR returned by bearerbox.
 1. Select specific messages from db MO/DLR pool using regex.
 2. Send back the same to smppbox, smsbox, sqlbox etc.
 
 Why all this?
 
 smppbox transmits messages directly to bearerbox.
 - There is no hold and transmit scenario.
 - Manual approval of messages is not possible (in case of spam threats).
 - In between prioritizing of messages is not possible.
 - Manual modification of data is impossible, only automates is possible
 using 

Re: DLR parsing issue with SMPP

2009-09-28 Thread Andreas Fink

the delivery report is ill formatted:

2009-09-28 17:45:23 [9399] [14] DEBUG:  data: 31 30 37 39 38 34  
39 33 35 36 30 30 31 30 30 31   1079849356001001
2009-09-28 17:45:23 [9399] [14] DEBUG:  data: 30 39 30 39 32 38  
31 37 34 35 30 39 30 39 32 38   0909281745090928
2009-09-28 17:45:23 [9399] [14] DEBUG:  data: 31 37 34 35 44 45  
4c 49 56 52 44 30 30 30 54 45   1745DELIVRD000TE


See Appendix B of  SMPP_v3_4_Issue_1_2.pdf

SMPP provides for return of an SMSC delivery receipt via the  
deliver_sm or data_sm PDU, which indicates the delivery status of the  
message.
The informational content of an SMSC Delivery Receipt may be inserted  
into the short_message parameter of the deliver_sm operation. The  
format for this Delivery Receipt message is SMSC vendor specific but  
following is a typical example of Delivery Receipt report.
“id:II sub:SSS dlvrd:DDD submit date:YYMMDDhhmm done  
date:YYMMDDhhmm stat:DDD err:E Text: . . . . . . . . .”


in above text there are no id: , no sub: no dlvrd: no submit  
date: no done date: so kannel can not parse it.
It looks more like the parameters are just appended after each other  
without the labels.



On 28.09.2009, at 17:36, Michael Zervakis wrote:


Dear all,

We have an issue with a SMSC using SMPP and bearerbox cvs-20090921,  
where bearerbox can't decode correctly DLR message and therefore  
can't find the dlr report.


MT TCPDUMP
-
17:45:19.128701 IP 172.20.20.20.59241  172.30.30.30.3700: P  
3350057118:3350057172(54) ack 2867587379 win 142 nop,nop,timestamp  
153235712 108093610
  0x:  4500 006a 9d82 4000 4006 058c c129 e508   
e.@.@)..
  0x0010:  50f5 a058 e769 0e74 c7ad d09e aaeb e933   
P..X.i.t...3
  0x0020:  8018 008e 97dc  0101 080a 0922  
3100  .1.
  0x0030:  0671 60aa  0036  0004    .q` 
6
  0x0040:   87b3 0002 0139 3939 3939 0001 0139  ... 
9...9
  0x0050:  3939 3939 3939 3939 3939 3900 0300    
999.

  0x0060:  0001  0004 5445 5354 ..TEST

MT SMS BEARERBOX DEBUG
---
2009-09-28 17:45:19 [9399] [13] DEBUG: SMPP[SMSC]: Sending PDU:
2009-09-28 17:45:19 [9399] [13] DEBUG: SMPP PDU 0x821df38 dump:
2009-09-28 17:45:19 [9399] [13] DEBUG:   type_name: submit_sm
2009-09-28 17:45:19 [9399] [13] DEBUG:   command_id: 4 = 0x0004
2009-09-28 17:45:19 [9399] [13] DEBUG:   command_status: 0 =  
0x
2009-09-28 17:45:19 [9399] [13] DEBUG:   sequence_number: 34739 =  
0x87b3

2009-09-28 17:45:19 [9399] [13] DEBUG:   service_type: NULL
2009-09-28 17:45:19 [9399] [13] DEBUG:   source_addr_ton: 2 =  
0x0002
2009-09-28 17:45:19 [9399] [13] DEBUG:   source_addr_npi: 1 =  
0x0001

2009-09-28 17:45:19 [9399] [13] DEBUG:   source_addr: 9
2009-09-28 17:45:19 [9399] [13] DEBUG:   dest_addr_ton: 1 = 0x0001
2009-09-28 17:45:19 [9399] [13] DEBUG:   dest_addr_npi: 1 = 0x0001
2009-09-28 17:45:19 [9399] [13] DEBUG:   destination_addr:  


2009-09-28 17:45:19 [9399] [13] DEBUG:   esm_class: 3 = 0x0003
2009-09-28 17:45:19 [9399] [13] DEBUG:   protocol_id: 0 = 0x
2009-09-28 17:45:19 [9399] [13] DEBUG:   priority_flag: 0 = 0x
2009-09-28 17:45:19 [9399] [13] DEBUG:   schedule_delivery_time: NULL
2009-09-28 17:45:19 [9399] [13] DEBUG:   validity_period: NULL
2009-09-28 17:45:19 [9399] [13] DEBUG:   registered_delivery: 1 =  
0x0001
2009-09-28 17:45:19 [9399] [13] DEBUG:   replace_if_present_flag: 0  
= 0x

2009-09-28 17:45:19 [9399] [13] DEBUG:   data_coding: 0 = 0x
2009-09-28 17:45:19 [9399] [13] DEBUG:   sm_default_msg_id: 0 =  
0x

2009-09-28 17:45:19 [9399] [13] DEBUG:   sm_length: 4 = 0x0004
2009-09-28 17:45:19 [9399] [13] DEBUG:   short_message: TEST
2009-09-28 17:45:19 [9399] [13] DEBUG: SMPP PDU dump ends.
2009-09-28 17:45:19 [9399] [13] DEBUG: SMPP[SMSC]: Got PDU:
2009-09-28 17:45:19 [9399] [13] DEBUG: SMPP PDU 0x821df38 dump:
2009-09-28 17:45:19 [9399] [13] DEBUG:   type_name: submit_sm_resp
2009-09-28 17:45:19 [9399] [13] DEBUG:   command_id: 2147483652 =  
0x8004
2009-09-28 17:45:19 [9399] [13] DEBUG:   command_status: 0 =  
0x
2009-09-28 17:45:19 [9399] [13] DEBUG:   sequence_number: 34739 =  
0x87b3

2009-09-28 17:45:19 [9399] [13] DEBUG:   message_id: 405d318c
2009-09-28 17:45:19 [9399] [13] DEBUG: SMPP PDU dump ends.
2009-09-28 17:45:19 [9399] [13] DEBUG: DLR[mysql]: Adding DLR  
smsc=SMSC, ts=405d318c, src=9, dst=+, mask=1, boxc=GR

2009-09-28 17:45:19 [9399] [13] DEBUG: adding DLR entry into database
2009-09-28 17:45:19 [9399] [13] DEBUG: sql: INSERT INTO dlr (smsc,  
ts, source, destination, service, url, mask, boxcid, status) VALUES  
(?, ?, ?, ?, ?, ?, ?, ?, 0)



DLR TCPDUMP
--
17:45:23.627672 IP 172.30.30.30.3700  172.20.20.20.59242: P  
38944887:38944987(100) ack 3343504612 win 5792 nop,nop,timestamp  
108094881 

Re: CIMD2 correct value for sqlbox

2009-09-07 Thread Andreas Fink


On 07.09.2009, at 12:03, angela86 walczak wrote:


Hi,

I have a few cases receive encrypted unreadable text messages GSM7  
broadcast by CIMD2.
These cases relate to the foreign phone as the iPhone, not bought  
with the operator but used here.
Sending SMS messages as GSM7 entering the table in sqlbox text  
msgdata and


smstype = 2
mclass = 1
mwi = -1 (do not use this way Message Wait Indicate)
coding = 0
compress = 0
dlr_mask = 3
pid = 0 (default value which should I use?)
alt_dcs = 0
rpi = 0 (what is this parameter)
charset - not I set (or should I set? if he wants to give the gsm7)

I'm using 0.7.2 and sqlbox Kannel 1.4.3 stable on x64 centos.
The operating system on top applications consuming memory VIRT:
- 164M sqlbox
- 304m bearerbox
and very little CPU, compiled with debug.


What is the question? Not all SMS are GSM 7 bit encoded. some are 8  
bit or 16 bit Unicode or they are binary SMS.



 My second question is whether the amount of virtual memory is normal.


Depends on your operating system and use. It can easily be no virtual  
memory in use.






Andreas Fink

Fink Consulting GmbH
Global Networks Schweiz AG
BebbiCell AG
IceCell ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.finkconsulting.com www.global-networks.ch www.bebbicell.ch
---
ICQ: 8239353 MSN: m...@gni.ch AIM: smsrelay Skype: andreasfink
Yahoo: finkconsulting SMS: +41792457333

http://a-fink.blogspot.com/





Re: CIMD2 correct value for sqlbox

2009-09-07 Thread Andreas Fink


On 07.09.2009, at 17:24, angela86 walczak wrote:

Why SMS some times is unreadable on iphone or other phone. I want  
find must universal configuration for SMS.


Please provide exact example with config and debug log (log-level=0).  
Sometimes unreadable doesn't help. It could simply be wrongly  
encoded on submit.



I found http://tiliman.wordpress.com/2008/12/20/replacing-sms-on-a-phone-using-kannel-sms-gateway/ 
- is my pid  (0) correct or I should use (1)


PID is according to the GSM spec. So 0 is normal. Don't set PID  
unless you know exactly what you are doing with it.




Question about virtual memory is still valid, and Kannel sqlbox  
modify their own pieces of code to improve the work of the oracle,  
and I wanted to know if the linux centos x64 this amount of virtual  
memory is not memory leak.


Kannel is not leaking memory as far as I know. My kannel instances  
have transported millions of SMS over many months without increasing  
in memory footprint.
But I'm not using CIMD and I'm not using oracle nor am I using sqlbox.  
But the people on this mailing list keep a close eye on memory leaks.


We're running kannel on a embedded linux system with 128MB RAM and the  
following memory footprint:


Mem:127132k total,67240k used,59892k free, 3252k buffers
Swap:0k total,0k used,0k free,39004k cached

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 3269 root  15   0 96804 1764 1164 S  0.3  1.4  52:56.07 bearerbox
 3285 root  16   0 79504 2068 1120 S  0.0  1.6   5:31.75 smsbox






2009/9/7 Andreas Fink af...@list.fink.org

On 07.09.2009, at 12:03, angela86 walczak wrote:


Hi,

I have a few cases receive encrypted unreadable text messages GSM7  
broadcast by CIMD2.
These cases relate to the foreign phone as the iPhone, not bought  
with the operator but used here.
Sending SMS messages as GSM7 entering the table in sqlbox text  
msgdata and


smstype = 2
mclass = 1
mwi = -1 (do not use this way Message Wait Indicate)
coding = 0
compress = 0
dlr_mask = 3
pid = 0 (default value which should I use?)
alt_dcs = 0
rpi = 0 (what is this parameter)
charset - not I set (or should I set? if he wants to give the gsm7)

I'm using 0.7.2 and sqlbox Kannel 1.4.3 stable on x64 centos.
The operating system on top applications consuming memory VIRT:
- 164M sqlbox
- 304m bearerbox
and very little CPU, compiled with debug.


What is the question? Not all SMS are GSM 7 bit encoded. some are 8  
bit or 16 bit Unicode or they are binary SMS.


 My second question is whether the amount of virtual memory is  
normal.


Depends on your operating system and use. It can easily be no  
virtual memory in use.






Andreas Fink

Fink Consulting GmbH
Global Networks Schweiz AG
BebbiCell AG
IceCell ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.finkconsulting.com www.global-networks.ch www.bebbicell.ch
---
ICQ: 8239353 MSN: m...@gni.ch AIM: smsrelay Skype: andreasfink
Yahoo: finkconsulting SMS: +41792457333

http://a-fink.blogspot.com/








Re: error while ./configure kannel

2009-08-25 Thread Andreas Fink
install the developer version.. libxml2-dev. You probably only have  
the libraries without the include files


On 25.08.2009, at 19:20, mahendra panpalia wrote:


Hi,

I am new to Kannel and trying to compile it on Ubuntu.
while running configure file i am facing following error.

Checking for libxml2 support ...
checking for xml2-config... no
checking for xml-config... no
configure: error: You MUST have the libxml2 (aka gnome-xml) library  
installed



I have already installed the debian package for libxml2 and have  
checked (it is installed in /usr/lib).


still why it is asking for libxml2 library?
do i need to install some additional package for it?


--
Thanks and Kind Regards,
Mahendra Panpalia
Mob: +91 9686619640
http://tinyurl.com/mhk43k





Re: singlethreaded or multithreaded

2009-05-06 Thread Andreas Fink

What do you mean by DLR request?
Kannel asks the SMSC to report back. The SMSC will report whenever  
something is happening and kannel forwards it to http.


On 06.05.2009, at 16:18, Beatrice Tamburrino wrote:


hi,

how does kannel send the dlr-requests? sequentiell? or pararell  
multithreaded??


xox

bea
--
Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit  
allen: http://www.gmx.net/de/go/multimessenger01








Re: singlethreaded or multithreaded

2009-05-06 Thread Andreas Fink

it is in gwlib http.c/http.h
and by the way, you can use this code to write your own custom HTTP  
server ;-)


On 06.05.2009, at 17:28, Beatrice Tamburrino wrote:


thx!

I probably will do it multithreaded.. any idea where to find the  
sending process in the source code?



 Original-Nachricht 

Datum: Wed, 6 May 2009 17:15:49 +0200
Von: Andreas Fink af...@list.fink.org
An: Beatrice Tamburrino beatrice.tamburr...@gmx.ch
CC: devel Devel devel@kannel.org
Betreff: Re: singlethreaded or multithreaded



I think you should for sure be able to accept multiple simultaneous
incoming connections as its in the nature of a webserver. If you
process them sequentially or more than one in parallel is then a
performance issue. Kannel for sure doesnt stop working until it got
the answer from the webserver as its written asynchronously. So it  
can

have multiple parallel requests to multiple servers (this happens
especially during WAP use). I'm not 100% sure how it handles requests
to the same server as there it can keep a connection open and reuse  
it

(HTTP Keepalive) but it for sure would not hurt your software to be
able to handle a few requests in parallel as it would give you speed.

On 06.05.2009, at 16:30, Beatrice Tamburrino wrote:


Hi,

I am writing a little webserver for an extern application, this
webserver should handle the incoming http request which kannel calls
with the dlr-url given.

Now, the question is, if kannel forwards the http request
sequentiel, i won't need to take care of the multithreaded stuff..

well, I took a look at the source code but i wasn't able to find
something..

 Original-Nachricht 

Datum: Wed, 6 May 2009 16:23:54 +0200
Von: Andreas Fink af...@list.fink.org
An: Beatrice Tamburrino beatrice.tamburr...@gmx.ch
CC: devel Devel devel@kannel.org
Betreff: Re: singlethreaded or multithreaded



What do you mean by DLR request?
Kannel asks the SMSC to report back. The SMSC will report whenever
something is happening and kannel forwards it to http.

On 06.05.2009, at 16:18, Beatrice Tamburrino wrote:


hi,

how does kannel send the dlr-requests? sequentiell? or pararell
multithreaded??

xox

bea
--
Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit
allen: http://www.gmx.net/de/go/multimessenger01





--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate +
Telefonanschluss für nur 17,95 Euro/mtl.!*

http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a



--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate +  
Telefonanschluss für nur 17,95 Euro/mtl.!* http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a






Re: [PATCH] smsc-dlr-alias on SMSC connections

2009-05-05 Thread Andreas Fink

this is simply solvable by having two smsc's with the same ID.
If those two SMSC's are seen as a unified virtual SMSC thats what you  
do.



On 04.05.2009, at 21:34, Alejandro Guerrieri wrote:

We were facing a problem when dealing with multiple binds to the  
same carriers.



Some of the carriers we're working with have SMSC's on  
twogeographically-distant places. They asked us to connect to both  
of them from our also replicated kannel clients.


So, we have two identical connections on each of our servers to both  
of their smsc's. This guarantees that I could use smsc=mylink on  
my send-sms url and kannel will choose one of the available links to  
send the messages.


The problem is, in this particular scenario, the DLR for that MT  
could come back from the _other_ link (which has a different id),  
so even on the same server it wouldn't be possible to match the  
incoming DLR with the records stored on the DB.


To solve this, I've created a patch that adds a new parameter to  
SMSC connections: smsc-dlr-alias. This parameter, if not defined,  
gets loaded with the value on smsc-id. If defined, that value is  
used when inserting to/reading from the dlr database, making it  
possible to find the dlr's despite being created on another bind.


Please see this post for more info and the patch:

http://www.blogalex.com/archives/121

Regards,
--
Alejandro Guerrieri
aguerri...@kannel.org










Re: Question about dlr_add and dlr_find parameters

2009-05-04 Thread Andreas Fink
in all cases the conection name,is being passed. If I remember right  
it was mainly used for logging purposes.

apparently there where cases in EMI where conn-id was empty or so.
unifying it would make sense in my eyes.

Note: I wrote the initial implementation in SMPP and EMI/UCP. The  
CIMD2 and OISD implementations where probably added way later by  
someone else who wasnt considering the connection struct could be  
empty. Not sure when this can be but I guess this might be the case on  
incoming EMI/UCP connections to the incoming port. In contrary to the  
other protocols, EMI/UCP supports a incoming listener while in SMPP,  
the incoming packets come on a outgoing TCP connection doing a bind  
receiver (or bind transceiver). In EMI it can be done the same (in  
large account mode) but simpler  EMI implementations had a outgoing  
connection from the SMSC to Kannel.


On 04.05.2009, at 19:02, Alejandro Guerrieri wrote:


Hi,

Just a quick question: I'm checking on different smsc's  
implementations and I've noticed that, despite that dlr_add and  
dlr_find are usually called using conn-id for the first parameter  
(smsc), on some smsc's conn-name is used instead:


gw/smsc/smsc_cimd2.c:   dlr_add(conn-name, ts, msg);
gw/smsc/smsc_emi.c:		dlr_add((conn-id ? conn-id : privdata-name),  
ts, m);

gw/smsc/smsc_oisd.c:dlr_add(conn-name, ts, msg);

Does anybody know if is there any reason for this or is it just a  
different implementation?


Would it make any sense to change it to be in line with the rest?

I guess it makes sense to use conn-id since it's user-definable,  
though conn-name is generated from the connection parameters (host,  
port, user), though limiting what can be done with it (for example:  
two different binds wouldn't be able to manage dlr's from each other).


Regards,
--
Alejandro Guerrieri
aguerri...@kannel.org










Re: data_sm

2009-04-10 Thread Andreas Fink

on outgoing SMS:

the splitting happens in SMSBox when the SMS is received from HTTP. A  
reply on the submit HTTP would be possible


On 10.04.2009, at 14:27, Stipe Tolj wrote:


Enver ALTIN schrieb:


I think it would be great to tell the split count in smsbox sendsms
reply body somewhere, because all it says is along the lines of  
Message

sent. -- we could tell something useful I guess.


could we pass the number of PDU segments via the Kannel ack msg to  
the smsbox
back? Does that make sense? (no fire please, I haven't looked in the  
code, just

a loose idea)

Stipe

--
---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---





Re: gwmem patches

2009-04-03 Thread Andreas Fink
I'm +1 on gw_calloc. There's a few times I would have used it in the  
past so its nice to have it in gwlib.


I see very little optimisation of strdup except we do a strlen twice  
(once explicit in the malloc line an done implicity in the strcpy) but  
it is never bad to save a few microseconds.. (who knows one might call  
this one a gazillion times...). so +1 for that one too.



On 02.04.2009, at 23:21, Alexander Malysh wrote:


Hi,

thanks for your patch but:

1) thread.h patch was wrong. I fixed it in CVS.
2) gw_strdup optimisation looks OK, please submit as extra patch
3) gw_calloc, hmm... I don't really see any advantage of this one.  
because

x = gw_malloc(count*size);
memset(x, 0);
do the same. why do we need this?

Thanks,
Alex

Am 02.04.2009 um 19:09 schrieb Nikos Balkanas:


Hi,

An assortment of small patches to make check_memory_leaks work  
better:


1) Added support for gw_calloc, which is #undefed but not defined
2) Replaced strcpy with memcpy in gw_strdup for better efficiency
3) Added function prototype in thread.h for mutex_make_measured so  
that MUTEX_STATS compile correctly.


Please decide and vote.

BR,
Nikoskannel.diff






Re: SMS over SS7

2009-03-27 Thread Andreas Fink

On 26.03.2009, at 07:50, jyoti wrote:


Hi,
If we use sms for push over ss7 E1 link.i.e directly connected to MSC,
instead of SMSC(SMPP),Does we will get an advantage?
if yes can we devlop kannel to support the above?

Waiting for Any suggestion.

Thanks  Regards
Jyoti Ranjan Panda




This is what we have been doing since 2001. It is major work.

To give you an idea: if you talk directly SS7, you are an SMSC. The  
store and forward part of an SMSC is no magic. Its just plugging in a  
database and some SMPP filling it. But then to send out the data, you  
need to query the HLR and process the response to then forward the SMS  
to the MSC or retry later if the subscriber is offline.


To be able to do that, you need to implement the following:

Level 1: E1 (Hardware)
Level 2: MTP2
Level 3: MTP3
Level 4: SCCP
Level 5: TCAP
Level 6: GSM-MAP
Level 7: SMS

So think about if you wanted to write Kannel but you would had to  
implement a ethernet driver , ethernet packet layer, IP, tcp, http,  
XML, soap all on top of it and from scratch.
If you look at the specs of those protocols you get the idea. GSM-MAP  
alone is over 1'000 pages! For SMS you only need  a few pages out of  
it but all the mumbo jumbo around it still matters somehow.


Our curent SMSC implementation has almost half a million lines of  
sourcecode. We started writing it in 2001 (and are still not really  
finished with it) because we needed an SMSC and the offers we got at  
that time where like 1.2 million US$ for a system doing 10msg/sec max  
(license limitation).


Now assume you do spend all the time of work for this, it's still  
worthless if you are not an operator because you need a plug to plug  
it in. And then the operators you are sending to will have to enable  
roaming with you so your numbers (which you have to get from the  
regulator) have to be implemented in their routing. And believe me,  
GSM operators are very picky whom they let send SMS into their  
network. And assuming you succeeded in all that, if you start sending  
volumes, you will have to sign a so called Interworking contract (AA. 
19) which means you will have to pay something like 6 eurocent per SMS  
sent. So unless you receive a lot of SMS to balance off your traffic,  
your cost will be way higher than directly connecting to the operator  
on SMPP.


So if anyone has such an access, talk to me.




Andreas Fink

Fink Consulting GmbH
Global Networks Schweiz AG
BebbiCell AG
IceCell ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  andr...@fink.org
www.finkconsulting.com www.global-networks.ch www.bebbicell.ch
---
ICQ: 8239353 MSN: m...@gni.ch AIM: smsrelay Skype: andreasfink
Yahoo: finkconsulting SMS: +41792457333

http://a-fink.blogspot.com/





Re: gwlib/charset patch

2009-03-13 Thread Andreas Fink


On 13.03.2009, at 06:32, Nikos Balkanas wrote:


Hi Alex,

Solaris is probably not the environment for these tests. After 1  
hour of installing many packages, trying to run bootstrap and  
correcting paths within aclocal and autom4te, I finally give up:


Server2:~/work/kannel/gateway- bootstrap.sh
configure.in:262: warning: underquoted definition of GW_HAVE_TYPE_FROM
configure.in:262:   run info '(automake)Extending aclocal'
configure.in:262:   or see 
http://sources.redhat.com/automake/automake.html#Extending-aclocal
/usr/local/bin/m4:acinclude.m4:935: cannot open `acinclude.m4': Too  
many open files  --


it tries to include itself. no good!



Re: [PATCH] Telecom Regulatory Authority of India (TRAI), direction dated 2008-12-10

2009-02-27 Thread Andreas Fink

I've read the document of the TRAI and I  can only shake my head
That regulator has not understood at all how SMS works. Imagine Mr.  
Spammer wants to kill competition, the only thing he needs is to  
prefix tons of spam with XY- and everyone will blame XY-. Stupid  
excuse for the fact that operators are not good at finding out where  
an SMS came from. Furthermore its too easy to get around by sending  
SMS from outside India.


As others have said, Kannel has to stay neutral. This should, if, be  
done , done on application level. At maximum having a tool like a  
regexp function on application level which could be used for other  
things like replacing A with B or the like. Then it would be an  
universal feature. But doing it from the application sending the  
message is so darn simple that it becomes obsolete.




On 27.02.2009, at 19:10, Stipe Tolj wrote:


Stipe Tolj schrieb:

Hi list,

according to the TRAI, all SMSC in India need to use prefixes in  
TON=5

(alphanumeric) source addresses since 2009-02-01.

Please find a corresponding patch against 1.4.3 and CVS HEAD at

 http://www.kannel.org/~tolj/patchsets/TRAI/

along with the official direction statement of the TRAI.

I'm not sure if we want to mainline this into CVS, since it  
exposes another
config directive to the smsc group. But as this is of general  
interest to all
users from India, please feel free to incorporate the patch to your  
production

systems.

Any opinions if we want this (or modified) to go into CVS? I'm +0  
on it, not

really sure and want to hear some opinions from the group.


thanks for the opinions. I'm fine with a negative vote to commit to  
CVS. I'm

also not comfortable with it as is.

Stipe

--
---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---





Re: [PATCH] Telecom Regulatory Authority of India (TRAI), direction dated 2008-12-10

2009-02-27 Thread Andreas Fink

PS:
On 25.02.2009, at 16:34, Stipe Tolj wrote:


Hi list,

according to the TRAI, all SMSC in India need to use prefixes in TON=5
(alphanumeric) source addresses since 2009-02-01.



ehm, doesnt that imply that its the carriers work to do on his _SMSC_,  
not the gateway?

So kannel would need to do nothing...





Re:

2008-10-24 Thread Andreas Fink


On 24.10.2008, at 09:11, Trowa Barton wrote:


Hi,

I have 2 questions regarding EMI/UCP.
I have set concatenation = true and flow-control = 1 in my kannel  
config.

I am using 1.4.1

/*
group = smsc
smsc = emi
smsc-id = incomming
allowed-smsc-id = outgoing
host = xxx.xxx.xxx.xxx
port = xxx
smsc-username = 
smsc-password = 
keepalive = 120
sender-prefix = 
flow-control = 1

group = sendsms-user
username = 
password = 
concatenation = true
max-messages = 3
default-smsc = incomming
*/


1. When I try to send 430 characters (concatenated) the last part is
being sent first and the first part is being sent last. When starting
kannel it sends in the correct order. 1-2-3.. But if I send another
message it send 3-2-1. The message is the same. So I always need to
restart kannel to send in the correct order. This doesnt happen in
cimd2. The first part is being sent first. Always.



This is absolutely irrelevant. The phone will display the whole  
message once all parts have been received. If they arrive 1-2-3 or  
3-2-1 or 3-1-2 doesn't really matter.
The order can also be messed up in transmission to the phone. like you  
are about to drive in the tunnel, you get 1 and when you exit you get  
3 and 10 minutes later after retry you get 2.





2. Assuming my first problem is fixed. My current telco is sending
(05) error which means 'call baring active' so when the first part of
the message and I got a response is 05 i should stop sending the 2nd
and 3rd part of the concatenated message.


Call Barring active means the subscriber is not allowed to receive ANY  
messages (unpaid bill for example...)

This has nothing to do with multipart.





Andreas Fink

Fink Consulting GmbH
Global Networks Schweiz AG
BebbiCell AG
IceCell ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  [EMAIL PROTECTED]
www.finkconsulting.com www.global-networks.ch www.bebbicell.ch
---
ICQ: 8239353 MSN: [EMAIL PROTECTED] AIM: smsrelay Skype: andreasfink
Yahoo: finkconsulting SMS: +41792457333

http://a-fink.blogspot.com/   A developers view about iPhone SDK







Re: How kannel creates cgi-bin program to handle http requests

2008-10-22 Thread Andreas Fink
kannel does not create a cgi-bin program. It does run its own  
webserver. So cgi-bin is just a commonly known location.


On 22.10.2008, at 08:31, manas mohanty wrote:


Hi All,
How kannel creates cgi-bin program to handle http requests from  
users??

Please provide the function name where kannel does this.

Waiting for the response.
Thanks in advance

--
PERFECTION CAN NOT ACHIEVED COMPLETELY BY ANYONE IN THE WORLD, BUT  
IF

YOU KEEP CHASING THE PERFECTION, SOMEWHERE ON THE WAY YOU
CATCH EXCELLENCE Thanks  Regards, MANAS R. MOHANTY





Re: How kannel creates cgi-bin program to handle http requests

2008-10-22 Thread Andreas Fink

Why change a running horse?

I can understand we can announce breaking changes in the NEWS.
But there has to be a good reason for a change. like chaning from  
latin1 to utf8 which make's certain things no longer break.
but changing the name of the /cgi-bin/sendsms string to /whatever for  
me is breaking something which works for absolutely no benefit.


On 22.10.2008, at 15:50, Stipe Tolj wrote:


Guillaume Cottenceau schrieb:

Alejandro Guerrieri aguerrieri 'at' kannel.org writes:

I'm worried about backward compatibility. If it's removed and the  
cgi-bin URL
no longer works, people will have to modify their applications to  
point to the

new URL after the upgrade.


As long as Kannel offers a clear what changed document in new
releases, I don't see a problem. Well-designed applications don't
hardcode paths, or hardcode it so that modifications are possible
when needed. Well-behaving administrators/developers read what
changed documents, and test new releases of software on a
test/staging environment before going to production.


yep, all breaking changes are documented in the NEWS file section.

IMHO the ideal approach would be to be able to maintain the old  
url as well
(at least for the time being, maybe with a warning on the log  
files saying that

it is deprecated).


It can be good to offer a backwards compatibility layer, but it
also means 1- extra time needed for Kannel developers 2- more
potential bugs (more lines of code = more bugs) 3- when this
backwards compatibility is abandoned in next-next release, you'll
still get angry users not reading documentation who will be
bitten anyway.


yep, which leads to the generic life problem: you can't make all  
people happy at
the same time ;) ... I call it MDSP in theoretical information  
science (multi

dimensional satisfactory problem)... BTW it's NP-hard.

Stipe

--
---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---





Re: SMPP Patch for data_coding: 3

2008-10-03 Thread Andreas Fink

does that mean your SMSC requests utf8 instead of iso?


On 03.10.2008, at 11:23, Michael Zervakis wrote:


Dear all,

  We connect to a SMPP SMSC using kannel and we had problems reading  
greek characters when data coding was set to 3. I attached the  
modifications to gw/smsc/smsc_smpp.c that solved the problem.


Regards
Index: gw/smsc/smsc_smpp.c
===
RCS file: /home/cvs/gateway/gw/smsc/smsc_smpp.c,v
retrieving revision 1.106
diff -u -r1.106 smsc_smpp.c
--- gw/smsc/smsc_smpp.c 16 Sep 2008 20:50:09 -  1.106
+++ gw/smsc/smsc_smpp.c 3 Oct 2008 09:09:41 -
@@ -519,6 +519,7 @@
break;
case 0x01: /* ASCII or IA5 - not sure if I need to do  
anything */

case 0x03: /* ISO-8859-1 - do nothing */
+   charset_gsm_to_utf8(msg-sms.msgdata);
msg-sms.coding = DC_7BIT; break;
case 0x02: /* 8 bit binary - do nothing */
case 0x04: /* 8 bit binary - do nothing */
@@ -669,6 +670,7 @@
break;
case 0x01: /* ASCII or IA5 - not sure if I need to do  
anything */

case 0x03: /* ISO-8859-1 - do nothing */
+   charset_gsm_to_utf8(msg-sms.msgdata);
msg-sms.coding = DC_7BIT; break;
case 0x02: /* 8 bit binary - do nothing */
case 0x04: /* 8 bit binary - do nothing */





Re: Building Kannel Docs on Mac OSX Leopard

2008-09-18 Thread Andreas Fink

Hi Alejandro,

You probably should simply indicate the alternative location of  
docbook under /opt instead of /usr/share or /usr/local/share as the  
Linux and Unix world would expect. Ports and Fink put the stuff  
elsewhere. And those types of problems are exactly the reason why I  
don't use them and rather go and compile the stuff for /usr/local. I  
also sometimes had issues if you compile comerical software that you  
out of a sudden end up with dependencies you don't want (like linking  
libz to /opt even there's one coming with the system).


docbook is not my preferred tool, so I have never installed that one  
from source and I never build kannel's doc but leave the buildboot do  
it. Or have a virtual machine under Linux do it...



On 18.09.2008, at 08:21, Alejandro Guerrieri wrote:


Hi,

In order to preview what I'm writing for the meta-data patch, I've  
tried compiling Kannel with --enable-docs, but can't get ./configure  
to detect the .dsl files.


I've installed all relevant packages I've found on MacPorts  
(including openjade, docbook-dsssl, and all docbook* and tex* I  
could find), but Kannel it's still missing the .dsl files.


Here's the ./configure output:

Configuring DocBook support ...
checking for jade... no
checking for jadetex... jadetex
checking for pdfjadetex... pdfjadetex
checking for dvips... dvips
checking for fig2dev... fig2dev
checking for convert... /opt/local/bin/convert
checking for /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/html/ 
docbook.dsl... no
checking for /usr/lib/sgml/stylesheets/nwalsh-modular/html/ 
docbook.dsl... no
checking for /usr/share/sgml/docbook/dsssl-stylesheets-1.*/html/ 
docbook.dsl... no
checking for /usr/share/sgml/docbook/dsssl-stylesheets/html/ 
docbook.dsl... no
checking for /usr/share/sgml/docbook/stylesheet/dsssl/modular/html/ 
docbook.dsl... no
checking for /usr/share/sgml/docbook/dsssl/modular/html/ 
docbook.dsl... no
checking for /usr/local/lib/sgml/stylesheet/dsssl/docbook/nwalsh/ 
html/docbook.dsl... no
checking for /usr/local/lib/sgml/stylesheets/nwalsh-modular/html/ 
docbook.dsl... no
checking for /usr/local/share/sgml/docbook/dsssl-stylesheets-1.*/ 
html/docbook.dsl... no
checking for /usr/local/share/sgml/docbook/dsssl-stylesheets/html/ 
docbook.dsl... no
checking for /usr/local/share/sgml/docbook/stylesheet/dsssl/modular/ 
html/docbook.dsl... no
checking for /usr/local/share/sgml/docbook/dsssl/modular/html/ 
docbook.dsl... no
checking for /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh/print/ 
docbook.dsl... no
checking for /usr/lib/sgml/stylesheets/nwalsh-modular/print/ 
docbook.dsl... no
checking for /usr/share/sgml/docbook/dsssl-stylesheets-1.*/print/ 
docbook.dsl... no
checking for /usr/share/sgml/docbook/dsssl-stylesheets/print/ 
docbook.dsl... no
checking for /usr/share/sgml/docbook/stylesheet/dsssl/modular/print/ 
docbook.dsl... no
checking for /usr/share/sgml/docbook/dsssl/modular/print/ 
docbook.dsl... no
checking for /usr/local/lib/sgml/stylesheet/dsssl/docbook/nwalsh/ 
print/docbook.dsl... no
checking for /usr/local/lib/sgml/stylesheets/nwalsh-modular/print/ 
docbook.dsl... no
checking for /usr/local/share/sgml/docbook/dsssl-stylesheets-1.*/ 
print/docbook.dsl... no
checking for /usr/local/share/sgml/docbook/dsssl-stylesheets/print/ 
docbook.dsl... no
checking for /usr/local/share/sgml/docbook/stylesheet/dsssl/modular/ 
print/docbook.dsl... no
checking for /usr/local/share/sgml/docbook/dsssl/modular/print/ 
docbook.dsl... no

Not building documentation.

I'm completely clueless about where to get all those files (or I  
only need to provide one of them?).


I've found docbook.dsl on this two places:

/opt/local/share/dsssl/docbook-dsssl/html/docbook.dsl
/opt/local/share/dsssl/docbook-dsssl/print/docbook.dsl

Maybe I should make a symlink to one of the serched places, or  
change the ./configure script to look into /opt/local as well?


I have Leopard and MacPorts both updated to the latest version  
available.


Any leads would be more than welcome :)

Alejandro






Re: Wiki

2008-08-08 Thread Andreas Fink


On 08.08.2008, at 08:24, Christian Jensen wrote:

I would like to be able to post up my .NET HTTP code somewhere along  
with my Samba 75 modem init strings.


That could go into the utils folder or the like or in the web  
documentation (both in CVS)


Maybe even a few config file examples for typical usage. If I had a  
Wiki, I could do all that myself.


There are a few in the CVS tree.


 Would it be a really bad thing for me to open up a wiki on one of  
those site I mentioned and have you link to it?


To be disussed in the group. My vote is neutral

 I have also a set of code changes for adding Syslog reporting and  
Redhat RPMs with their respective init strings – however since I  
despise CVS I used the source instead of checking out – which brings  
me to my second overall point for using one of those services – they  
use SVN which in my opinion is much more modern.


there is syslog logging already. what did you add then?
THere was a recent discussion about switching to SVN or GIT. So far  
SVN made the race but the transition was never done. Stipe: shall we  
envisage this when we move the server or should we do it now?




Lastly, I am tasked to get mbuni operational in the next 120 days  
and would love to be able to put my RPMs somewhere.


I can host them.

 The current process seems to closed for my taste – as I understand  
it the process is to submit my stuff and have someone else add it as  
they see fit – is that correct?


this is correct for newbee's. cracks get access to CVS and do it  
themselves :-)





I do appreciate all the hard work that has been put into the  
project, but I do think development can be accelerated by opening up  
the development to more people. Am I wrong?


Thanks!
Christian


From: Andreas Fink [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2008 11:11 PM
To: Christian Jensen
Subject: Re: Wiki


On 08.08.2008, at 08:05, Christian Jensen wrote:


I have no issue participating in the devel list – will do.

Has there been any talk about moving the project over to a managed  
hosting solution? Sourceforge, Google Code or Codeplex?



No there's so far no need for it.
There's a group of core developers and there's a dedicated server  
working fine.






From: Andreas Fink [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2008 10:36 PM
To: Christian Jensen
Subject: Re: Wiki


On 08.08.2008, at 00:28, Christian Jensen wrote:



Hi,

I find myself wanting to commit the fixes and mods back into the  
source tree – what is the best process?



participate in the mailing list and send it to devel@kannel.org





I also have a ton of information to provide for the documentation –  
is there a Wiki somewhere?


no there isn't.

But feel free to send.




Andreas Fink

Fink Consulting GmbH
Global Networks Schweiz AG
BebbiCell AG
IceCell ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  [EMAIL PROTECTED]
www.finkconsulting.com www.global-networks.ch www.bebbicell.ch
---
ICQ: 8239353 MSN: [EMAIL PROTECTED] AIM: smsrelay Skype: andreasfink
Yahoo: finkconsulting SMS: +41792457333

http://a-fink.blogspot.com/   A developers view about iPhone SDK











Re: [PATCH] UCP/EMI keepalive/UCP31 bug.

2008-08-05 Thread Andreas Fink


On 05.08.2008, at 12:17, Vincent CHAVANIS wrote:


Hi all,

A bug still exists on the UCP/EMI driver.
-Keepalive was wrong because the sender thread was awaken keepalive  
+ 1

When you set keepalive=5 you will in reality have keepalive=6


so you say we where off by one second?



-Then, the patch also fixes the UCP31 at login.
We don't need to send it beacause UCP60 already make an activity on  
the SMSC line. (The issue is that we need to wait_for_ack in order  
to send MT = waste of time). Note that UCP31 is an alert operation  
which can be used for a TCP keepalive.


This is not true. UCP31 is not in fact a keepalive. its used to alert  
the SMSC that we're ready to receive incoming SMS.
Login by itself COULD do this but not necessarily. Also there might be  
some situation where login is not done at all.


From the point of view of Bruno Rodrigues who dit the previous  
patch (2002-03-14) a bug when Kannel couldn't connect to the server  
on the first time, and then on a later attempt, the last_activity  
was wrong and Kannel wouldn't send the 31's, or would send them at  
the wrong time. [...] As a work around I made Kannel always send a  
31 after a successful login to make sure the timers were reset.

This does not seems to happens anymore.


I would leave it in there. It doesn't hurt and probably helps some  
specific SMSC implementations.



Any comments ?

@@ -158,7 +159,7 @@
#define  
emi2_needs_keepalive 
(conn) \
(emi2_can_send(conn)  
\
 (PRIVDATA(conn)-keepalive  0)  
\
- (time(NULL)  (PRIVDATA(conn)-last_activity_time + PRIVDATA(conn)- 
keepalive)))
+ (time(NULL) = (PRIVDATA(conn)-last_activity_time +  
PRIVDATA(conn)-keepalive)))


so this is keepalive always being +1... sounds good to me.



/*
 * Send an EMI message and update the last_activity_time field.
@@ -366,7 +373,7 @@
connect_error = 1;
continue;
}
-privdata-last_activity_time = 0; /* to force keepalive  
after login */
+privdata-last_activity_time = time (NULL); /* to *NOT*  
force keepalive after login */


as I said above, I would skip that one.


   } else if (emimsg-ot == 31) {
+PRIVDATA(conn)-last_activity_time = time (NULL);
   /* XXX Process error codes here
   if (octstr_get_char(emimsg-fields[0], 0) == 'N') {
   long errorcode;


not sure why this is needed. Would sound like it would have never  
worked otherwise...



@@ -1269,7 +1317,7 @@
 */
static double emi2_get_timeouttime (SMSCConn *conn, Connection  
*server)

{
-double ka_timeouttime = PRIVDATA(conn)-keepalive ?  
PRIVDATA(conn)-keepalive + 1 : DBL_MAX;
+double ka_timeouttime = PRIVDATA(conn)-keepalive ?  
PRIVDATA(conn)-keepalive : DBL_MAX;


shouldn't timeout be longer than keepalive? could above change not  
create a race condition to the fact that the keepalive was just about  
to be sent but timeout hit first?




double idle_timeouttime = (PRIVDATA(conn)-idle_timeout   
server) ? PRIVDATA(conn)-idle_timeout : DBL_MAX;
double result = ka_timeouttime  idle_timeouttime ?  
ka_timeouttime : idle_timeouttime;

@@ -1626,7 +1674,7 @@
privdata-listening_socket = -1;
privdata-can_write = 1;
privdata-priv_nexttrn = 0;
-privdata-last_activity_time = 0;
+privdata-last_activity_time = time (NULL); /* to *NOT* force  
keepalive after login */


as I said I would leave keepalive at login.





Andreas Fink

Fink Consulting GmbH
Global Networks Schweiz AG
BebbiCell AG
IceCell ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  [EMAIL PROTECTED]
www.finkconsulting.com www.global-networks.ch www.bebbicell.ch
---
ICQ: 8239353 MSN: [EMAIL PROTECTED] AIM: smsrelay Skype: andreasfink
Yahoo: finkconsulting SMS: +41792457333

http://a-fink.blogspot.com/   A developers view about iPhone SDK







Re: [PATCH] UCP/EMI keepalive/UCP31 bug.

2008-08-05 Thread Andreas Fink


On 05.08.2008, at 12:57, Vincent CHAVANIS wrote:



Hi andreas,


Andreas Fink a écrit :

On 05.08.2008, at 12:17, Vincent CHAVANIS wrote:

  \
- (time(NULL)  (PRIVDATA(conn)-last_activity_time +  
PRIVDATA(conn)-keepalive)))
+ (time(NULL) = (PRIVDATA(conn)-last_activity_time +  
PRIVDATA(conn)-keepalive)))

so this is keepalive always being +1... sounds good to me.


So you aggree to that fact that keepalive will be keepalive + 1 ?


yes because of = versus .



The impact is that each UCP31 will be done with 1 second inlate.  
This is not what users want.

If I specify keepalive each 5 sec, i don't want it each 6 sec.



  } else if (emimsg-ot == 31) {
+PRIVDATA(conn)-last_activity_time = time  
(NULL); /* XXX Process error codes here
  if (octstr_get_char(emimsg-fields[0], 0) ==  
'N') {

  long errorcode;
not sure why this is needed. Would sound like it would have never  
worked otherwise...


This is absolutly needed!
Take this exemple
00:00:00 you sent a UCP31
00:00:30 you received an ack of your UCP31
(the SMSC is overloaded in this case)
Then if your keepalive is set to 31 you will send just after 1 sec  
an other UCP31. And will result to block the sender thread  
(can_write = 0)


This should never happen if you have window properly set. And while we  
have traffic, last activity is counting up so keepalive will not be  
sent out anyway as the activity keeps the link alive. Keepalive is  
ONLY sent if there is NO activity. But counting keepalive as activity  
itself doesnt sound wrong neither.






@@ -1269,7 +1317,7 @@
*/
static double emi2_get_timeouttime (SMSCConn *conn, Connection  
*server)

{
-double ka_timeouttime = PRIVDATA(conn)-keepalive ?  
PRIVDATA(conn)-keepalive + 1 : DBL_MAX;
+double ka_timeouttime = PRIVDATA(conn)-keepalive ?  
PRIVDATA(conn)-keepalive : DBL_MAX;
shouldn't timeout be longer than keepalive? could above change not  
create a race condition to the fact that the keepalive was just  
about to be sent but timeout hit first?


   double idle_timeouttime = (PRIVDATA(conn)-idle_timeout   
server) ? PRIVDATA(conn)-idle_timeout : DBL_MAX;
   double result = ka_timeouttime  idle_timeouttime ?  
ka_timeouttime : idle_timeouttime;

@@ -1626,7 +1674,7 @@
   privdata-listening_socket = -1;
   privdata-can_write = 1;
   privdata-priv_nexttrn = 0;
-privdata-last_activity_time = 0;
+privdata-last_activity_time = time (NULL); /* to *NOT* force  
keepalive after login */

as I said I would leave keepalive at login.


This is not so trivial.

Vincent





Re: Receiving SMS GSM modem Nokia N73

2008-07-30 Thread Andreas Fink

why dont you simply use the default keyword instead of a regexp .* ?

On 29.07.2008, at 21:26, Ricardo España wrote:


Hi guys,

I just recently installed Kannel and I am trying to setup the sms  
feature, to work with sms pull messages and sms-services. I am using  
my cellphone (Nokia N73) as GSM modem to work as my virtual SMSC, it  
is working fine sending sms but when a sms arrives Kannel does not  
see that the incoming message and can't run the sms-services group.  
My configuration file is detailed below, I hope you can help me with  
this thing. Thank you!


#
# THIS IS A SAMPLE CONFIGURATION FOR SMS KANNEL
#
# This basic version is used for system testing. It expects  
'fakesmsc' to

# send messages which are replied with simple fixed text message.
# It is run like this:
#
#  1% gw/bearerbox gw/smskannel.conf
#  2% gw/smsbox gw/smskannel.conf
#  3% test/fakesmsc -i 0.1 -m 100 123 345 text nop
#
# ..all 3 commands in separate shells (or screen sessions)
# Note that you can run them in different machines but have to
# add certain command line argument and configuration variables then
#
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, see Kannel web page (http://www.kannel.org)  
and

# various online help and mailing list archives
#
# Notes on those who base their configuration on this:
#  1) check security issues! (allowed IPs, passwords and ports)
#  2) groups cannot have empty rows inside them!
#  3) read the user guide
#
# Kalle Marjola for Kannel project 2001, 2004

#-
# CORE
#
# There is only one core group and it sets all basic settings
# of the bearerbox (and system). You should take extra notes on
# configuration variables like 'store-file' (or 'store-dir'),
# 'admin-allow-ip' and 'access.log'


group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
#status-password = foo
#admin-deny-ip = 
#admin-allow-ip = 
#log-file = /tmp/kannel.log
#log-level = 0
box-deny-ip = *.*.*.*
box-allow-ip = 127.0.0.1
#unified-prefix = +358,00358,0;+,00
#access-log = /tmp/access.log
#store-file = kannel.store
#ssl-server-cert-file = cert.pem
#ssl-server-key-file = key.pem
#ssl-certkey-file = mycertandprivkeyfile.pem

#-
# SMSC CONNECTIONS
#
# SMSC connections are created in bearerbox and they handle SMSC  
specific
# protocol and message relying. You need these to actually receive  
and send

# messages to handset, but can use GSM modems as virtual SMSCs


# This is a fake smsc connection, _only_ used to test the system and  
services.

# It really cannot relay messages to actual handsets!

group = smsc
smsc = at
#smsc-id = nokia_smsc
modemtype = Nokia
device = /dev/ttyACM0
speed = 19200
pin = 3023

group = modems
id = Nokia
name = Nokia
#detect-string = Nokia Mobile Phone
init-string = ATZ
#enable-hwhs = AT+IFC=2,2
#need-sleep = false
#keepalive-cmd = AT+CBC; +CSQ
#broken = true
#message-storage = ME

#-
# SMSBOX SETUP
#
# Smsbox(es) do higher-level SMS handling after they have been  
received from
# SMS centers by bearerbox, or before they are given to bearerbox  
for delivery


group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
global-sender = 13013
#sendsms-chars = 0123456789 +-
log-file = /tmp/smsbox.log
log-level = 0
access-log = /tmp/access.log

#-
# SEND-SMS USERS
#
# These users are used when Kannel smsbox sendsms interface is used to
# send PUSH sms messages, i.e. calling URL like
# http://kannel.machine:13013/cgi-bin/sendsms?username=testerpassword=foobar 
...


group = sendsms-user
username = tester
password = foobar
#user-deny-ip = 
#user-allow-ip = 

#-
# SERVICES
#
# These are 'responses' to sms PULL messages, i.e. messages arriving  
from
# handsets. The response is based on message content. Only one sms- 
service is

# applied, using the first one to match.

group = sms-service
keyword =
keyword-regex = .*
catch-all = yes
max-messages = 0
get-url=http://localhost:13013/cgi-bin/sendsms?username=testerpassword=foobarto=04149157444text=su 



# There should be always a 'default' service. This service is used  
when no

# other 'sms-service' is applied.

group = sms-service
keyword = default
text = No service specified

# end of configuration file


Ricardo España
Cel: +58-(0)414.915.74.44
Caracas, Venezuela.




Re: DLR Not Destroyed

2008-07-17 Thread Andreas Fink

what you mean by destroyed?

DLR mask is not keept. A mask says what you expect to get back and  
what not.
Whenever Kannel gets back what you requested and is not expecting any  
further information to come back, the temporary information is removed  
as its the last report it got.



If you ask for success only, at time of report of success, you get a  
report and the temporary information is destroyed
If you ask for success only, at time of report of failure, you dont  
get a report and the temporary information is destroyed
If you ask for success / failure only, at time of report of success or  
failure you get a report and the temporary information is destroyed


etc.

Note. the mask you send into kannel is the mask it uses to communicate  
to you. its not necessarily the mask it sends out to the telco!


Example: If you ask for failure only, it might get buffered back  
from the SMSC (especially in EMI/UCP) or success. On success delivery  
it would clear the temporary info but not send you any report.



On 17.07.2008, at 17:37, sangprabv wrote:


Hi,
I want to know which DLR mask is destroyed and which is not destroyed?
And is there any impact to Kannel's performance when the  
undestroy(able)
DLRs queue are huge? Is there any option not to rerequest the DLR to  
the
telco? Since some telcos have custom DLR mask which are not the same  
as

Kannel (1.2.4.8.16). TIA

Regards,


Willy






Re: DLR Not Destroyed

2008-07-17 Thread Andreas Fink


On 17.07.2008, at 23:28, sangprabv wrote:


I see from log message like this DLR Not Destroyed, still waiting for
other delivery report. I usually use dlr-mask=31. And if we check by
http admin, it will be reported as DLR queue.


so this means, message got to the SMSC but SMSC has not delivered it  
yet.

This can happen if the receiver phone is off.

In many cases, the message will stay on the SMSC for up to 7 days  
before it gets then deleted and we get a DLR failure (validity period  
expired).


And becomes very long queue. What Im afraid is Kannel's performance  
drop because of this long

queue, is it correct? TIA Andreas.


This very long was the reason why database support was added for  
those temporary messages.







Andreas Fink
Fink Consulting GmbH
---
Tel: +41-61-332 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  [EMAIL PROTECTED]
Homepage: http://www.finkconsulting.com
---
ICQ: 8239353 MSN: [EMAIL PROTECTED] AIM: smsrelay
Skype: andreasfink Yahoo: finkconsulting SMS: +41792457333

http://a-fink.blogspot.com/   A developers view about iPhone SDK



Re: PATCH: only generate dependencies if using gcc

2008-07-08 Thread Andreas Fink


On 08.07.2008, at 06:16, Bostock James wrote:


From: Stipe Tolj
Sent: 07 July 2008 19:17

Stipe Tolj schrieb:


Can you point out why you need to omit the .depend file creation if

the

compiler is not gcc?


i.e. the Intel CC handles the options and can build without changes.


The native compilers for AIX, HP-UX and Solaris do not handle these
options. If a compiler other than gcc supports these options, though,
then my patch goes from a quick fix to an ugly and inaccurate quick  
fix

:(

Other solutions would be to:
- have autoconf try to detect whether the compiler supports -MM,
- use the X11 makedepend utility,
- use automake.

My preference would be for the last of these. What do other people
think?


MacOS X also often has issues with precompiled headers due to the fact  
that Apple's GCC variant can compile multiple architectures in one go  
(for example if you pass -arch ppc -arch i386 -arch ppc64 -arch  
x86_64). In this case the precompiled headers can be different as  
things like size of () do return different values and endianness is  
different. So instead of one .depend it would have to create multiple  
ones.

So gcc does return:

gcc-4.0: -E, -S, -save-temps and -M options are not allowed with  
multiple -arch flags



So under MacOS X I often use --disable-dependency-tracking or I  
compile for every architecture once and merge the binaries it with  
lipo lateron. Kannel doesnt have this issue as I fixed the  
endianness and sizeof issues. In the case of kannel its compiling for  
multiple architectures and disables -M.






-james






Re: PATCH: Microsecond sleep time

2008-07-02 Thread Andreas Fink


On 02.07.2008, at 14:29, Werner Coetzee wrote:



Hi

Can anyone explain why gwthread is using the poll function to sleep  
(using milliseconds as timeout), and not maybe the select function  
(using microseconds as timeout)?



Kannel can use poll or select. It's a platform specific decision by ./ 
configure as not all have poll as far as I remember.
Select has an issue if you have a lot of file descriptors open as it  
uses an array of many fd's. poll is much smarter there.


The reason why kannel uses poll on a pipe to sleep is for the simple  
reason that a thread can be  woken up before the sleep time expires by  
sending a byte to the pipe.


We have the requirement to be able to sleep for less than a  
millisecond, which the current gwthread_sleep can't provide.


If its for pure sleeping of such small time amounts, you might consult  
your operating system's documentation. maybe usleep() or nanosleep()  
is better for such cases. However be aware that if you sleep such  
small amounts, accuracy can become an issue. Unix kernels are not real  
time kernels.


usleep() on MacOS X says:

DESCRIPTION
	 The usleep() function suspends execution of the calling thread  
until either useconds microseconds have elapsed or a signal is deliv-
	 ered to the thread whose action is to invoke a signal-catching  
function or to terminate the thread or process.  The actual time
	 slept may be longer, due to system latencies and possible  
limitations in the timer resolution of the hardware.


	 This function is implemented, using nanosleep(2), by pausing for  
useconds microseconds or until a signal occurs.  Consequently, in
	 this implementation, sleeping has no effect on the state of  
process timers and there is no special handling for SIGALRM.







Andreas Fink

Fink Consulting GmbH
Global Networks Schweiz AG
BebbiCell AG
IceCell ehf

---
Tel: +41-61-330 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  [EMAIL PROTECTED]
www.finkconsulting.com www.global-networks.ch www.bebbicell.ch
---
ICQ: 8239353 MSN: [EMAIL PROTECTED] AIM: smsrelay Skype: andreasfink
Yahoo: finkconsulting SMS: +41792457333

http://a-fink.blogspot.com/   A developers view about iPhone SDK







Re: Kannel on AIX

2008-07-01 Thread Andreas Fink

so theres still people using X.25 with EMI UCP ;-)
I'm surprised...

On 01.07.2008, at 11:16, Bostock James wrote:


Hi,

I am trying to get Kannel 1.4.1 to compile and run on AIX 5.2 using  
gcc 4.0 and libxml2 2.6.23. To do so, I had to make two small  
changes to the source code:



--- gateway-1.4.1.orig/gw/smsc/smsc_emi_x25.c   2005-02-11  
15:35:48.0 +
+++ gateway-1.4.1/gw/smsc/smsc_emi_x25.c2008-07-01  
08:51:47.0 +0100

@@ -496,8 +496,17 @@

/* The speed initialisation is pretty important. */
tcgetattr(fd, tios);
+/* Choose the fastest speed available (assuming at least 38400 baud).
+*/ #if defined(B115200)
cfsetospeed(tios, B115200);
cfsetispeed(tios, B115200);
+#elif defined(B57600)
+cfsetospeed(tios, B57600);
+cfsetispeed(tios, B57600);
+#elif defined(B38400)
+cfsetospeed(tios, B38400);
+cfsetispeed(tios, B38400);
+#endif
kannel_cfmakeraw(tios);
tios.c_cflag |= (HUPCL | CREAD | CRTSCTS);
tcsetattr(fd, TCSANOW, tios);



that patch makes sense.



And


--- gateway-1.4.1.orig/gw/smsc/smsc_soap.c  2005-09-19  
23:07:33.0 +0100
+++ gateway-1.4.1.gcc/gw/smsc/smsc_soap.c   2008-07-01  
09:20:56.0 +0100

@@ -223,7 +223,9 @@
/* useful macros go here (some of these were ripped of other modules,
   so maybe its better to put them in a shared file) */
#defineO_DESTROY(a){ if(a) octstr_destroy(a); a=NULL; }
+#if !defined(__64BIT__)
typedef long long int64;
+#endif



wouldn't the following be more appropriate:

#if !defined(int64)
typedef int64_t int64
#endif


?


/*
 * SOAP module public API towards bearerbox


This second change is questionable but indicates the problem: when  
compiling in 64 bit mode, AIX already defines int64.


I am fairly sure that B38400 can be assumed to be defined but you  
could extend the patch to check for lower baud rates.


I also tried building using the native AIX compiler which, in  
addition to the above changes, requires that all the C++-style  
comments be converted to C-style comments (there's probably a  
compiler switch that allows C++-style comments but by default they  
are rejected).


The build system assumes gcc (for the generation of include  
dependencies via the -MM option) which is unfortunate.


so the ./configure option --disable-depenency-tracking should be set  
for AIX...






Re: Kannel on AIX

2008-07-01 Thread Andreas Fink


On 01.07.2008, at 13:47, Stipe Tolj wrote:


Bostock James schrieb:

I also tried building using the native AIX compiler which, in  
addition to the above changes, requires that all the C++-style  
comments be converted to C-style comments (there's probably a  
compiler switch that allows C++-style comments but by default they  
are rejected).
The build system assumes gcc (for the generation of include  
dependencies via the -MM option) which is unfortunate.



C++ styles in a C program are in any case bad. Where are they?





did the AIX native C compiler work with changes on configure.in?

We can add support for AIX directly to configure.in I guess, since  
we handle some fractions of platform specific parts already inside:


case $host in
 *-sun-solaris*)
   CFLAGS=$CFLAGS -DSunOS=1
   ;;
 *-cygwin*)
   EXE_EXT=.exe
   ;;
 *apple-darwin*)
   # MacOS X
   [...]
   ;;
 *-linux-*)
   CFLAGS=$CFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
   LDFLAGS=$LDFLAGS -rdynamic
   ;;
 *-*-openbsd* | *-*-freebsd*)
   CFLAGS=$CFLAGS -pthread
   AC_CHECK_LIB(c_r, pthread_exit, [LIBS=$LIBS -lc_r;  
pthread=yes])
   AC_CHECK_LIB(kse, pthread_exit, [LIBS=$LIBS -lkse;  
pthread=yes])

   ;;
esac

If you can provide a normal ssh account for me to board a  
corresponding box, I'd be willing to work it out on the machine, so  
we have it supported out-of-the-box.


Stipe

---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---





Re: Moving to git?

2008-06-24 Thread Andreas Fink

Andreas: +1
On 24.06.2008, at 13:36, Alexander Malysh wrote:


Hi,

ok, git vetoed by Andreas...

Let us vote for SVN then:

Alex: +1


Thanks,
Alex


Stipe Tolj schrieb:

Andreas Fink schrieb:


Stipe: how big is our current repository?

134M under cvs.
Machines filesystem usage is 20% only, constantly.
Stipe
---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany
tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/
mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---







Re: Modem connection help : Multi-Tech MTCBA-G-EN-F4

2008-06-23 Thread Andreas Fink

Tony,

I looked a little bit deeper into your issue with Multi-Tech MTCBA-G- 
EN-F4 modem.
I actually have such a device now on my desk as I found it rather neat  
to have it on ethernet. Saves a computer and USB to serial for my test  
modem banks.


There are two things to be changed for it to work with Kannel:

a) after connecting a tcp session, a telnet handshake has to be done  
(that part i find rather strange). So some exchange of escape  
sequences has to be done.
b) after that exchange, the user is prompted with Login: and Password:  
before he gets access to the AT commands.


tcp connections are supported in kannel (device=rawtcp, host=...  
port=...) but above stops your device from working.
I'll see that I can make a patch for this device by extending kannel  
to support smsc-username/smsc-password on at-commands to log in as  
well as to add the telnet handshake.


On 19.06.2008, at 00:08, Tony Kirkham wrote:

I have not been able to make any headway on this.  If anyone has any  
ideas, that would help, I would greatly appreciate it.


Thanks,

-Tony

On Sat, Jun 7, 2008 at 1:27 PM, Tony Kirkham  
[EMAIL PROTECTED] wrote:

Hi, guys,

I'm back with more questions.  I am still trying to get kannel to  
talk to a Multi-Tech MTCBA-G-EN-F4 modem that connects via an  
ethernet port.


If you have good knowledge of the smsc_at driver code I could really  
use your help.


I have been hacking away at the smsc_at.c code and have wrapped the  
code to detect the modem speed in an

  if ( privdata-is_serial ) { ... }
statement so that this won't be attempted because, apparently, you  
cannot detect this modems speed.


I thought this would solve my problem but, alas, it did not.  I have  
now worked my way down into the at2_read_buffer() call and I think  
that this is where the problem is occurring.  I have placed a few  
DEBUG log file writes in locations to show what is happening.  I am  
completely new to communicating to modems and via raw tcp so I do  
not know what should be expected.  However, I don't think the  
at2_read_buffer() call is getting anything.  Below, is a reduced log  
file for the at device containing what is written from a startup -  
shutdown cycle of bearerbox.


The biggest indicators that I see are that privdata-lib = strange  
characters and at2_read_line() never finds an end-of-line  
character.  The at2_read_buffer() call only executes a read the  
first time for the first AT command.  After that it seems like the  
state of something is stuck because the select() call only returns 0  
causing the at2_read_buffer() call to return NULL before the read()  
is attempted.


If anyone has some insight into this I would greatly appreciate it.   
I am using the code in the source download.  I have not pulled  
anything from the cvs repository.


Thank you very much,

-Tony

log file

  1 2008-06-07 12:51:06 [15527] [6] INFO: AT2[vzn00]: opening  
device
  2 2008-06-07 12:51:06 [15527] [6] DEBUG: AT2[vzn00]: device  
opened

  3 2008-06-07 12:51:06 [15527] [6] INFO: AT2[vzn00]: init device
  4 2008-06-07 12:51:06 [15527] [6] DEBUG: AT2[vzn00]: -- ATZ^M
  5 2008-06-07 12:51:06 [15527] [6] DEBUG: AT2[vzn00]: -- ATZ^M  
-response: 4
  6 2008-06-07 12:51:06 [15527] [6] DEBUG: in  
at2_wait_modem_command: before while cur_time = end_time
  7 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer:  
after select, ret: 1
  8 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer:  
before read, ret: 1
  9 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer:  
after read, s: 12
 10 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_line with  
gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý'
 11 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_line if  
eol == -1 will return NULL eol: -1
 12 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer:  
after select, ret: 0
 13 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_line with  
gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý'
 14 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_line if  
eol == -1 will return NULL eol: -1

... 1000's of repetitions of the above 3 lines ...
 15 2008-06-07 12:51:10 [15527] [6] DEBUG: in  
at2_wait_modem_command: Out of loop: cur_time: 1212864670, end_time:  
1212864669
 16 2008-06-07 12:51:10 [15527] [6] ERROR: AT2[vzn00]: Wrong or  
no answer to ATZ, ignoring

 17 2008-06-07 12:51:10 [15527] [6] DEBUG: AT2[vzn00]: -- AT^M
 18 2008-06-07 12:51:10 [15527] [6] DEBUG: AT2[vzn00]: -- AT^M - 
response: 3
 19 2008-06-07 12:51:10 [15527] [6] DEBUG: in  
at2_wait_modem_command: before while cur_time = end_time
 20 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_buffer:  
after select, ret: 0
 21 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_line with  
gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý'
 22 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_line if  
eol == -1 will return NULL eol: -1

Re: Modem connection help : Multi-Tech MTCBA-G-EN-F4

2008-06-23 Thread Andreas Fink
Tony,Try CVS version and apply this patch.

telnet.diff
Description: Binary data
This adds telnet support besides rawtcp.I also added support for login/password prompts scanning as the Multi-Tech asks for Username / Password at login (and Cisco's do as well usually).in the config put this:group = modemsid = wavecomname = Wavecomdetect-string = "WAVECOM"group = smscsmsc = atsmsc-id = "mymodem"modemtype = wavecomspeed = 19200device = telnetport = 5000host = 1.2.3.4keepalive = 240smsc-username = smsc-password = I tested with Multitech Firmware Release 1.19.If it works fine with you and others, I will commit it tomorrow after having it tested with a cisco router as well.On 24.06.2008, at 01:02, Andreas Fink wrote:Tony,I looked a little bit deeper into your issue withMulti-Tech MTCBA-G-EN-F4 modem.I actually have such a device now on my desk as I found it rather neat to have it on ethernet. Saves a computer and USB to serial for my test modem banks.There are two things to be changed for it to work with Kannel:a) after connecting a tcp session, a telnet handshake has to be done (that part i find rather strange). So some exchange of escape sequences has to be done.b) after that exchange, the user is prompted with Login: and Password: before he gets access to the AT commands.tcp connections are supported in kannel (device=rawtcp, host=... port=...) but above stops your device from working.I'll see that I can make a patch for this device by extending kannel to support smsc-username/smsc-password on at-commands to log in as well as to add the telnet handshake.On 19.06.2008, at 00:08, Tony Kirkham wrote:I have not been able to make any headway on this. If anyone has any ideas, that would help, I would greatly appreciate it. Thanks,-TonyOn Sat, Jun 7, 2008 at 1:27 PM, Tony Kirkham [EMAIL PROTECTED]> wrote: Hi, guys,I'm back with more questions. I am still trying to get kannel to talk to a Multi-Tech MTCBA-G-EN-F4 modem that connects via an ethernet port.  If you have good knowledge of the smsc_at driver code I could really use your help. I have been hacking away at the smsc_at.c code and have wrapped the code to detect the modem speed in an  if ( privdata->is_serial ) { ... }statement so that this won't be attempted because, apparently, you cannot detect this modems speed. I thought this would solve my problem but, alas, it did not. I have now worked my way down into the at2_read_buffer() call and I think that this is where the problem is occurring. I have placed a few DEBUG log file writes in locations to show what is happening. I am completely new to communicating to modems and via raw tcp so I do not know what should be expected. However, I don't think the at2_read_buffer() call is getting anything. Below, is a reduced log file for the at device containing what is written from a startup - shutdown cycle of bearerbox.  The biggest indicators that I see are that privdata->lib = strange characters and at2_read_line() never finds an end-of-line character. The at2_read_buffer() call only executes a read the first time for the first AT command. After that it seems like the state of something is stuck because the select() call only returns 0 causing the at2_read_buffer() call to return NULL before the read() is attempted. If anyone has some insight into this I would greatly appreciate it. I am using the code in the source download. I have not pulled anything from the cvs repository.Thank you very much,-Tonylog file   1 2008-06-07 12:51:06 [15527] [6] INFO: AT2[vzn00]: opening device 2 2008-06-07 12:51:06 [15527] [6] DEBUG: AT2[vzn00]: device opened 3 2008-06-07 12:51:06 [15527] [6] INFO: AT2[vzn00]: init device  4 2008-06-07 12:51:06 [15527] [6] DEBUG: AT2[vzn00]: --> ATZ^M 5 2008-06-07 12:51:06 [15527] [6] DEBUG: AT2[vzn00]: --> ATZ^M -response: 4 6 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_wait_modem_command: before while cur_time = end_time  7 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer: after select, ret: 1 8 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer: before read, ret: 1 9 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer: after read, s: 12  10 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_line with gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý' 11 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_line if eol == -1 will return NULL eol: -1  12 2008-06-07 12:51:06 [15527] [6] DEBUG: in at2_read_buffer: after select, ret: 0 13 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_line with gt_flag=0, gtloc=-1, lib=ÿý^Xÿý ÿý#ÿý' 14 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_read_line if eol == -1 will return NULL eol: -1 ... 1000's of repetitions of the above 3 lines ... 15 2008-06-07 12:51:10 [15527] [6] DEBUG: in at2_wait_modem_command: Out of loop: cur_time: 1212864670, end_time: 1212864669 16 2008-06-07 12:51:10 [15527] [6] ERROR: AT2[vzn00]: Wrong or no answer to ATZ, ignoring  17 2008-06-07 12:51:10 [15527] [6] DEB

Re: Moving to git? [was: Re: [RFC] variable sms_split() length per SMSCConn]

2008-06-19 Thread Andreas Fink


On 18.06.2008, at 17:05, Guillaume Cottenceau wrote:


Alexander Malysh amalysh 'at' kannel.org writes:


diff --git a/gw/smscconn.c b/gw/smscconn.c
index 21e824d..6654665 100644


Does that mean Alex has some git experience and could positively
examine a request to migrating to git? Kannel still uses CVS, and
it would probably make developers and contributors life easier to
use a more powerful VCS.


Some platforms dont have GIT (like mine).
CVS is old I must admit. My favour would be SVN though.
Things like non deletable directories are really stone age...


Hosting the git repo on the fedora box behind kannel.org should
be pretty easy; there is a lot of documentation out there,
including that one from me if needed (though it's normally aimed
at shared servers).


The hosting server are not the problem. Users are.
Have you seen GIT for Windows for example? or for Solaris 8 , HP/UX etc?
cvs is there by default often where git is not.




Re: Modem connection help : Multi-Tech MTCBA-G-EN-F4

2008-06-19 Thread Andreas Fink

Tony, do you have any documentation on this modem?
if it's a standard AT modem, it should work out of the box with kannel.
if you go for TCP instead of serial, there are a few things to consider:

a) setting serial port speed is probably out of control
b) hardware handshake etc as well.

But let's dig into your questions:

On 19.06.2008, at 00:08, Tony Kirkham wrote:

I have not been able to make any headway on this.  If anyone has any  
ideas, that would help, I would greatly appreciate it.


Thanks,

-Tony

On Sat, Jun 7, 2008 at 1:27 PM, Tony Kirkham  
[EMAIL PROTECTED] wrote:

Hi, guys,

I'm back with more questions.  I am still trying to get kannel to  
talk to a Multi-Tech MTCBA-G-EN-F4 modem that connects via an  
ethernet port.


If you have good knowledge of the smsc_at driver code I could really  
use your help.


I think I have (as I wrote it initially...)

I have been hacking away at the smsc_at.c code and have wrapped the  
code to detect the modem speed in an

  if ( privdata-is_serial ) { ... }
statement so that this won't be attempted because, apparently, you  
cannot detect this modems speed.


.. I would assume you should simply skip that part. Same as on fixed  
predefined speed.


I thought this would solve my problem but, alas, it did not.  I have  
now worked my way down into the at2_read_buffer() call and I think  
that this is where the problem is occurring.  I have placed a few  
DEBUG log file writes in locations to show what is happening.  I am  
completely new to communicating to modems and via raw tcp so I do  
not know what should be expected.  However, I don't think the  
at2_read_buffer() call is getting anything.  Below, is a reduced log  
file


at2_read_buffer is simply reading whatever bytes are there from your  
device. This can be a partial line.


for the at device containing what is written from a startup -  
shutdown cycle of bearerbox.


The biggest indicators that I see are that privdata-lib = strange  
characters and at2_read_line() never finds an end-of-line character.


this would inicate some kind of problem on your setup/device. Use  
telnet to verify by hand.
One thing which could be different on a TCP connection is the end of  
line characters.


The at2_read_buffer() call only executes a read the first time for  
the first AT command.  After that it seems like the state of  
something is stuck because the select() call only returns 0 causing  
the at2_read_buffer() call to return NULL before the read() is  
attempted.


if select() returns 0 this means the remote side has not sent any bytes.

   Select() examines the I/O descriptor sets whose addresses are  
passed in readfds, writefds, and errorfds to see if some of their
 descriptors are ready for reading, are ready for writing, or  
have an exceptional condition pending, respectively.  The first nfds
 descriptors are checked in each set; i.e., the descriptors from  
0 through nfds-1 in the descriptor sets are examined.  (Example: If
 you have set two file descriptors 4 and 17, nfds should  not  
be 2, but rather 17 + 1 or 18.)  On return, select() replaces
 the given descriptor sets with subsets consisting of those  
descriptors that are ready for the requested operation.  Select()  
returns

 the total number of ready descriptors in all the sets.

So 0 essentially means, no data available to read. That's why read()  
is not called because its useless.





If anyone has some insight into this I would greatly appreciate it.   
I am using the code in the source download.  I have not pulled  
anything from the cvs repository.


not much relevant change I would guess.

I would think either your device doesnt talk AT commands or some fancy  
protocol or its a ethernet to serial adaptor in it which you have to  
configure properly for its speed (speed mismatch between device and  
ethernet adaptor).


Withouth proper documentation its impossible to find out.



Re: Moving to git?

2008-06-19 Thread Andreas Fink


On 19.06.2008, at 10:57, Guillaume Cottenceau wrote:


Andreas Fink afink 'at' list.fink.org writes:


On 18.06.2008, at 17:05, Guillaume Cottenceau wrote:


Alexander Malysh amalysh 'at' kannel.org writes:


diff --git a/gw/smscconn.c b/gw/smscconn.c
index 21e824d..6654665 100644


Does that mean Alex has some git experience and could positively
examine a request to migrating to git? Kannel still uses CVS, and
it would probably make developers and contributors life easier to
use a more powerful VCS.


Some platforms dont have GIT (like mine).


Is it not unreosonably old? Can you provide details?



I've checked on my network.
the two redhat servers I'm using since a few years, dont have git
all my MacOS X 10.4 and 10.5 servers with latest developer tools dont  
have git

all my Solaris 8 and 9 machines don't have git.
my ubuntu  server doesnt have git neither.

I'm sure it can be installed from source on all of those machines but  
its a time consuming task.

I'ts not just apt-get install git


A platform on which no kernel, xorg, wine or ruby on rails
hacking is not possible seems to me a little outdated..?


Do you maybe forget that there are machines with non intel CPU's out  
there?
And especially in telco environment, you see lots of SUN Sparc's. And  
Kannel is used on those.
I don't see why xorg, wine, ruby on rails should be a dependency of  
kannel...




Sometimes, tools a couple of years old may be chosen over very
old tools, even if outdated platforms may need to specifically
install the new tool :)


CVS is old I must admit. My favour would be SVN though.
Things like non deletable directories are really stone age...


Hosting the git repo on the fedora box behind kannel.org should
be pretty easy; there is a lot of documentation out there,
including that one from me if needed (though it's normally aimed
at shared servers).


The hosting server are not the problem. Users are.
Have you seen GIT for Windows for example?




or for Solaris 8 , HP/UX etc?


For the rest of the Unixes, I suspect compiling git for them
would not be complicated, as git was written in C with a Unix
bias in mind.


... if you have plenty of time.


cvs is there by default often where git is not.


Yes of course. But that argument should be used carefully,
because sometimes better tools which are widely available would
overally benefit to the project.



I currently dont see the benefit of git.
Today I use cvs and svn. Both in exactly the same way. They work fine.  
So why change to something new?




Also, when moving to git, there's still:

- gitweb allowing any web client to browse the repo


like cvsweb








  1   2   3   >