Re: [PATCH] admin http 'loglevel' command for bearerbox

2003-02-27 Thread Alex Judd



+1 from me. Looks great and very 
handy.

  - Original Message - 
  From: 
  Angel 
  Fradejas 
  To: Kannel Developers 
  Sent: Thursday, February 27, 2003 11:03 
  AM
  Subject: [PATCH] admin http 'loglevel' 
  command for bearerbox
  
  Hi 
  all
   
  Find 
  attached a patch to support an admin HTTP command to change the log level 
  without restaring bearerbox.
   
  Example: 
  http://localhost:13000/loglevel?password=x&level=1
   
  Please 
  consider committing to cvs.
   
  Angel 
  FradejasMediafusión España, S.A.[EMAIL PROTECTED]www.mediafusion.esTel. +34 91 252 32 
  00Fax +34 91 572 27 08 
   
   


Re: SMPP 3.4 C-Octet String Termination

2003-02-26 Thread Alex Judd
Ahh.. I think Alexander is right

DELIVER_SM specifies that short_message is a Var 0 - 254 size octets

Then specified earleir in the spec. is that Var 0 - 254 is an Octet String,
not a C-Octet String

Octet Strings are not Null terminated.

Looks like Mobay's gateway is buggy. I'll try and get them to fix it.

Alex




Re: SMPP 3.4 C-Octet String Termination

2003-02-26 Thread Alex Judd
Alexander

Not sure if that's true.

According to the SMPP3.4 specs "C-Octet String A series of ASCII characters
terminated with the NULL character. Notes: (i) Reference made to NULL
settings of Octet-String fields implies that the field consists of a single
NULL character, i.e., an octet encoded with value 0x00 (zero)."

Which would mean it's valid to send a message content of 

2003-02-26 12:24:42 [6] DEBUG: SMPP[Vittel]: Got PDU:
..
2003-02-26 12:24:42 [6] DEBUG:   short_message:
2003-02-26 12:24:42 [6] DEBUG:Octet string at f4ef8:
2003-02-26 12:24:42 [6] DEBUG:  len:  5
2003-02-26 12:24:42 [6] DEBUG:  size: 6
2003-02-26 12:24:42 [6] DEBUG:  immutable: 0
2003-02-26 12:24:42 [6] DEBUG:  data: 41 6c 65 78 00Alex.
..^^^

which then is translated by Kannel as

2003-02-26 12:24:42 [6] INFO: Starting to service  from
<447740305115> to <80118>

which is defintiely wrong.

Yes, no?

Alex

- Original Message -
From: "Alexander Malysh" <[EMAIL PROTECTED]>
To: "Stipe Tolj" <[EMAIL PROTECTED]>
Cc: "Alex Judd" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, February 26, 2003 3:16 PM
Subject: Re: SMPP 3.4 C-Octet String Termination


> it can't be C-Octet-String at all ;) Just think that '@' in GSM 03.38 is
0x00 ;)
>
> Am Mittwoch, 26. Februar 2003 16:10 schrieb Stipe Tolj:
> > Alexander Malysh wrote:
> > > this is not the kannel problem! Your smsc sned wrong pdu:
> > > please look smpp v.3.4 issue 1.2 site 61...
> > > short_message field is Octet-String and not C-Octet-String.
> > > Your smsc is just buggy ;)
> >
> > if that's the case, Alex, could you ask which explicit SMSC it is? So
> > we can put the vendor and the model on a "not spec conform black-list"
> >
> > :)
> >
> > Stipe
> >
> > [EMAIL PROTECTED]
> > ---
> > Wapme Systems AG
> >
> > Vogelsanger Weg 80
> > 40470 Düsseldorf
> >
> > Tel: +49-211-74845-0
> > Fax: +49-211-74845-299
> >
> > E-Mail: [EMAIL PROTECTED]
> > Internet: http://www.wapme-systems.de
> > ---
> > wapme.net - wherever you are
>
> --
> Best regards / Mit besten Grüßen aus Köln
>
> Dipl.-Ing.
> Alexander Malysh
> ___
>
> Centrium GmbH
> Ehrenstraße 2
> 50672 Köln
>
> Fon: +49 (0221) 277 49 240
> Fax: +49 (0221) 277 49 109
>
> email: [EMAIL PROTECTED]
> web: www.centrium.de
> msn: [EMAIL PROTECTED]
> icq: 98063111
>
>




SMPP 3.4 C-Octet String Termination

2003-02-26 Thread Alex Judd
We're working with a SMPP 3.4 server that validly (according to the 3.4
specs) terminates the C-Octet Strings it sends us with a NULL character.
This currently isn't handled directly by Kannel and ends up as an extra
character on the message content.

For example a message of AAA, length 3, now arrives at Kannel as AAA@,
length 4 [which is obviously wrong]

I've made a short term workaround to remove the character by using the
octstr_strip_nonalphanums on the msg-sms.msgdata however I'm interested in
whether everyone thinks Kannel should strip off this null character (like I
do) or whether this should occur at application level?

If it's Kannel I'll submit a proper patch

Alex
Skywire
http://www.skywire.co.uk/




Re: Rotatelog for traditional Unix systems

2003-02-19 Thread Alex Judd
A much cleaner version of the HUP code that

> + ACTIONS:
> + kill - HUP | ps -ef | grep -i production | awk '{print $2}'  :
> /var/log/kannel/access.log, /var/log/kannel/enpocket.log,
> /var/log/kannel/smsbox.log


ACTIONS:
for pid in `ps -ef | grep -i bear | awk '{print $2}'` ; do kill -HUP $pid ;
done : /var/log/kannel/access.log, /var/log/kannel/enpocket.log,
/var/log/kannel/smsbox.log





Rotatelog for traditional Unix systems

2003-02-17 Thread Alex Judd
Everyone

Additional comments on rotating logs for the userguide for systems that
don't have RedHat's logrotate installed.

Alex

--- userguide.xml.orig  2003-02-17 17:19:11.420001000 +
+++ userguide.xml   2003-02-17 17:20:19.650037000 +
@@ -7490,6 +7490,24 @@
   endscript
 }
 
+
+ 
+ For traditional Unix based systems such as Solaris and HPUnix we
recommend using
+ rotatelog, a free Perl based log rotator from InterHack
(http://www.interhack.net
+ /projects/rotatelog/). A sample logrotate script
(/usr/local/etc/rotatelog.conf)
+ is shown below.
+ 
+
+ 
+ FILES:
+ /var/log/kannel/access.log2M  kannel:kannel775
gz 100
+ /var/log/kannel/enpocket.log  2M  kannel:kannel775
gz 100
+ /var/log/kannel/smsbox.log2M  kannel:kannel775
gz 100
+ ACTIONS:
+ kill - HUP | ps -ef | grep -i production | awk '{print $2}'  :
/var/log/kannel/access.log, /var/log/kannel/enpocket.log,
/var/log/kannel/smsbox.log
+ NOTIFY:
+ [EMAIL PROTECTED]
+ 
 

 





Re: T68i incorrect support of CNMI

2003-02-15 Thread Alex Judd
Yes - it does look like it's well and truly broken.

However... it does work fine if it's configured with sim-buffering so
perhaps we change the default settings for the T68i to be that. At least
that way it works?

Alex

- Original Message - 
From: "Bruno Rodrigues" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 14, 2003 8:42 PM
Subject: Re: T68i incorrect support of CNMI


> Citando Alex Judd <[EMAIL PROTECTED]>:
>
> > RE: [Fwd: Removing WTP-SAR limit 32768 B]Anyone else noticed that the
T68i
> > appears to break the rules of the CNMI command in smsc_at2.c?
> >
> > AT+CNMI=?
> > +CNMI: (3),(0,1,3),(0,2),(0),(0)
>
> Haven't I commented modems.conf with something like "# Ericsson T68 -
forget it" ?
>
> I've tried every combination and the I've given up. Ericsson reply was
"won't
> fix it" :(((
>
>
>
> -- 
> 






Re: SMPP driver default autodetect should be 1

2003-02-14 Thread Alex Judd
Basically detects whether we are sending National, International or Alpha
headers for our messages and adjusts the source TOP and NPI parameters to
the correct settings according to Logica's SMPP 3.4 specifications.

Used to be automaticly there until recently when it got change to be
disabled by default. Not real problem for me as I know it's there however
most users who expect an 'out of the box' working SMPP driver will need to
go into the source and change it.

+lots from me to change it.

Alex

- Original Message - 
From: "Stipe Tolj" <[EMAIL PROTECTED]>
To: "Andreas Fink" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, February 14, 2003 7:45 AM
Subject: Re: SMPP driver default autodetect should be 1


> Andreas Fink schrieb:
> >  any objections from the others? I'm +0 on this.
> >
> > Can anyone enlighten me on what it is autodetecting here? Then I can
come to some opinion...
>
> it's autodetecting the TON, and hence sets the destination TON
> accordingly for submit_sm PDUs.
>
> Stipe
>
> [EMAIL PROTECTED]
> ---
> Wapme Systems AG
>
> Vogelsanger Weg 80
> 40470 Düsseldorf
>
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
>
> E-Mail: [EMAIL PROTECTED]
> Internet: http://www.wapme-systems.de
> ---
> wapme.net - wherever you are






Re: Does Kannel log support logrotation (userguide patch)

2003-02-13 Thread Alex Judd
logrotate being owned by RedHat is not currently updated on Solaris, so
instead I'm using rotatelog which is Perl based and very portable.

I'll add some documentation on that (as well as example configurations) if
of interest to the Solaris users among us?

Alex


- Original Message -
From: "Alan McNatty" <[EMAIL PROTECTED]>
To: "Stipe Tolj" <[EMAIL PROTECTED]>
Cc: "Kannel Dev" <[EMAIL PROTECTED]>
Sent: Tuesday, February 11, 2003 7:30 AM
Subject: Re: Does Kannel log support logrotation (userguide patch)


Here you go ... in unified format.

On Tue, 2003-02-11 at 15:15, Stipe Tolj wrote:
> Alan,
>
> can you provide the userguide.xml patch in diff -u (unified) format,
> that should be easier to read and to apply.
>
> Thanks in advance.
>
> Stipe
>
> [EMAIL PROTECTED]
> ---
> Wapme Systems AG
>
> Vogelsanger Weg 80
> 40470 Düsseldorf
>
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
>
> E-Mail: [EMAIL PROTECTED]
> Internet: http://www.wapme-systems.de
> ---
> wapme.net - wherever you are
>
>






Re: Re: smsc_smpp.c -- some minor fixes

2003-02-12 Thread Alex Judd
Not to enter the discussions at last point but can you also remove all the -
DAVE notes from the comments, especially where duplicate settings are
removed and your comment just says so?

Attach the final diff as an attachment so we can all quickly test and
finalise it would be great

Not meaning to moan :-)

Alex





SMPP driver default autodetect should be 1

2003-02-11 Thread Alex Judd



By default we are disabling the auto switching of 
TON and NPI in the SMPP driver. 
 
I think we should enable this by default and then 
allow to explicitly turn it off.
 
smsc_smpp.c, line 1272, autodetect_addr = 
1;
 
Make sense to everyone?
 
Alex


T68i incorrect support of CNMI

2003-02-10 Thread Alex Judd
RE: [Fwd: Removing WTP-SAR limit 32768 B]Anyone else noticed that the T68i
appears to break the rules of the CNMI command in smsc_at2.c?

AT+CNMI=?
+CNMI: (3),(0,1,3),(0,2),(0),(0)

which default setting to =3,3,2,0,0 means that no messages should be stored
in memory, and even if they are they will be flushed through once read.

However.. the phone stores them in memory even though it says that the
memories are empty.

Anyone else worked around this?

Alex





Re: MMS binary code..

2003-02-06 Thread Alex Judd
Right - I understand your problem better now.

Send the following MMS to your phone to see a correctly formatted T68i MMS
with smil, text and gif all included. The T68i receives this and displays it
correctly.

http://212.118.244.25/mmstest/Name.mms

Alex

> and that would generally mean that there is smil presentation attached
> to the message...

There is with the above mms.

> I have a question regarding this issue...
> * Did anyone here successfully create any mms-presentation working on
> t68i ? (containing smil)

Yes, see above.

>
> A short descrition of the problem:
> t68i complains on "message format corrupt" (message on screen AFTER
> downloading the message) when it gets a message containing smil
> presentation in it. (multipart/related)
> when sending a message without smil in it (multipart/mixed) it is
> capable recieving a message...

Hopefully the above should help.

Alex





Re: MMS binary code..

2003-02-05 Thread Alex Judd
Maria

You can try a T68i compatible binary from our site at
http://212.118.244.25/mmstest/matrix.mms

Regards

Alex





Re: Q: How to extract SMPP gateway code from Kannel

2003-01-15 Thread Alex Judd
As Stipe says, you should use Kannel, as the Kannel whole product, with SMPP
support and interface with that. You can build light weight versions of it
by modifying the make file however trying to extract just the driver is
going to cause you issues.

If however you want SMPP code on it's own to interface with then look at
Logica's Open Source Java version of it's protocol.

http://opensmpp.logica.com/

Alex

- Original Message -
From: "Stipe Tolj" <[EMAIL PROTECTED]>
To: "KRUCHIO Gabor" <[EMAIL PROTECTED]>
Cc: "'Andreas Fink'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 9:19 AM
Subject: Re: Q: How to extract SMPP gateway code from Kannel


> > Could you give me some thumb of rules which are relevant if
> > I has to
> > - cut out some parts of Kannel (e.g. SMPP interface)
> > - integrate it into my code.
>
> first of all read COPYING ;)
>
> you should consider using the SMPP module as it is intended, for
> Kannel usage. Let your application interface with Kannel.
>
> You may cut out the module, but this will make you more work then
> implementing the interface, IMO.
>
> Stipe
>
> [EMAIL PROTECTED]
> ---
> Wapme Systems AG
>
> Münsterstr. 248
> 40470 Düsseldorf
>
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
>
> E-Mail: [EMAIL PROTECTED]
> Internet: http://www.wapme-systems.de
> ---
> wapme.net - wherever you are





Re: Memory leak suspicion in wap-appl.c

2003-01-13 Thread Alex Judd
I can see no problems with the proposed changes. octstr_destroy checks
whether the octstr is null before trying to destroy it anyway so will cause
no adverse effects.

Alex

- Original Message -
From: "Stipe Tolj" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "devel" <[EMAIL PROTECTED]>
Sent: Monday, January 13, 2003 4:15 PM
Subject: Re: Memory leak suspicion in wap-appl.c


> Vjacheslav Chekushin wrote:
> >
> > Hi, list.
> > I suspect memory leak in wap-appl.c
> > It's about set_referer_url():
> >
> > static void set_referer_url(Octstr *url, WSPMachine *sm)
> > {
> >  gw_assert(url != NULL);
> >  gw_assert(sm != NULL);
> >
> >  sm->referer_url = octstr_duplicate(url);
> > }
> >
> > In wap-appl.c we use it:
> >
> >  if (session_id != -1) {
> >  debug("wap.wsp.http",0,"WSP: Setting Referer URL to
<%s>",
> >octstr_get_cstr(url));
> >  if ((sm = find_session_machine_by_id(session_id)) !=
NULL) {
> >  set_referer_url(url, sm);
> >  } else {
> >  error(0,"WSP: Failed to find session machine for ID
%ld",
> >session_id);
> >  }
> >  }
> >
> > I don't see where preovious sm->referer_url destroyed.
> > Must we before
> > sm->referer_url = octstr_duplicate(url);
> > Insert
> > octstr_destroy(sm->referer_url); ?
> >
> > Or may be I simply didn't find where it destroyed ;-) .
>
> any comments from the crew here?!
>
> [EMAIL PROTECTED]
> ---
> Wapme Systems AG
>
> Vogelsanger Weg 80
> 40470 Düsseldorf
>
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
>
> E-Mail: [EMAIL PROTECTED]
> Internet: http://www.wapme-systems.de
> ---
> wapme.net - wherever you are





Re: 1 bug and some queries with SMPP driver

2003-01-07 Thread Alex Judd
> Should the SMPP driver treat message queue full errors in a similar manner
> to throttling errors
> as I think some SMSC operators request this behaviour. And it makes sense
to
> retry a message that
> receives a message queue full error.

I haven't found any exact documentation from either Logica or any of our
SMSCs on how to cope with the Message queue full error so I would expect
that the current 'back off for a while and try again in a short time'
approach will work, however it's not that elegant.

Instead, could we not send a Generic Nack PDU every x amount of
seconds/milliseconds until the error is cleared and we get a PDU back with 0
rather than 14? This way it's potentially significantly neater and delivery
can resume potentially quicker.

For the throttling code I've wanted to write some auto-speed controlling
code that will self regulate the speed of the message sending to avoid
getting I/F Throttled Errors, rather than the current workable but not
beautiful approach.

Basically if you could track the amount of 58 I/F errors you get over a
certain period and then divide your messaging speed to reduce the speed down
then the system could auto regulate itself. Not that would be nice!

> When a message is sent requesting a submission report, why does the SMPP
> driver save the
> message to the store if the response is successful and not save the
message
> if the
> response is unsuccessful. Surely the behaviour should be the same
regardless
> of
> failed or succeeded. It also seems to be inefficient if only requesting
> submission reports
> and not delivery reports!

Would make sense to store all messages submitted regardless of delivery
outcome. Agreed.

> Within the SMPP driver there is the following line for throttling
messages:
>

> condition evaluation, I would suggest that this would be easier to
> understand if it was extracted out of
> the if statement.

+1 from me.

Alex
Skywire





Re: MMS m-notification-ind and test_ppg

2002-12-03 Thread Alex Judd
Yep agreed.

We can either force all carriage returns to use the CRLF standard on parsing
of the page (recommended route) or have a system/carriage return character
switch on the command line.

There's a few other minor modifications I'd like to make to test_ppg etc. so
I'd be happy to implement the changes necessary.

BTW does the content look right?

Alex

- Original Message -
From: "Aarno Syvänen" <[EMAIL PROTECTED]>
To: "Alex Judd" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 03, 2002 3:41 PM
Subject: Re: MMS m-notification-ind and test_ppg


> This indeed causes problems, though CRLF line break is one defined by
> MIME standard. Perhaps command line option for line break would be
> usefull - i mean one translating input break to standard ones.
>
> Aarno
>
> On Friday, November 29, 2002, at 05:13 PM, Alex Judd wrote:
>
> > I was using binary as wappush returns a syntax error if I wasn't
> > encoding
> > the data. test_ppg seems to use windows (oa,od) carriage returns for
> > it's
> > joined lines, whereas my system is using xnix(oa) carriage returns.
> > Don't
> > know if this would cause the problem
> >
> > I enclosed the dumps below.
> >
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 3c 62 61 64 6d 65 73 73
> >  > 2002-11-29 17:11:42 [1] DEBUG:   data: 61 67 65 2d 72 65 73 70
> > age-resp
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 6f 6e 73 65 20 63 6f 64   onse
> > cod
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 65 3d 22 32 30 30 30 22
> > e="2000"
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 20 64 65 73 63 3d 22 4e
> > desc="N
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 6f 74 20 75 6e 64 65 72   ot
> > under
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 73 74 6f 6f 64 20 64 75   stood
> > du
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 65 20 74 6f 20 6d 61 6c   e to
> > mal
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 66 6f 72 6d 65 64 20 73
> > formed s
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 79 6e 74 61 78 22 3e 3c
> > yntax"><
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 2f 62 61 64 6d 65 73 73
> > /badmess
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 61 67 65 2d 72 65 73 70
> > age-resp
> > 2002-11-29 17:11:42 [1] DEBUG:   data: 6f 6e 73 65 3e 3c 2f 70
> > onse> > 2002-11-29 17:11:42 [1] DEBUG:   data: 61 70 3e  ap>
> >
> >> From debugging the message the total wappush is
> >
> > POST /wappush?username=&password= HTTP/1.1
> > (0a,0d)Host: localhost:8080
> > (0a,0d)Content-Type:multipart/related; boundary=asdlfkjiurwghasf;
> > type="application/xml"
> > (0a,0d)X-WAP-Application-Id: mms.ua
> > (0a,0d)Content-Length: 779
> > (0a,0d)
> > (0a,0d)
> > (0a,0d)--asdlfkjiurwghasf
> > (0a,0d)Content-Type: application/xml
> > (0a,0d)
> > (0a) > "http://www.wapforum.org/DTD/pap_1.0.dtd";>
> > (0a)
> > (0a)  > progress-notes-requested="false">
> > (0a)> address-value="[EMAIL PROTECTED]">
> > (0a) 
> > (0a)  
> > (0a)
> > (0a,0d)
> > (0a)--asdlfkjiurwghasf
> > (0a,0d)Content-Type: application/vnd.wap.mms-message
> > (0a,0d)Content-Type:application/vnd.wap.mms-message
> > (0a)X-Mms-Message-Type:m-notification-ind
> > (0a)X-Mms-Transaction-Id:125
> > (0a)X-Mms-Version:1.0
> > (0a)X-Mms-Message-Class:Personal
> > (0a)X-Mms-Message-Size:4910
> > (0a)X-Mms-Expiry:256;type=relative
> > (0a)X-Mms-Content-Location:http://212.118.244.25/mmstest/m4.mms
> > (0a)X-WAP-Application-Id:x-wap-application:mms.ua\
> > (0a,0d)
> > (0a)--asdlfkjiurwghasf--
> >
> >
>





Re: MMS m-notification-ind and test_ppg

2002-12-03 Thread Alex Judd
I was using binary as wappush returns a syntax error if I wasn't encoding
the data. test_ppg seems to use windows (oa,od) carriage returns for it's
joined lines, whereas my system is using xnix(oa) carriage returns. Don't
know if this would cause the problem

I enclosed the dumps below.

2002-11-29 17:11:42 [1] DEBUG:   data: 3c 62 61 64 6d 65 73 73   <
2002-11-29 17:11:42 [1] DEBUG:   data: 2f 62 61 64 6d 65 73 73   /badmess
2002-11-29 17:11:42 [1] DEBUG:   data: 61 67 65 2d 72 65 73 70   age-resp
2002-11-29 17:11:42 [1] DEBUG:   data: 6f 6e 73 65 3e 3c 2f 70   onse>

>From debugging the message the total wappush is

POST /wappush?username=&password= HTTP/1.1
(0a,0d)Host: localhost:8080
(0a,0d)Content-Type:multipart/related; boundary=asdlfkjiurwghasf;
type="application/xml"
(0a,0d)X-WAP-Application-Id: mms.ua
(0a,0d)Content-Length: 779
(0a,0d)
(0a,0d)
(0a,0d)--asdlfkjiurwghasf
(0a,0d)Content-Type: application/xml
(0a,0d)
(0a)http://www.wapforum.org/DTD/pap_1.0.dtd";>
(0a)
(0a) 
(0a)   
(0a) 
(0a)  
(0a)
(0a,0d)
(0a)--asdlfkjiurwghasf
(0a,0d)Content-Type: application/vnd.wap.mms-message
(0a,0d)Content-Type:application/vnd.wap.mms-message
(0a)X-Mms-Message-Type:m-notification-ind
(0a)X-Mms-Transaction-Id:125
(0a)X-Mms-Version:1.0
(0a)X-Mms-Message-Class:Personal
(0a)X-Mms-Message-Size:4910
(0a)X-Mms-Expiry:256;type=relative
(0a)X-Mms-Content-Location:http://212.118.244.25/mmstest/m4.mms
(0a)X-WAP-Application-Id:x-wap-application:mms.ua\
(0a,0d)
(0a)--asdlfkjiurwghasf--





Re: MMS m-notification-ind and test_ppg

2002-11-28 Thread Alex Judd
Update from myself is that you can actually use Apache to serve binary mms
files quite successfully and send alerts with the m-notification code from
Aarno (thanks to Igor for the test image)

If anyone else is interested on this part, I'm putting together a faq
document covering this so I'll publish it when done.

Any ideas on the wap_ppg generation question?

Alex

> 2. Serving MMS content
>
> I've configured Apache to serve .mms files with the content type
> application/vnd.wap.mms-message (thanks Ivor) however the phone complains
of
> a formatting error when it recieves the message. I'm using Nokia encoded
> binary messages here which should in theory work. Again, open for
> suggestions as how to verify these messages are correct.
>
> Thoughts are that I may need to use Kannel as a proxy to fetch the content
> from the Apache server and serve it itself. Guessing that might be the SAR
> issue that has been resolved that stopped this happening before however
now
> works.
>
> Thanks for the help so far :)
>
> Alex
>
> Skywire
>





MMS m-notification-ind and test_ppg

2002-11-27 Thread Alex Judd
Aarno/Paul/Ivor/Andreas/Marco

I've been reading everyones post and problems on the Kannel mailing list in
depth with MMS notification sending and so far are still having problems
which I can't resolve - therefore wondering if you anyone can shed any light
with a couple of problems that I'm having with it.

1. Tokenisation of the m-notification txt file

I'm currently doing this using test_ppg and the output I'm getting is very
different from your 'humanised' tokenizing. Using

../test/test_ppg -e base64 -a mms -c mms
"http://localhost:8080/wappush?username=yyy&password=xxx";
m-notification-ind.txt pap.txt'

I get

2002-11-27 16:42:05 Sent SMS [SMSC:889567] [SVC:test] [ACT:]
[from:2199] [to:+447740305115] [flags:0:2:0:0:0]
[msg:128:06063ABE966C6F63616C686F73743A3830383000AF84436F6E74656E742D5472616
E736665722D456E636F64696E670062696E617279008D020146B480436F6E74656E742D54797
0653A206170706C69636174696F6E2F766E642E7761702E6D6D732D6D6573736167650A582D4
D6D732D4D6573736167652D547970653A206D] [udh:12:0B05040B8423F3060301]

2002-11-27 16:42:05 Sent SMS [SMSC:889567] [SVC:test] [ACT:]
[from:2199] [to:+447740305115] [flags:0:2:0:0:0]
[msg:128:72793A203235363B20747970653D72656C61746976650A582D4D6D732D436F6E746
56E742D4C6F636174696F6E3A20687474703A2F2F3231322E3131382E3234342E32352F6D6D7
3746573742F6D312E6D6D730A582D5741502D4170706C69636174696F6E2D49643A20782D776
1702D6170706C69636174696F6E3A6D6D732E] [udh:12:0B05040B8423F3060303]

2002-11-27 16:42:05 Sent SMS [SMSC:889567] [SVC:test] [ACT:]
[from:2199] [to:+447740305115] [flags:0:2:0:0:0]
[msg:128:2D6E6F74696669636174696F6E2D696E640A582D4D6D732D5472616E73616374696
F6E2D49643A203132350A582D4D6D732D56657273696F6E3A20312E300A582D4D6D732D4D657
3736167652D436C6173733A20506572736F6E616C0A582D4D6D732D4D6573736167652D53697
A653A20343931300A582D4D6D732D45787069] [udh:12:0B05040B8423F3060302]

from

(m-notification-ind.txt)
X-Mms-Message-Type: m-notification-ind
X-Mms-Transaction-Id: 125
X-Mms-Version: 1.0
X-Mms-Message-Class: Personal
X-Mms-Message-Size: 4910
X-Mms-Expiry: 256; type=relative
X-Mms-Content-Location: http://212.118.244.25/mmstest/m1.mms
X-WAP-Application-Id: x-wap-application:mms.ua

and

(pap.txt)

http://www.wapforum.org/DTD/pap_1.0.dtd";>







whereas my understanding is that I should get 8c8298 etc.

The working m-notification-ind message I've been using to test is

http://212.118.244.25:13013/cgi-bin/sendsms?username=xxx&password=yyy&to=+44
7740305115&from=test&udh=%06%05%04%0b%84%23%f0&text=%0f%06%03%be%af%84%8c%82
%98%39%39%39%35%40%66%6c%79%65%72%6f%6e%65%2e%63%6f%6d%00%8d%90%8a%80%8e%01%
64%88%06%80%04%3d%64%8d%80%83http://212.118.244.25/mmstest/mms.wml%00

which at least initiates a call to my wap server to receive the content. The
3 part message I can 'hear' receiving the message but can't see any call to
the webserver. Also interestingly, my external server looks as though it
receives the multipart message in order of 0,2,1 however I'm guessing the
message will still be arranged correctly by Kannel.

2. Serving MMS content

I've configured Apache to serve .mms files with the content type
application/vnd.wap.mms-message (thanks Ivor) however the phone complains of
a formatting error when it recieves the message. I'm using Nokia encoded
binary messages here which should in theory work. Again, open for
suggestions as how to verify these messages are correct.

Thoughts are that I may need to use Kannel as a proxy to fetch the content
from the Apache server and serve it itself. Guessing that might be the SAR
issue that has been resolved that stopped this happening before however now
works.

Thanks for the help so far :)

Alex

Skywire





Re: m-notification-ind question

2002-11-26 Thread Alex Judd
Ericsson T68i

The problem was to do with my http smsc setup not supplying a from field to
my remote Kannel SMSC, and the remote Kannel SMSC not having a global sender
setup. Fixed that now thanks Aarno however I am having trouble with the
retrieval of the content that the phone tries to get.

Alex

- Original Message -
From: "Aarno Syvänen" <[EMAIL PROTECTED]>
To: "Alex Judd" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, November 26, 2002 9:23 AM
Subject: Re: m-notification-ind question


> What phone are you working with ?
>
> Aarno
>
> On Monday, November 25, 2002, at 04:47 PM, Alex Judd wrote:
>
> > I'm seem to be getting very different udh's generated from test_ppg
> > than
> > those from the text m-notification-ind that works.
> >
> > 1. Working udh
> >
> > udh=%06%05%04%0b%84%23%f0
> >
> > 2. Nonworking test_ppg generated UDH(s) [multi-part-message]
> >
> > [udh:12:0B05040B8423F3000301]
> > [udh:12:0B05040B8423F3000302]
> > [udh:12:0B05040B8423F3000303]
> >
> > My SMSC is returning FAILED at trying to deliver the test_ppg generated
> > ones. However, sending a manual created message works fine.
> >
> > Any ideas?
> >
> > Regards
> >
> > Alex
> >
> >
>





m-notification-ind question

2002-11-25 Thread Alex Judd
I'm seem to be getting very different udh's generated from test_ppg than
those from the text m-notification-ind that works.

1. Working udh

udh=%06%05%04%0b%84%23%f0

2. Nonworking test_ppg generated UDH(s) [multi-part-message]

[udh:12:0B05040B8423F3000301]
[udh:12:0B05040B8423F3000302]
[udh:12:0B05040B8423F3000303]

My SMSC is returning FAILED at trying to deliver the test_ppg generated
ones. However, sending a manual created message works fine.

Any ideas?

Regards

Alex





Re: [FYI] smsbox routing patch commited

2002-11-14 Thread Alex Judd
That's very cool Stipe.

I've been working here with creating an SMPP listener in order to allow
peering and the routing changes work nicely with that. Has anyone commited
an SMPP listener to the group yet?

Alex

- Original Message -
From: "Stipe Tolj" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 14, 2002 2:43 AM
Subject: Re: [FYI] smsbox routing patch commited


> forgot to say:
>
> of course the smsbox routing is an added feature, which means the
> standard default behaviour has *not* changed.
>
> If your smsbox does not identify itself via the 'smsbox-id' directive
> to bearerbox and there are no 'smsbox-route' group in your
> configuration everything stays the same.
>
> Stipe
>
> [EMAIL PROTECTED]
> ---
> Wapme Systems AG
>
> Vogelsanger Weg 80
> 40470 Düsseldorf
>
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
>
> E-Mail: [EMAIL PROTECTED]
> Internet: http://www.wapme-systems.de
> ---
> wapme.net - wherever you are





Re: Concatenation Problem in SMPP

2002-09-17 Thread Alex Judd

1. SMPP 3.3 Implementation Note for Logica's Telepath 2600 state that

"Telepath SMSC 2600 offers support for messages of up to 255 bytes in
length. SMPP also
supports a maximum of 255 characters of text in the submit_sm, submit_multi
and deliver_sm
PDUs.

However, each network variation is limited to a fixed maximum length, which
may be further
impacted by data coding scheme used, e.g. 7 bit, 8 bit etc. The SMSC
depending on
configuration may reject or truncate messages that exceed the network
maximum.

Note: The maximum message length prior to Telepath SMSC 2600 was 140 bytes."

so even if you wanted to modify the code to be specific for SMPP 3.3 then
the maximum you could support should be 255 (254 0 index).

2. Oded - also think you're right about the assumption that all messages
with a UDH part are binary, as according to the standard both header+text
and header+binary should be acceptable.

"For binary or Unicode (UCS2) messages, the entire short_message field is
formatted
exactly as described for the TP-UD field in [1].

* For text messages with User Data Headers, the User Data Header part is
encoded
exactly as described for the TP-UD field in [1]. However the text part
following the
User Data Header should be encoded in the local platform character set
(typically a
variant of ASCII). This will be the same encoding as is used for pure text
messages in
SMPP."

3. Splitting messages over SMPP

Dedy - you should follow the protocol standards which says that user
applications external to SMPP should split large messages and set the UDH
accordingly

"SMPP can support handling of fragmented short messages using the
User-Data-Header-
Indicator service-element. In this way external applications (ESMEs) may
implement message fragmentation and re-assembly, in conformance with the
GSM03.40 specification, using SMPP and the GSM mobile network as submission
and delivery interfaces.

The message fragmentation and re-assembly must be conducted by the ESME
application.

Messages received by the SMSC as fragments of a longer message will be
transported securely to the destination interface, with the UDHI intact."

I think I'll be popping this document in the SMPP area of our website.

Regards

Alex
http://www.skywire.co.uk/

- Original Message -
From: Oded Arbel
To: Dedy Sutanto ; [EMAIL PROTECTED]
Sent: Tuesday, September 17, 2002 12:38 PM
Subject: RE: Concatenation Problem in SMPP


No, that's ok - I have it on my desk :-)
ok - short_sm can be upto 254 octets, my mistake. it still not 1600 and
still not compatible with other drivers. you should stick to the UDHI
implementation and find out why you receive the messages as binary when it
just have UDH set. my guess is that its a bug in the SMPP driver that
assumes that any message with UDH in it is binary, I've seen similar stuff
elsewhere.

--
Oded Arbel
m-Wise mobile solutions
[EMAIL PROTECTED]

+972-9-9581711 (116)
+972-67-340014

::..
Who the fuck is General Failure? And why is he reading my harddisk?




-Original Message-
From: Dedy Sutanto [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 1:09 PM
To: Oded Arbel; [EMAIL PROTECTED]
Subject: RE: Concatenation Problem in SMPP


Ok it is broke something.

But I disagree with you about "SMPP standard clearly states that
short_message may not be longer then 160 characters".

I have SMPP 3.4 specification. And in SUBMIT_SM, it is mention that
short_message is up to 254 octet. It means, we can send SM more than 160 via
SMPP 3.4.

I can send you this document (1,5 Mbytes) if you will

Regards,
-dedy-



-Original Message-
From: Oded Arbel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 4:51 PM
To: Dedy Sutanto; [EMAIL PROTECTED]
Subject: RE: Concatenation Problem in SMPP

If you've changed the behaviour of smsbox to solve a driver specific issue,
in a non portable way - they heck yes : you broke something. your smsbox
will probably not work with any other driver. nor with any other SMPP server
except the comverse one, as IIRC the SMPP standard clearly states that
short_message may not be longer then 160 characters.

You're using a non compliant SMPP server, even if non-compliant in a good
way, meaning  - handles non-compliant clients. your "messages are received
binary" is probably related to improer DCS setting.

--
Oded Arbel
m-Wise mobile solutions
[EMAIL PROTECTED]

+972-9-9581711 (116)
+972-67-340014

::..
In /dev/null no one can hear you scream


-Original Message-
From: Dedy Sutanto [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 11:04 AM
To: [EMAIL PROTECTED]
Cc: Oded Arbel
Subject: RE: Concatenation Problem in SMPP
The problem is, when I send plain SMS (7-bit) with length more than 160
(240) and smsbox split it and add UDHI, SMSC send me 2 binary messages. I
thought, it because the UDH.

Then I did a dirty hack in smsbox.c. I change value MAX_SMS_OCTETS from 140
to 1600.
And try sending other plain SMS more than 160. It's work!
I test for lo

Re: MMS Task Force

2002-09-13 Thread Alex Judd

I'll setup the resources page over the weekend.

Any recommendations from the group as to documents to add please mail me
direct.

I currently will be linking all of the WAP Forum doc.s for encapsultation
etc., those from the MMDC and from 3GPP.

>> Any carriers on the list willing to let us use their test MMSC equipment
over IP for testing? <<

Alex

- Original Message -
From: "Stipe Tolj" <[EMAIL PROTECTED]>
To: "Harrie Hazewinkel" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, September 13, 2002 10:31 AM
Subject: Re: MMS Task Force


> > Since there were also some question like 'I don't know it all??'
> > maybe it is wise to create a web page that provides links to specific
> > (useful) documents.
>
> yep, agreed. We should do something like a developer's resource page.
> Any volonteers? :)






RE: MMS Task Force

2002-09-12 Thread Alex Judd

Agreed. The main priority should be to be complete the functionality needed
to be able to send and recieve messages to and from a variety of different
1st phase released MMS-Cs as per the current live v1 WAP MMS protocol
implementation.

>From this point of view adding complete support for SAR is one of the
current blocks and we have a good start in this area with the recent
submissions. Testing is obviously needed here and access to the amount of
software/hardware you have would be great.

Potentially I would also suggest a seperate cvs branch which can be
developed on without breaking the rest of the functionality. As most of us
here use the cvs version of Kannel as staging (or often as live), I'd like
to make sure that the changes don't stop the bug fixes.

Stipe - any thoughts?

Alex
http://www.skywire.co.uk/


-- Forwarded message --
Date: Wed, 11 Sep 2002 13:23:44 -0400
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: MMS Task Force

I may be wrong, but I don't think the intention is for Kannel to be a
full-blown MMS Server / Relay, although that is a very interesting idea. The
issue is to be able to use Kannel as a WAP GW / Push Proxy for a third-party
MMS Server/Relay.

I have (briefly) tried out Kannel in the past with a Java-based MMS Server
prototype, and what needs to be resolved for Kannel to support MMS are
basically two issues:

a) Full support for SAR. There seems to be some progress on this issue.
b) Support for some mechanism in order for Kannel to send the MMS server the
MMS sender's address.

That is how far I got with Kannel. There may be other issues that I'm
unaware of yet. BTW, the latest MMS spec proposes SOAP as the MM7 protocol.
The protocol on MM4 is SMTP. I can also help out with testing, since I have
access to several MMS-C versions.

..Andries.
Andries J. Schutte
tel +1 781 998 4689
mobile +1 781 424 7284
-Original Message-
From: ext Oded Arbel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 12:21 PM
To: Alex Judd; [EMAIL PROTECTED]
Subject: RE: MMS Task Force

This is indeed very interesting, and I'd love to see full MMS support in
Kannel.
Unfortunatly, I don't know much about the current MMS infrastructure in
Kannel. I understand that it uses wapbox, but over what bearer - sms through
a normal SMSC ?
Can Kannel do MM7 over SMTP ?
--
Oded Arbel
m-Wise mobile solutions
[EMAIL PROTECTED]
+972-9-9581711 (116)
+972-67-340014
::..
People are like clouds all unique...


-Original Message-
From: Alex Judd [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 5:04 PM
To: [EMAIL PROTECTED]
Subject: MMS Task Force

Devel
I'd like to suggest that we put together a team of us to work on getting
full MMS support into the CVS tree? I've reviewed the recent submissions
from Vjacheslav Chekushin < [EMAIL PROTECTED]> which add SAR to the platform and
from my limited reading they look fine (few programming opts. etc.) however
we'll need to have a team of focused testers/fixers/developers to ensure it
works 100%.
Stipe/Andreas/Oded - any of you guys interested?
Alex
http://www.skywire.co.uk/





MMS Task Force

2002-09-11 Thread Alex Judd



Devel
 
I'd like to suggest that we put together a team of 
us to work on getting full MMS support into the CVS tree? I've reviewed the 
recent submissions from Vjacheslav Chekushin <[EMAIL PROTECTED]> which add SAR to the platform 
and from my limited reading they look fine (few programming opts. etc.) however 
we'll need to have a team of focused testers/fixers/developers to ensure it 
works 100%.
 
Stipe/Andreas/Oded - any of you guys 
interested?
 
Alex
http://www.skywire.co.uk/
 


Re: Siemens M20 configuration

2002-09-11 Thread Alex Judd

Avner

We wrote a patch here to use our Motorola P7389i working as a development
device and because it only supported CMTI we used that. I submitted it
against CVS but due to limited take up of use (once in a blue moon it turns
up) it was left out.

The Siemens M20 should work fine without this I think however if you want to
add against CVS this is the process (add within the while loop in
at2_wait_modem_command())

1. got the CMTI and read which memory location the message is stored in

if (-1 != octstr_search(line, octstr_imm("+CMTI:"), 0)) {
   buf = gw_malloc(5);
   buf2 = gw_malloc(20);
   octstr_get_many_chars(buf, line, octstr_len(line) - 3, 3); /* work out
which message to read */

2. Terminate the string and create the AT command to read the message

   buf[3] = '\0';
   sprintf(buf2, "%s%s", "AT+CMGR=", buf);

3. Read the response header and extract PDU returned

   line = at2_wait_line(privdata,1,0);/* read header
*/
   line2 = at2_wait_line(privdata,1,0);   /* read PDU */
   if(line2 == NULL) {
  error(0,"AT2[%s]: got +CMTI but waiting for next line timed out",
  octstr_get_cstr(privdata->name));
   } else {
  octstr_append_cstr(line,"\n");
  octstr_append(line,line2);
  O_DESTROY(line2);
  at2_pdu_extract(privdata, &pdu, line);

4. Decode the PDU if it's not null

   if(pdu == NULL) {
  error(0,"AT2[%s]: got +CMTI but pdu_extract failed : PDU %s",
  octstr_get_cstr(privdata->name), octstr_get_cstr(line));
   } else {
  /* count message even if I can't decode it */
  if (messages_collected)
 ++(*messages_collected);
  msg = at2_pdu_decode(pdu, privdata);
  if(msg != NULL)
  {
 msg->sms.smsc_id = octstr_duplicate(privdata->conn->id);
 bb_smscconn_receive(privdata->conn, msg);
  }

5. Delete the SMS from Memory

  sprintf(buf2, "%s%s", "AT+CMGD=", buf); /* delete SMS */
  at2_write_line(privdata, buf2);
  line = at2_wait_line(privdata,1,0); /* read response
*/
  gw_free(buf);
  gw_free(buf2);
  O_DESTROY(pdu);
   }

Should do the trick!

Regards

Alex
http://www.skywire.co.uk/

- Original Message -
From: "Oded Arbel" <[EMAIL PROTECTED]>
To: "Avner Sternheim" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, September 10, 2002 4:30 PM
Subject: RE: Siemens M20 configuration


>
> > -Original Message-
> > From: Avner Sternheim [mailto:[EMAIL PROTECTED]]
>
> > You mention that there was a patch for the +cmti, can I use
> > it or sould I
> > implement it myself
>
> There was once a patch submitted to the list. you can find it in the devel
archives. but that patch will not work on current version, as the AT2
implementation was changed drasticly since. you can try to use it as
reference for your own patch. though adding +CMTI support would be nice, I
still think the easier and better solution would be to find and set the
correct +CNMI setting for your modem.
>
> --
> Oded Arbel
> m-Wise mobile solutions
> [EMAIL PROTECTED]
>
> +972-9-9581711 (116)
> +972-67-340014
>
> ::..
> a space shuttle
> lovers flying across the moon
> mournful violins





RE: [RFC] New temporary nack for Kannel SMPP module

2002-09-04 Thread Alex Judd

Dima

Click on the SMS link on the side bar. If that doesn't work 
try http://ajudd.kgbinternet.com/smpp/ which is a direct link to the page.

Let me know if I'm still wrong :)

Alex

On Wed, 4 Sep 2002, Dima Milentiev wrote:

> Thanks, but i can't found list we are spoking about on your minimalist site :) I see 
>only download of green_fairly and nothing else.
> 
> -Original Message-
> From: Alex Judd [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 04, 2002 2:37 PM
> To: Oded Arbel; Dima Milentiev
> Cc: [EMAIL PROTECTED]
> Subject: Re: [RFC] New temporary nack for Kannel SMPP module
> 
> 
> First things first, I've retyped that SMPP error code document and made it
> available on our very minimalist website (http://www.skywire.co.uk) - it's a
> great thing to have at your fingertips.
> 
> (slightly off topic) Let me look back at the list and find the changes that
> were submitted for One2One/T-Motion. I'd obviously appreciate a diff.
> against CVS ( :-) ) but if you're time is short don't worry. FYI O2
> Interactive (not the SMSC part of O2 but their Internet division) have
> created a propriatary XML interface that is similar to the One2One/T-Motion
> one and we have to implement that for a client.
> 
> I'm pretty sure I can post this one back when we've done it :-)
> 
> Alex
> 
> 
> - Original Message -
> From: "Oded Arbel" <[EMAIL PROTECTED]>
> To: "Alex Judd" <[EMAIL PROTECTED]>; "Dima Milentiev" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 03, 2002 8:03 PM
> Subject: RE: [RFC] New temporary nack for Kannel SMPP module
> 
> 
> >
> > Oh, but we did :-) it was posted on the Kannel-devel list a couple of
> weeks ago. unfortunatly, it requires some major modifications to Kannel
> infrastructure, and since it never got good testing, it didn't make it into
> the CVS.
> > There was a good suggestion by Nisan Bloch on how to improve it, and when
> we'll have the time we'll implement it and try again, but it the mean time -
> if you want, I can generate it again against latest CVS and resubmit.
> >
> > --
> > Oded Arbel
> > m-Wise mobile solutions
> > [EMAIL PROTECTED]
> >
> > +972-9-9581711 (116)
> > +972-67-340014
> >
> > ::..
> > To learn is to remember things that you know,
> > to do is to demonstrate that you know them,
> > to teach is to remind other people that they also know them.
> > We are all learners, doers and teachers.
> > -- Richard Bach
> >
> >
> >
> >
> > > -Original Message-
> > > From: Alex Judd [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, September 03, 2002 7:07 PM
> > > To: Dima Milentiev
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [RFC] New temporary nack for Kannel SMPP module
> > >
> > >
> > > Hi Dima
> > >
> > > I have the document pinned to my wall infront of me all the
> > > time as it's the
> > > best summary of error codes I've found, however it no longer
> > > looks like they
> > > have it available on their site so I'll put it into a quick
> > > word document.
> > > Shouldn't take more than 5 minutes.
> > >
> > > As a trade, are you planning on releasing back your XML driver for
> > > connecting to One2One/TMobile in the UK??
> > >
> > > :-) Regards
> > >
> > > Alex
> > >
> > >
> > > - Original Message -
> > > From: "Dima Milentiev" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Cc: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, September 03, 2002 5:29 PM
> > > Subject: RE: [RFC] New temporary nack for Kannel SMPP module
> > >
> > >
> > > > Hi Alex,
> > > >
> > > > i've found that you once wrote: "There is a really good
> > > error message
> > > summary in a document I got from the
> > > > Geeks Co site for their smartSMPP product which has them
> > > all summarised in
> > > > Appendix B. I can probably dig it up if you can't find it."
> > > > Could you please try to find and send it? It will be very
> > > helpful for all
> > > working with SMPP.
> > > >
> > > > thanks for advanse,
> > > >
> > > >
> > > > Dima Milentiev
> > > > m-Wise Mobile Solutions
> > > >
> > 

Re: [RFC] New temporary nack for Kannel SMPP module

2002-09-04 Thread Alex Judd

First things first, I've retyped that SMPP error code document and made it
available on our very minimalist website (http://www.skywire.co.uk) - it's a
great thing to have at your fingertips.

(slightly off topic) Let me look back at the list and find the changes that
were submitted for One2One/T-Motion. I'd obviously appreciate a diff.
against CVS ( :-) ) but if you're time is short don't worry. FYI O2
Interactive (not the SMSC part of O2 but their Internet division) have
created a propriatary XML interface that is similar to the One2One/T-Motion
one and we have to implement that for a client.

I'm pretty sure I can post this one back when we've done it :-)

Alex


- Original Message -
From: "Oded Arbel" <[EMAIL PROTECTED]>
To: "Alex Judd" <[EMAIL PROTECTED]>; "Dima Milentiev" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 03, 2002 8:03 PM
Subject: RE: [RFC] New temporary nack for Kannel SMPP module


>
> Oh, but we did :-) it was posted on the Kannel-devel list a couple of
weeks ago. unfortunatly, it requires some major modifications to Kannel
infrastructure, and since it never got good testing, it didn't make it into
the CVS.
> There was a good suggestion by Nisan Bloch on how to improve it, and when
we'll have the time we'll implement it and try again, but it the mean time -
if you want, I can generate it again against latest CVS and resubmit.
>
> --
> Oded Arbel
> m-Wise mobile solutions
> [EMAIL PROTECTED]
>
> +972-9-9581711 (116)
> +972-67-340014
>
> ::..
> To learn is to remember things that you know,
> to do is to demonstrate that you know them,
> to teach is to remind other people that they also know them.
> We are all learners, doers and teachers.
> -- Richard Bach
>
>
>
>
> > -Original Message-
> > From: Alex Judd [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, September 03, 2002 7:07 PM
> > To: Dima Milentiev
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [RFC] New temporary nack for Kannel SMPP module
> >
> >
> > Hi Dima
> >
> > I have the document pinned to my wall infront of me all the
> > time as it's the
> > best summary of error codes I've found, however it no longer
> > looks like they
> > have it available on their site so I'll put it into a quick
> > word document.
> > Shouldn't take more than 5 minutes.
> >
> > As a trade, are you planning on releasing back your XML driver for
> > connecting to One2One/TMobile in the UK??
> >
> > :-) Regards
> >
> > Alex
> >
> >
> > - Original Message -
> > From: "Dima Milentiev" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 03, 2002 5:29 PM
> > Subject: RE: [RFC] New temporary nack for Kannel SMPP module
> >
> >
> > > Hi Alex,
> > >
> > > i've found that you once wrote: "There is a really good
> > error message
> > summary in a document I got from the
> > > Geeks Co site for their smartSMPP product which has them
> > all summarised in
> > > Appendix B. I can probably dig it up if you can't find it."
> > > Could you please try to find and send it? It will be very
> > helpful for all
> > working with SMPP.
> > >
> > > thanks for advanse,
> > >
> > >
> > > Dima Milentiev
> > > m-Wise Mobile Solutions
> > >
> > > [EMAIL PROTECTED]
> > > Mobile: +972 (55) 679229
> > > Tel:+972 (9)  9581711 (ext: 116 or 120)
> > >
> > >
> > >
> > > -Original Message-
> > > From: Mauricio Ramos [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, September 03, 2002 5:23 PM
> > > To: Dima Milentiev; Oded Arbel
> > > Cc: [EMAIL PROTECTED]
> > > Subject: RE: [RFC] New temporary nack for Kannel SMPP module
> > >
> > >
> > > I did a full inspection in every 0x0045 error I've
> > received and I
> > guess
> > > you are right.  It seems to be related to invalid prefixes
> > (although they
> > > are well-formed phonenumbers) which were rejected by SMSC.
> > So, I do not
> > > suggest anybody to consider 0x0045 as a temporary
> > error, for now.  For
> > > malformed phonenumbers I receive error 0x000b.
> > >
> > >
> > > > -Original Message-
> > > > From: Dima Milentiev [mailto:[EMAIL PROTECTED]]
> > > > Sent: terça-feira, 3 

Re: [RFC] New temporary nack for Kannel SMPP module

2002-09-03 Thread Alex Judd

Hi Dima

I have the document pinned to my wall infront of me all the time as it's the
best summary of error codes I've found, however it no longer looks like they
have it available on their site so I'll put it into a quick word document.
Shouldn't take more than 5 minutes.

As a trade, are you planning on releasing back your XML driver for
connecting to One2One/TMobile in the UK??

:-) Regards

Alex


- Original Message -
From: "Dima Milentiev" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, September 03, 2002 5:29 PM
Subject: RE: [RFC] New temporary nack for Kannel SMPP module


> Hi Alex,
>
> i've found that you once wrote: "There is a really good error message
summary in a document I got from the
> Geeks Co site for their smartSMPP product which has them all summarised in
> Appendix B. I can probably dig it up if you can't find it."
> Could you please try to find and send it? It will be very helpful for all
working with SMPP.
>
> thanks for advanse,
>
>
> Dima Milentiev
> m-Wise Mobile Solutions
>
> [EMAIL PROTECTED]
> Mobile: +972 (55) 679229
> Tel:+972 (9)  9581711 (ext: 116 or 120)
>
>
>
> -Original Message-
> From: Mauricio Ramos [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 03, 2002 5:23 PM
> To: Dima Milentiev; Oded Arbel
> Cc: [EMAIL PROTECTED]
> Subject: RE: [RFC] New temporary nack for Kannel SMPP module
>
>
> I did a full inspection in every 0x0045 error I've received and I
guess
> you are right.  It seems to be related to invalid prefixes (although they
> are well-formed phonenumbers) which were rejected by SMSC.  So, I do not
> suggest anybody to consider 0x0045 as a temporary error, for now.  For
> malformed phonenumbers I receive error 0x000b.
>
>
> > -Original Message-
> > From: Dima Milentiev [mailto:[EMAIL PROTECTED]]
> > Sent: terça-feira, 3 de setembro de 2002 04:09
> > To: Mauricio Ramos; Oded Arbel
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [RFC] New temporary nack for Kannel SMPP module
> >
> >
> > Hi,
> >
> > yes, standarts are following, but i've tested now all our
> > SMPP providers with wrong destination address and only one
> > return 0x0b, others take that without problem either. I have
> > in my notes reference about 0x45 as i described earlier but i
> > don't remember where it was and can't recreate now. I'll add
> > that as TMP error but before that i would like to ask people
> > (SMSC providers) for additional information.
> >
> > And what about some reaction when received 0x0D (bind failed)?
> >
> > May be somebody from developers have had SMPP error codes
> > with detailed description and donate it? I remember somebody
> > from the list said about well described error codes from
> > Greece (???)  provider.
> >
> >
> > sanks a lot,
> >
> > Dima Milentiev
> > m-Wise Mobile Solutions
> >
> > [EMAIL PROTECTED]
> > Mobile: +972 (55) 679229
> > Tel:+972 (9)  9581711 (ext: 116 or 120)
> >
> >
> > -Original Message-
> > From: Mauricio Ramos [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, September 02, 2002 8:38 PM
> > To: Dima Milentiev; Oded Arbel
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [RFC] New temporary nack for Kannel SMPP module
> >
> >
> >
> > Hmmm... standards aren't being followed?  In my tests with
> > Logica's SMSC
> > wrong destination addresses are being notified with error
> > ESME_RINVDSTADR
> > 0x0b.  Probably either you have a different
> > configuration of TON/NPI
> > or SMSC's behaviours are different or I might be precipitated
> > to suggest
> > such thing based on my environment.
> >
> > I'll further try with a CMG's SMSC.
> >
> > Cheers
> >
> > > -Original Message-
> > > From: Dima Milentiev [mailto:[EMAIL PROTECTED]]
> > > Sent: domingo, 1 de setembro de 2002 08:01
> > > To: Mauricio Ramos; Oded Arbel
> > > Cc: [EMAIL PROTECTED]
> > > Subject: RE: [RFC] New temporary nack for Kannel SMPP module
> > >
> > >
> > > Hi Mauricio,
> > >
> > > we have the same error if we're sending malformed message
> > > (with wrong destination address e.g.) And n this case it's
> > > not a temporary error i need resend after  some time. I know
> > > that we sometime have problems to get appropriate information
> > > from provider but the best way properly to configure bind
> > > timeout get this information from him  :-).
> > > May be we need to check enquire_link_resp return code and not
> > > continue to send messages untill it returns ESME_RBINDFAIL
> > error code?
> > >
> > > cheers,
> > >
> > > Dima Milentiev
> > > m-Wise Mobile Solutions
> > >
> > > [EMAIL PROTECTED]
> > > Mobile: +972 (55) 679229
> > > Tel:+972 (9)  9581711 (ext: 116 or 120)
> > >
> > >
> > >
> > > -Original Message-
> > > From: Mauricio Ramos [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, August 30, 2002 10:28 PM
> > > To: Oded Arbel
> > > Cc: [EMAIL PROTECTED]
> > > Subject: [RFC] New temporary nack for Kannel SMPP module
> > > Importance: High
> > >
> > >
> > > Hi Oded,
> > >
>

Re: cygwin port of Kannel

2002-08-21 Thread Alex Judd

If you are running under Cygwin on Windows you need to specify your serial
ports as /dev/comx

For example in one of our setups we have

group=smsc
smsc=at2
smsc-id=Motorola1
modemtype=motorola_p7389i
device=/dev/com2
retry=true
keepalive=600

I would recommend if you are running on windows, download the latest version
of Cygwin (including checking the install cvs option on setup), GCC, make
and associated tools and then build the cvs version of Kannel. It's by far
the most advanced as concerns AT drivers.

Alex

www.skywire.co.uk





Re: Kannel Solaris 2.6 Installation problem

2002-08-19 Thread Alex Judd

Atef

Are you using gcc rather than cc? I have live Solaris systems using 2.8 and
gcc and they work perfectly.

I've never used the standard Sun cc to compile as it tends to cause
problems.

Regads

Alex

- Original Message -
From: "Atef lotfy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 1:08 PM
Subject: Kannel Solaris 2.6 Installation problem


> Dear Sirs,
> I am a new user for Kannel. I have a problem and I
> want your help. I am working on a Solaris 2.6 OS. I
> have done the following steps:
> - I have downloaded the development version 1.1.6
> - I have downloaded the libxml version 2.4.9
> - I have installed the libxml libraries successfully
> (as far as I see). The libs are now found on
> /usr/local/lib and the include files are in
> /usr/local/include.
> - I have run the configure script of the gateway
> successfully.
> - I tried to do make but I found the following error
> libgw.a(bb_udb.o): In function udp_addwdp:
> bb_udp.o(.text+0xb14):undefined reference to
> '__eprintf'
> bb_udp.o(.text+0xb58):undefined reference to
> '__eprintf'
>
> ld returned 1 exit status
>
>Regards,
>Atef Lotfy
>
> __
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com





Kannel developer wanted

2002-07-31 Thread Alex Judd




Hello list
I know this list is not for recruitment uses but I've been a contributor for 
quite a while here and I know a few others have asked in the past (and the more 
paid developers we get working on the project the better the software gets!). If 
there's anyone on the list who'd like to be based in London and get paid to work 
with Kannel then please contact me at [EMAIL PROTECTED]
Cheers
Alex


Re: kannel 1.2.0 and SMPP v3.3

2002-07-24 Thread Alex Judd

Maybe, however lots of SMSCs use TON/NPIs which have no correlation to the
source number format you are using (BT Cellnet/O2 being one of them). In
this case the TON/NPI is manually overloaded (hence why I added the code to
do that) and the source address can be what ever they tell you it should be.

In normal operation the TOP/NPI are calculated AUTOMATICALLY based on the
source address you set. Therefore unless the automatic code is wrong, or you
aren't manually forcing you're TON/NPIs where you need to, then the Source
Address is wrong.

Alex

- Original Message -
From: "Kaido Karner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 24, 2002 12:57 PM
Subject: RE: kannel 1.2.0 and SMPP v3.3


> > If you haven't fixed this the Invalid source address means you
> > need to make sure your from= parameter is correct. If your source TON
was
> > wrong you would get a 0x0048 or if your source NPI was wrong you
would
> get a
> > 0x0049
>
> it's not so .. TON and NPI can be 'correct' by itself, but contradict the
> number format .. if this is a case You get an error about wrong source
> address ..
>
> k
>





Re: kannel 1.2.0 and SMPP v3.3

2002-07-24 Thread Alex Judd

Arnar

If you haven't fixed this the Invalid source address means you need to make
sure your from= parameter is correct. If your source TON was wrong you would
get a 0x0048 or if your source NPI was wrong you would get a 0x0049

Make sure you get the right +countrycode format of the number or the correct
capitalisation of the alphanumerics if you are using them.

Alex

- Original Message -
From: "Ignat Vassilev" <[EMAIL PROTECTED]>
To: "Arnar Gestsson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, July 19, 2002 3:59 AM
Subject: Re: kannel 1.2.0 and SMPP v3.3


> Hi Arnar
>
> 0x000a EMSE_RINVSRCARD and means Invalid source address
>
> Cheerc
> Ignat
>
>
>
> Arnar Gestsson wrote:
>
> >Does anybody know what
> >
> >"SMSC returned error code 0x000a in response to submit_sm"
> >
> >means, using kannel 1.2.0 and connecting to a SMPP SMSC v3.3 in
> >transmitter mode.
> >
> >BR Arnar
> >
> >
> >
> >
>
>





Re: [bug] : Released too many threads - 1 now 1 originally

2002-06-13 Thread Alex Judd

This is one of my test boxes that I'm running with Cygwin - might well the
not very happy conflict between the two..

- Original Message -
From: "Oded Arbel" <[EMAIL PROTECTED]>
To: "Alex Judd" <[EMAIL PROTECTED]>; "Kannel-devel (E-mail)"
<[EMAIL PROTECTED]>
Sent: Thursday, June 13, 2002 1:28 PM
Subject: RE: [bug] : Released too many threads - 1 now 1 originally


> Haven't seen this in our systems, and I don't even know who generates this
: log_sms() doesn't write this kind of format.






[bug] : Released too many threads - 1 now 1 originally

2002-06-13 Thread Alex Judd

Anyone seen this condition occuring on receiving an inbound SMS message with
AT2? Looks like the first time it happens it originates in the bearerbox and
then follows into the smsbox, and then only the smsbox on the 2nd time.

Kannel appears to survive fine but I'd prefer it didn't happen

Alex

2002-06-13 11:05:28 Receive SMS [SMSC:Wavecom1] [SVC:] [ACT:] [from:+1]
[to:1234] [flags:0:1:0:0:0] [msg:2:73] [udh:0:]
1523547439 [unknown (0x1F0)] bearerbox 1684 pthread_cond::Signal: Released
too many threads - 1 now 1 originally
1523315038 [main] smsbox 1652 pthread_cond::Signal: Released too many
threads - 1 now 1 originally
2002-06-13 10:38:12 [4] INFO: Starting to service <187> from <+2> to
<1234>
1523356635 [unknown (0x5E4)] smsbox 1652 pthread_cond::Signal: Released too
many threads - 1 now 1 originally
2002-06-13 11:38:12 Receive SMS [SMSC:Wavecom1] [SVC:] [ACT:] [from:+2]
[to:1234] [flags:0:1:0:0:0] [msg:3:187] [udh:0:]





Re: AT1

2002-06-12 Thread Alex Judd

Yep - IMO AT2 is now stable enough (in fact significantly more stable than
AT1) to drop AT1.

- Original Message -
From: "Andreas Fink" <[EMAIL PROTECTED]>
To: "Bruno David Rodrigues" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 11:50 AM
Subject: AT1


> >On Wed, 2002-06-12 at 11:21, Stephen Rothwell wrote:
> >>  Guys,
> >>
> >>  I am looking at the code here in smsc_at.c
> >
> >Could we drop AT module on release 1.2 ?
> >
> >Is it there something still lacking in AT2 ?
>
>
> +1 from me.
> Same question applies to EMI version 1.
>
> --
>
> Andreas Fink
> Fink-Consulting
>
> --
> Tel: +41-61-6932730 Fax: +41-61-6932729  Mobile: +41-79-2457333
> Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland
> E-Mail:  [EMAIL PROTECTED]  Homepage: http://www.finkconsulting.com
> --
> Something urgent? Try http://www.smsrelay.com/  Nickname afink





Re: REF:- SMPP

2002-06-11 Thread Alex Judd



The only people that will let you test will expect 
you to become customers (Cellnet etc.) therefore I'd use one of the SMPP 
emulators out there to test against. Have a look at Anam's free one for Win32 at 
http://www.anam.com or there's a few more 
out there free too.
 
Alex

  - Original Message - 
  From: 
  Stephen Rothwell 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, June 11, 2002 12:09 
  PM
  Subject: REF:- SMPP
  
  Hi and sorry to be a pain.
   
  Does anyone know of any UK based SMS provdiers 
  who have SMPP which I can access for free to run some tests. In fact I guess 
  that they dont actually have to be UK based.
   
  Long shot I know.
   
  Steve
   
  Stephen RothwellTechnical 
  ConsultantConsult HyperionTel: +44 1483 301793Fax: +44 1483 
  561657www.consult.hyperion.co.uk
   
   
   
  -where 
  people, networks and money come together...Consult 
  Hyperion-
   
   


Re: Kannel, AT2 and Cygwin : blocking

2002-06-11 Thread Alex Judd

Yep - that's pretty much the same behaviour as I get - thought it might be
Cygwin but maybe it's a Kannel problem.

I'm not 100% convinced that the auto speed detect and port opening code on
Kannel in AT2 is as robust as I'd like it to be as sometimes it fails and
inifite loops things like the below. When this happensI have to kill the
processes, go into Hyperterm (or equivalent), clear the serial ports with a
few 'AT' returns and then restart Kannel. Kannel seems to leave the modem in
some sort of semi-blocked/locked state which means it needs flushing, and
the startup code isn't able to do this itself (even though it has quite a
few 'AT' returns in it to try and achieve this).

Any serial port gurus out there think of what might cause this?

Alex

2002-05-16 16:45:01 [5] WARNING: gwthread_sleep: error in poll
2002-05-16 16:45:01 [5] WARNING: System error 13: Permission denied
2002-05-16 16:45:01 [5] ERROR: AT2[Motorola1]: error on select
2002-05-16 16:45:01 [5] ERROR: System error 13: Permission denied
2002-05-16 16:45:01 [5] WARNING: gwthread_sleep: error in poll
2002-05-16 16:45:01 [5] WARNING: System error 13: Permission denied
2002-05-16 16:45:01 [5] ERROR: AT2[Motorola1]: error on select
2002-05-16 16:45:01 [5] ERROR: System error 13: Permission denied
2002-05-16 16:45:01 [5] WARNING: gwthread_sleep: error in poll
2002-05-16 16:45:01 [5] WARNING: System error 13: Permission denied
2002-05-16 16:45:01 [5] ERROR: AT2[Motorola1]: error on select
2002-05-16 16:45:01 [5] ERROR: System error 13: Permission denied
2002-05-16 16:45:01 [5] WARNING: gwthread_sleep: error in poll
2002-05-16 16:45:01 [5] WARNING: System error 13: Permission denied
2002-05-16 16:45:01 [5] ERROR: AT2[Motorola1]: error on select
2002-05-16 16:45:01 [5] ERROR: System error 13: Permission denied
2002-05-16 16:45:01 [5] WARNING: gwthread_sleep: error in poll
2002-05-16 16:45:01 [5] WARNING: System error 13: Permission denied
2002-05-16 16:45:01 [5] ERROR: AT2[Motorola1]: error on select
2002-05-16 16:45:01 [5] ERROR: System error 13: Permission denied
2002-05-16 16:45:01 [5] WARNING: gwthread_sleep: error in poll
2002-05-16 16:45:01 [5] WARNING: System error 13: Permission denied
2002-05-16 16:45:05 [7] ERROR: Error reading from fd 24:
2002-05-16 16:45:05 [7] ERROR: System error 104: Connection reset by peer
2002-05-16 16:45:05 [7] ERROR: Error reading from fd 24:
2002-05-16 16:45:05 [7] ERROR: System error 104: Connection reset by peer

- Original Message -
From: "Oded Arbel" <[EMAIL PROTECTED]>
To: "Alex Judd" <[EMAIL PROTECTED]>; "Devel (E-mail)"
<[EMAIL PROTECTED]>
Sent: Monday, June 10, 2002 3:17 PM
Subject: RE: Kannel, AT2 and Cygwin : blocking


> Not on cygwin, but sometimes I get a similar (maybe identical) behaviour
on Linux, where I have to manually open each port in minicom, after a
reboot, before kannel is able to talk to it. still haven't figured this one
out.
>
> --
> Oded Arbel
> m-Wise Mobile Solutions
>
> [EMAIL PROTECTED]
> Mobile: +972-67-340014
> Tel: +972-9-9581711 (ext: 116)
>
> ::..
> Famous Last Words 066-"Oops."
>
>
> > -Original Message-
> > From: Alex Judd [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, June 10, 2002 3:36 PM
> > To: Devel (E-mail)
> > Subject: Kannel, AT2 and Cygwin : blocking
> >
> >
> > On my test servers here I have to manually unblock the serial port
> > connection to each of my modems using Hyperterminal or the
> > like each time I
> > reboot my system before Kannel is able to connect to the
> > modems connected to
> > it.
> >
> > I've read on the CygWin list that there is some potentially different
> > behaviour in the way that O_NONBLOCK works for serial devices
> > which could
> > mean that the open fails when it shouldn't do so - has anyone
> > else seen this
> > or worked around it?
> >
> > Cheers
> >
> > Alex
> >
> > --
> > www.skywire.co.uk
> >
> >
> >
> >
> >





Kannel, AT2 and Cygwin : blocking

2002-06-10 Thread Alex Judd

On my test servers here I have to manually unblock the serial port
connection to each of my modems using Hyperterminal or the like each time I
reboot my system before Kannel is able to connect to the modems connected to
it.

I've read on the CygWin list that there is some potentially different
behaviour in the way that O_NONBLOCK works for serial devices which could
mean that the open fails when it shouldn't do so - has anyone else seen this
or worked around it?

Cheers

Alex

--
www.skywire.co.uk







Kannel log rotation

2002-06-06 Thread Alex Judd

Has anyone looked into making the logging in Kannel (at file level at least)
a little more intelligent than it is at the moment? Currently even in info
mode it generates fairly large logs which require continued sorting.

One suggestion I thought was to adopt the Apache Jakarta project format of
rolling the logs over every 24 hours into a new dated version so that at
least this way they are in more maneageable chunks.

I'm yet to play with the mySQL installation of logging however to the best
of my knowledge this doesn't do this either.

Alex

---
http://www.skywire.co.uk/





RE: Patch submission and release policy (Was: [PATCH] problems withHTTPS and base support for per message billing)

2002-05-29 Thread Alex Judd

If we are to continue to use CVS as a bug fixing and feature adding 
mechanism then we have to do this branching.

Not doing so is going to mean that none of the 'live need to fix it now' 
problems get fixed (or submitted back) as nobody can properly diff against 
the bits they've fixed.

Alex

On Wed, 29 May 2002, Angel Fradejas wrote:

> >If we start doing
> >architectural changes on the CVS, while everyone is using it to build
> >their production, we will break things for people who don't/can't know
> >how to handle it.
> 
> >So a branch is a must before doing any major surgery on the code.
> 
> Totally agree.
> 
> [ Even if I am a "CVS bad guy(tm)" ]
> 
> 
> Angel Fradejas
> Mediafusión España, S.A.
> [EMAIL PROTECTED]
> www.mediafusion.es
> Tel. +34 91 252 32 00
> Fax +34 91 572 27 08
> 
> 

-- 
Alex Judd
http://www.skywire.co.uk





[PATCH] smsc_smpp.c UTC time in 1/2 hours

2002-05-24 Thread Alex Judd

Hopefully the last time I have to correct/patch this bit of code for a 
while..

Alex



-- 
Alex Judd
http://www.skywire.co.uk


Index: gw/smsc_smpp.c
===
RCS file: /home/cvs/gateway/gw/smsc_smpp.c,v
retrieving revision 1.65
diff -u -r1.65 smsc_smpp.c
--- gw/smsc_smpp.c  22 May 2002 12:08:10 -  1.65
+++ gw/smsc_smpp.c  24 May 2002 15:59:00 -
@@ -326,20 +326,19 @@
 /* work out 1/4 hour difference between local time and UTC/GMT */
 gmtime = gw_gmtime(time(NULL));
 localtime = gw_localtime(time(NULL));
-if (localtime.tm_hour >= gmtime.tm_hour) {
+gwqdiff = ((localtime.tm_hour - gmtime.tm_hour) * 4)
+  + ((localtime.tm_min - gmtime.tm_min) / 15);
+if (gwqdiff >= 0)
 relation_UTC_time = octstr_create("+");
-gwqdiff = (localtime.tm_hour - gmtime.tm_hour) * 4;
-} else {
+else
 relation_UTC_time = octstr_create("-");
-gwqdiff = (gmtime.tm_hour - localtime.tm_hour) * 4;
-}
 
 if (msg->sms.validity) {
 tm = gw_localtime(time(NULL) + msg->sms.validity * 60);
 sprintf(buffer, "%02d%02d%02d%02d%02d%02d0%01d%02d%1s",
 tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
 tm.tm_hour, tm.tm_min, tm.tm_sec,
-0, gwqdiff, relation_UTC_time );
+0, gwqdiff, octstr_get_cstr(relation_UTC_time) );
 pdu->u.submit_sm.validity_period = octstr_create(buffer);
 }
 
@@ -348,7 +347,7 @@
 sprintf(buffer, "%02d%02d%02d%02d%02d%02d0%01d%02d%1s",
 tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
 tm.tm_hour, tm.tm_min, tm.tm_sec,
-0, gwqdiff, relation_UTC_time );
+0, gwqdiff, octstr_get_cstr(relation_UTC_time) );
 pdu->u.submit_sm.schedule_delivery_time = octstr_create(buffer);
 }
 }



Re: recent SMPP patches.

2002-05-22 Thread Alex Judd

Modify the central part of msg_to_pdu to the following

/* work out 1/4 hour difference between local time and UTC/GMT */
gmtime = gw_gmtime(time(NULL));
localtime = gw_localtime(time(NULL));
gwqdiff = ((localtime.tm_hour - gmtime.tm_hour) * 4)
  + ((localtime.tm_min - gmtime.tm_min) / 15);
if (gwqdiff >= 0)
relation_UTC_time = octstr_create("+");
else
relation_UTC_time = octstr_create("-");

Alex


On Wed, 22 May 2002, Alex Judd wrote:

> > * in computing relation_UTC_time, the logic assumes that all time zones
> > have differences of 1 hour to one another, which is not correct - there
> > are some timezones that have a difference of half an hour.

-- 
Alex Judd
http://www.skywire.co.uk





Re: recent SMPP patches.

2002-05-22 Thread Alex Judd

Part of the fun of being in Europe is that we believe everyone else is 
like we are. Thanks for fixing that.

Alex

On Wed, 22 May 2002, Oded Arbel wrote:
> * in computing relation_UTC_time, the logic assumes that all time zones
> have differences of 1 hour to one another, which is not correct - there
> are some timezones that have a difference of half an hour.

---
Alex Judd
http://www.skywire.co.uk





[PATCH] SMPP deferred and validity period

2002-05-21 Thread Alex Judd

While we're there adding quick patches to SMPP here's one to add defered 
and validity support to SMPP. I've done limited testing with it so would 
appreciate any of the other SMPP users giving it a once over.

SMPP v3.4 specifies tenths of second which I just set to 0 as defacto and 
we calculate 1/4 hour time relative to UTC/GMT according to the SMPP Time 
Format documentation (section 7.5)

Alex

-- 
Alex Judd
http://www.skywire.co.uk


Index: gw/smsc_smpp.c
===
RCS file: /home/cvs/gateway/gw/smsc_smpp.c,v
retrieving revision 1.58
diff -u -r1.58 smsc_smpp.c
--- gw/smsc_smpp.c  20 May 2002 14:14:13 -  1.58
+++ gw/smsc_smpp.c  21 May 2002 15:34:35 -
@@ -222,6 +222,11 @@
 static SMPP_PDU *msg_to_pdu(SMPP *smpp, Msg *msg) 
 { 
 SMPP_PDU *pdu; 
+char buffer[16];
+Octstr *relation_UTC_time;
+struct tm gmtime, localtime, tm;
+int gwqdiff;
+
 pdu = smpp_pdu_create(submit_sm,  
  counter_increase(smpp->message_id_counter)); 

@@ -290,9 +295,41 @@
 if (pdu->u.submit_sm.data_coding == 0 ) /* no reencoding for unicode! */ 
 charset_latin1_to_gsm(pdu->u.submit_sm.short_message);  
 } 
+
+/* work out 1/4 hour difference between local time and UTC/GMT */
+gmtime = gw_gmtime(time(NULL));
+localtime = gw_localtime(time(NULL));
+if (localtime.tm_hour >= gmtime.tm_hour) {
+relation_UTC_time = octstr_create("+");
+gwqdiff = (localtime.tm_hour - gmtime.tm_hour) * 4;
+} else {
+relation_UTC_time = octstr_create("-");
+gwqdiff = (gmtime.tm_hour - localtime.tm_hour) * 4;
+}
+
+if (msg->sms.validity) {
+tm = gw_localtime(time(NULL) + msg->sms.validity * 60);
+sprintf(buffer, "%02d%02d%02d%02d%02d%02d0%01d%02d%1s",
+   tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
+   tm.tm_hour, tm.tm_min, tm.tm_sec,
+   0, gwqdiff, relation_UTC_time );
+pdu->u.submit_sm.validity_period = octstr_create(buffer);
+}
+
+if (msg->sms.deferred) {
+tm = gw_localtime(time(NULL) + msg->sms.deferred * 60);
+sprintf(buffer, "%02d%02d%02d%02d%02d%02d0%01d%02d%1s",
+   tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
+   tm.tm_hour, tm.tm_min, tm.tm_sec,
+   0, gwqdiff, relation_UTC_time );
+pdu->u.submit_sm.schedule_delivery_time = octstr_create(buffer);
+}
+
 /* ask for the delivery reports if needed */ 
 if (msg->sms.dlr_mask & (DLR_SUCCESS|DLR_FAIL)) 
 pdu->u.submit_sm.registered_delivery = 1;  
+
+octstr_destroy(relation_UTC_time);
  
 return pdu; 
 } 



Re: Patch submission and release policy (Was: [PATCH] problems withHTTPS and base support for per message billing)

2002-05-20 Thread Alex Judd

I agree with Oded that currently at the moment people are using the CVS 
'live' tree as a release ready version and expecting it to work 100% - a 
situation that has occured due to the delay of good new releases since the 
demise of WapIT.

We should direct most 'newer user/developers' of the system to the stable 
release source to work with and then use a more live cvs tree for the 
majority of this group that are making daily/weekly changes to their 
systems.

This way we can put more left-field or experimental changes into the 
system and survive any potential knock-on affect they may have.

I know myself I run my own cvs repositry of kannel with 'production' and 
'development' versions of the system in there for exactly this reason.

Alex

On Sun, 19 May 2002, Oded Arbel wrote:

> Agreed. I was hoping that at least the billing issue (I remember it
> being talked about in the list a while back) would interest people.
> I do think, though, that fixes to problems not yet detected "in the
> wild" should go in anyway : that's why it's called a "development tree",
> if the solution does not break anything - of course.
> IMHO, the current situation where the CVS build must never be broken
> because it is the "production version" and so patches require careful
> scrutiny before going in is not healthy. CVS _is_ the place to test
> fixes and new features - when you require that people will download and
> apply your patches one by one, the number of testers will shrink to the
> number of people interested in the specfic patch - which in a
> not-so-high visibility project like Kannel could easily get down to 1~2
> people - or even less. case in point is the +CMTI patch by Alex Judd -
> it seems like a perfectly valid feature, but only 2 or 3 people on this
> list are at the same time interested and skilled to test it - under a
> circumstences where some of them cannot find the time to do so, this
> perfectly good feature would simply be abandoned.
> 
> I suggest we should roll out a "release" ASAP, using the following
> schedule : 
> - branch the tree now (yesterday would have been a good time too ;-) and
> label it 1.2.0.
> - bug fixes may be submitted to either of the trees, and then ported to
> the other.
> - new features may be submitted only to the HEAD tree.
> - features and bug fixes will be submitted freely to the HEAD tree with
> minimum checks for style and obvious coding errors.
> - the HEAD tree will be considered unstable and fit only for development
> work.
> 
> Using this method we would not further degrade the current situation
> (where people who have problems are told to upgrade their production
> servers to the CVS version - as it is more stable), while stabilizing
> the development effort for a full fledged "stable" release w/o hampering
> further feature development.
> 
> Opinions please ?
> 
> --
> Oded Arbel
> m-Wise Inc.
> [EMAIL PROTECTED]
> (972)-67-340014
> (972)-9-9581711 (ext: 116)
> 
> ::..
> Abandon the search for Truth; settle for a good fantasy.
> 
> 
> > -Original Message-
> > From: Stipe Tolj [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 16, 2002 5:29 PM
> > Cc: Kannel-devel (E-mail)
> > Subject: Re: [PATCH] problems with HTTPS and base support for 
> > per message billing.
> > 
> > 
> > > Both patches are deployed and "works for me", and while I understand
> > > that those are not high priority  problems for most users, I will be
> > > grateful if the patches are incorporated into the CVS (will 
> > save me work
> > > when I update from CVS ;-)
> > 
> > we have to garantee that no "it cool and needed for me" issues go to
> > easy to the cvs tree. As long as things can be configured to serve the
> > needs of several user parties that's better then having properietary
> > solution fixing IMO.
> > 
> > Stipe
> > 
> > [EMAIL PROTECTED]
> > ---
> > Wapme Systems AG
> > 
> > Münsterstr. 248
> > 40470 Düsseldorf
> > 
> > Tel: +49-211-74845-0
> > Fax: +49-211-74845-299
> > 
> > E-Mail: [EMAIL PROTECTED]
> > Internet: http://www.wapme-systems.de
> > ---
> > wapme.net - wherever you are
> > 
> > 
> 

-- 
Alex Judd
http://www.skywire.co.uk





Re: Respond Msg to Deliver Message

2002-05-20 Thread Alex Judd

The deliver_sm is meant to make the ESME (in this case Kannel) respond 
with a deliver_sm_resp PDU in order to confirm receipt of the deliver_sm 
message. This message is only meant to go from the ESME (Kannel) to the 
SMSC (your provider) as not a message to the phone subscriber that 
submitted the message.

Messages to the subscriber that submitted the message are sent with 
submit_sm which are ESME (Kannel) to SMSC messages. In this case the SMSC responds 
with a submit_sm_resp PDU to 
tell you that it has received the message.

Feel free to contact me if you need to make more sense of that!

Alex

On Mon, 20 May 2002, Le Nhu Hai wrote:

> Hi all,
> 
> I try to use Kannel 1.1.6 to connect to SMSC via SMPP with a service
> number assigned to GW. When a subscriber send any SM to service number,
> the msg will deliver to GW. 
> In the source, file smsc_smpp.c, function: handle_pdu():
> 
> case deliver_sm
> (void) bb_smscconn_receive(smpp->conn, pdu_to_msg(pdu));
> resp = smpp_pdu_create(deliver_sm_resp,
> pdu->u.deliver_sm.sequence_number);
> break;
> 
> Thatn means, GW only respond to SMSC a deliver_sm_resp message. 
> 
> In fact, the sender who send a SM to service number (GW) would receive
> a msg with content: "No service specified" 
> 
> 
> Who know why ?
> 
> 
> Does Kannel 1.1.6 support flash message?
> 
> Thank for any reply!
> 
> 
> 
> 
> 
> __
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
> 

-- 
Alex Judd
http://www.skywire.co.uk





SMS to WAP functionality

2002-05-16 Thread Alex Judd

Apoligies - not directly a development question but the forum here is the 
most knowledgable I know so I thought I might ask a quick usage question. 
In order to embed a WAP URL in an SMS does anyone know if standard WAP 
enabled phones allow a 'click-to-wap' type functionality or does it have 
to be sent as an OTA or WAP Push message?

Thanks everyone

Alex

-- 
Alex Judd
http://www.skywire.co.uk





SMPP DLR Reports

2002-05-15 Thread Alex Judd

I'm doing some fairly heavy work on the smsc_smpp.c driver at the moment 
to ramp it up a bit and I've got a couple of questions re: the esm_class 
values that the code currently thinks are DLR reports.

The current code checks for 0x02 and 0x04 as DLR reports, however the 3_4 
SMPP standard says that bits 1-0 are ignored, and that valid DLR values 
are 0x04 for for receipts and 0x08 and 0x10 for acknowledgments.

Anyone know why we check for 0x02?

Alex

-- 
Alex Judd
http://www.skywire.co.uk





Re: WEBSMS service

2002-05-13 Thread Alex Judd

Cipher - you'll need to do some bespoke programming to do this (hide the 
information from users, validate who they are etc.) which is how a number 
of this people on the list run their businesses etc. I'm sure one of 
us/them would take it on as a project for you :)

Alex

On Fri, 10 May 2002, Cipher Strength wrote:

> 
> 
> Hi All,
> 
> I want to make a service WebSMS in which user can send message to mobile 
> from my web site. I want that nobody can see html and info about kannel for 
> security reasons. I want an ASP soloution as using IIS.
> 
> Ideas are greatly apreciated
> 
> Regards
> 
> CIPHER
> 
> 
> _
> Join the world’s largest e-mail service with MSN Hotmail. 
> http://www.hotmail.com
> 
> 

-- 
Alex Judd
http://www.skywire.co.uk





Re: smsc_smpp.c - reconnection/enquiry timings

2002-05-13 Thread Alex Judd

These values are currently hardwire in and it would be easy to export them 
out to the configuration level if need be. Reasonable idea in my opinion 
as I'm never a fan of hard wire values.

I would suggest we do a 'if defined in config file use that value else use 
a default value of x' so that only the users that need this ability have 
to define it.

Alex

On Fri, 10 May 2002, Aarno Syvänen wrote:

> Can you use configuration variables instead ?
> 
> Aarno
> - Original Message - 
> From: "Alan McNatty" <[EMAIL PROTECTED]>
> To: "Kannel Dev" <[EMAIL PROTECTED]>
> Sent: Monday, May 13, 2002 7:58 AM
> Subject: smsc_smpp.c - reconnection/enquiry timings
> 
> 
> > Hello,
> > 
> > Our local friendly telco who alow us to smpp to their smsc are
> > interested in being able to control the kannel <-> smsc
> > reconnection/enquiry timings (mainly in testing environment which can be
> > up and down).
> > 
> > Consequently I would like to be able to specify the SMPP_ constants
> > (below) via the smpp config options (default as below obviously). Does
> > this sound like a resonable thing to do? If so I'm happy to work towards
> > supplying a patch (post to list or to xyz?). 
> > 
> > 
> > 
> > #define SMPP_ENQUIRE_LINK_INTERVAL  30.0
> > #define SMPP_MAX_PENDING_SUBMITS10
> > #define SMPP_RECONNECT_DELAY10.0
> > 
> > Cheers,
> > Alan
> > 
> > -- 
> > Alan McNatty -- Catalyst IT Ltd -- http://www.catalyst.net.nz
> >   Level 2, 150-154 Willis St, PO Box 11-053, Wellington, NZ
> > Mob: +64 21-312136, DDI: +64 4 9167203, Office: +64 4 4992267
> > 
> > ... error accessing whit
> > Segmentation fault (core dumped) 
> > 
> > 
> 
> 

-- 
Alex Judd
http://www.skywire.co.uk





Anyone tried out the +CMTI code for AT2 yet?

2002-05-10 Thread Alex Judd

Be interested on feedback and getting it into CVS.

Alex

-- 
Alex Judd
http://www.skywire.co.uk





Re: wait_for_connections fails and kills smsbox

2002-05-03 Thread Alex Judd

Thanks Bruno - good to see your full name is now on your emails :)

> set "retry = true" on at2 smsc group (and I'd advise you to use it in 
> every smsc group) to force kannel to reopen at2 connection.
> 
> If you want to "ping" the modem and keep the connection alive, 
> set "keepalive = 60" (seconds) too and if you have motorola manual
> (or try yourself and tell us if it works), set 
> keepalive-cmd = "AT+CBC;+CSQ"
> on modems.conf, near your groups=modems, id=motorola (uhm, I don't see
> any motorola, which at group are you using)

See my patch earlier (+CMTI support) which includes the new group for the 
Motorola P7389i and support for it to be added to CVS (unless someone has 
done already???).

I guess here we could use something really simple like an ATI4 or similar 
as a 'do something' comand however your battery level one is quite nice.

Alex

-- 
Alex Judd
http://www.skywire.co.uk





wait_for_connections fails and kills smsbox

2002-05-01 Thread Alex Judd

Interesting problem using latest cvs (with CMTI patch) is that 
occassionally the wait_for_connections process fails and takes the smsbox 
with it.

Looks like the process fails to read from the serial port (either due to 
the phone or some other random process on my machine) and this takes the 
smsbox down (which I don't think it should do). Anyone fixed this?

Alex

2002-05-01 09:53:05 [5] DEBUG: AT2[Motorola1]: <-- OK
2002-05-01 13:50:17 [4] ERROR: wait_for_connections failed
2002-05-01 13:50:17 [5] ERROR: AT2[Motorola1]: error on select
2002-05-01 13:50:17 [5] ERROR: System error 13: Permission denied
2002-05-01 13:50:17 [4] ERROR: System error 13: Permission denied
2002-05-01 13:50:17 [5] WARNING: gwthread_sleep: error in poll
...
2002-05-01 13:50:18 [5] WARNING: gwthread_sleep: error in poll
2002-05-01 13:50:18 [5] WARNING: System error 13: Permission denied
2002-05-01 13:50:18 [5] ERROR: AT2[Motorola1]: error on select
2002-05-01 13:50:18 [5] ERROR: System error 13: Permission denied
2002-05-01 13:50:22 [0] ERROR: Error reading from fd 18:
2002-05-01 13:50:22 [0] ERROR: System error 104: Connection reset by peer
2002-05-01 13:50:22 [0] ERROR: Error reading from fd 18:
2002-05-01 13:50:22 [0] ERROR: System error 104: Connection reset by peer
2002-05-01 13:50:22 [0] INFO: Error reading from bearerbox, disconnecting
2002-05-01 13:50:22 [0] INFO: Received (and handled?) 2 requests in 72512 seconds 
(0.00 per second)
2002-05-01 13:50:22 [0] INFO: Kannel smsbox terminating.
2002-05-01 13:50:22 [6] DEBUG: Thread 6 (gw/heartbeat.c:heartbeat_thread) terminates.
2002-05-01 13:50:23 [0] DEBUG: Waiting for 2 (gwlib/http.c:server_thread) to terminate
2002-05-01 13:50:23 [2] WARNING: gwthread_sleep: error in poll
2002-05-01 13:50:23 [2] WARNING: System error 13: Permission denied
-- 
Alex Judd
http://www.skywire.co.uk





Re: CMTI support in AT2

2002-04-30 Thread Alex Judd

Yes should do that too quite happily. I'm using to coax a limited capacity 
device into working however it will work quite normally with any CMTI 
message received.

Cheers. Alex

On Tue, 30 Apr 2002, Andrea Viscovich wrote:

> >
> > Patch attached to add CMTI support to the AT2 driver. You'll need to add a
> > new definition to your configuration file specifying that the init string
> > for the phones you want to use this is AT+CNMI=1,1,0,0,0 rather than
> > 1,2,0,0,0 and then define your smsc.
> 
> I don't understand. I think it can be used even with  AT+CNMI=1,2,0,0,0
> In this case only few sms will go throught sim, that's why we
> need to check the +CMTI
> Otherwise with AT+CNMI=1,1,0,0,0 every sms will go throught sim.
> By the way thanks :-)
> Andrea
> 

-- 
Alex Judd
http://www.skywire.co.uk





Re: [PATCH] SMPP null terminated input

2002-04-30 Thread Alex Judd

Yep - I'm interested. Have a version here with delayed/valid times and 
also with correct esm_class parameters that I plan to submit in once it's 
survived a bit more bulk testing.

Might be good to wrap all the features together at the same time - anyone 
else want to add more smpp modifications in a general upgrade of the 
driver?

Alex

On Sat, 27 Apr 2002, Nisan Bloch wrote:

> Hi
> At 06:26 PM 4/26/02 +0200, Stipe Tolj wrote:
> > > Null terminated messages received by kannel keep hold of the null and turn
> > > it into an '@'. This is best demonstrated if you do a get-url with an input
> > > null terminated message.
> >
> >anyone from the core developers voting for this patch to commit?
> 
> 
> +1
> 
> I have a version of smsc_smpp with a number of patches rolled in, both from 
> the list and my own.
> This version is running in production. Thse include:
> 
> 1. transceiver
> 2. Proper handling of ESME_RMSGQFUL, ESME_RTHROTTLED
> 3. unbind handling
> 4. throughput throttling
> 5. small patch to dlr reports
> 
> anyone interested?
> 
> Nisan
> 
> >Stipe
> >
> >[EMAIL PROTECTED]
> >---
> >Wapme Systems AG
> >
> >Münsterstr. 248
> >40470 Düsseldorf
> >
> >Tel: +49-211-74845-0
> >Fax: +49-211-74845-299
> >
> >E-Mail: [EMAIL PROTECTED]
> >Internet: http://www.wapme-systems.de
> >---
> >wapme.net - wherever you are
> 
> 

-- 
Alex Judd
http://www.skywire.co.uk





CMTI support in AT2

2002-04-30 Thread Alex Judd

Andrea/Oded/All

Patch attached to add CMTI support to the AT2 driver. You'll need to add a 
new definition to your configuration file specifying that the init string 
for the phones you want to use this is AT+CNMI=1,1,0,0,0 rather than 
1,2,0,0,0 and then define your smsc.

Here's the excerpts from my config file

group=smsc
smsc=at2
smsc-id=Motorola1
modemtype=motorola_p7389i
device=/dev/com1

...

group = modems
id = motorola_p7389i
name = "Motorola P7389i"
detect-string = "960"
speed = 57600
init-string = "AT+CNMI=1,1,0,0,0"
need-sleep = true

I'm running this here (ran out of Wavecom's!) and it is fine however I 
would appreciate people testing it and giving me feedback.

Cheers

Alex

-- 
Alex Judd
http://www.skywire.co.uk


Index: smsc_at2.c
===
RCS file: /home/cvs/gateway/gw/smsc_at2.c,v
retrieving revision 1.35
diff -u -r1.35 smsc_at2.c
--- smsc_at2.c  17 Mar 2002 16:03:37 -  1.35
+++ smsc_at2.c  30 Apr 2002 14:49:24 -
@@ -257,6 +257,7 @@
 int count;
 fd_set read_fd;
 struct timeval tv;
+int wait = 30;
  
 if(privdata->fd == -1)
 {
@@ -279,6 +280,7 @@
 if (ret == -1) {
if (! (errno == EINTR || errno == EAGAIN))
error(errno, "AT2[%s]: error on select",octstr_get_cstr(privdata->name));
+gwthread_sleep(wait);
return;
 }
 
@@ -654,6 +656,7 @@
 time_t cur_time;
 Msg*msg;
 int len;
+char *buf, *buf2 = NULL;
  
 time(&end_time);
 if(timeout == 0)
@@ -743,6 +746,48 @@
 }
continue;
   }
+   if (-1 != octstr_search(line, octstr_imm("+CMTI:"), 0))
+  {
+buf = gw_malloc(5);
+buf2 = gw_malloc(20);
+
+octstr_get_many_chars(buf, line, octstr_len(line) - 3, 3); /* work 
+out which message to read */
+buf[3] = '\0';
+sprintf(buf2, "%s%s", "AT+CMGR=", buf);
+at2_write_line(privdata, buf2);/* display 
+message contents */
+line = at2_wait_line(privdata,1,0);/* read 
+header */
+line2 = at2_wait_line(privdata,1,0);   /* read 
+PDU */
+
+if(line2 == NULL)
+{
+error(0,"AT2[%s]: got +CMTI but waiting for next line timed out", 
+octstr_get_cstr(privdata->name));
+}
+else
+{ 
+octstr_append_cstr(line,"\n");
+octstr_append(line,line2);
+at2_pdu_extract(privdata, &pdu, line);
+
+if(pdu == NULL)
+{
+error(0,"AT2[%s]: got +CMTI but pdu_extract failed", 
+octstr_get_cstr(privdata->name));
+}
+else
+{
+msg = at2_pdu_decode(pdu, privdata);
+if(msg != NULL)
+{
+   msg->sms.smsc_id = octstr_duplicate(privdata->conn->id);
+   bb_smscconn_receive(privdata->conn, msg);
+}
+sprintf(buf2, "%s%s", "AT+CMGD=", buf); /* delete 
+SMS */
+at2_write_line(privdata, buf2);
+line = at2_wait_line(privdata,1,0); /* read 
+response */
+} 
+   }
+   gw_free(buf);
+   gw_free(buf2);
+   }
  
if (-1 != octstr_search(line, octstr_imm("ERROR"), 0))
{
@@ -1130,30 +1175,31 @@
 Octstr *buffer;
 long len = 0;
 int pos = 0;
-int tmp;
+int tmp = 0;
 
 buffer = octstr_duplicate(line);
-/* find the beginning of a message from the modem*/ 
-pos = octstr_search(buffer, octstr_imm("+CMT:"), 0);
-if(pos == -1) 
-   goto nomsg;
-pos += 5;
-
-tmp = octstr_search(buffer, octstr_imm(","), pos);
-if(! privdata->modem->broken && tmp == -1)
-   goto nomsg;
-if(tmp != -1)
-   pos=tmp + 1;
-
-/* The message length is after the comma */
-pos = octstr_parse_long(&len, buffer, pos, 10);
-if(pos == -1)
-   goto nomsg;
+
+if(octstr_search(buffer, octstr_imm("+CMT:"),0) || octstr_search(buffer, 
+octstr_imm("+CMGR:"),0))
+{
+/* find the length of the message */
+while (tmp > -1) {
+pos = tmp;
+tmp =  octstr_search(buffer, octstr_imm(","), pos + 1);
+  

Re: [FYI] Post-XML

2002-04-30 Thread Alex Judd

Apoligies - that's not the final patch :) I'll do a cvs diff -u later this 
week once I'm happy with it's stability and then we can get the group vote 
on it then. There are other files and functions that have slight 
modifications too.

Alex

-- 
Alex Judd
http://www.skywire.co.uk





Re: [FYI] Post-XML

2002-04-30 Thread Alex Judd

Works fine for me here and is definitely needed for phones that don't 
support CMT:. The main bit of code (for those interested is below). Works 
out which slot to read, requests the message, decodes it, then deletes it.

   if (-1 != octstr_search(line, octstr_imm("+CMTI:"), 0))
   {
buf = gw_malloc(5);
buf2 = gw_malloc(20);

octstr_get_many_chars(buf, line, octstr_len(line) - 3, 3); /* work out which 
message to read */
buf[3] = '\0';
sprintf(buf2, "%s%s", "AT+CMGR=", buf);
at2_write_line(privdata, buf2);/* display message 
contents */
line = at2_wait_line(privdata,1,0);/* read header */
line2 = at2_wait_line(privdata,1,0);   /* read PDU */

if(line2 == NULL)
{
error(0,"AT2[%s]: got +CMTI but waiting for next line timed out", 
octstr_get_cstr(privdata->name));
}
else
{
octstr_append_cstr(line,"\n");
octstr_append(line,line2);
at2_pdu_extract(privdata, &pdu, line);

if(pdu == NULL)
{
error(0,"AT2[%s]: got +CMTI but pdu_extract failed", 
octstr_get_cstr(privdata->name));
}
else
{
msg = at2_pdu_decode(pdu, privdata);
if(msg != NULL)
{
   msg->sms.smsc_id = octstr_duplicate(privdata->conn->id);
   bb_smscconn_receive(privdata->conn, msg);
}
sprintf(buf2, "%s%s", "AT+CMGD=", buf); /* delete SMS */
at2_write_line(privdata, buf2);
line = at2_wait_line(privdata,1,0); /* read response */
}
   }
   }

Alex

On Tue, 30 Apr 2002, Andrea Viscovich wrote:

> 
> >1. Addition of CMTI: reading of SIM stored messages from AT devices in 
> >AT2. Needed to add support for the Motorola P7389i. Had to modify the 
> >at2_pdu_extract to cope with the two.
> 
> Hi Alex,
> This has really to be done. I already did it for myself,
> but didn't send any patch as Oded said there could be no +CMTI: if
> ta-te link is reserved. 
> The other thing to do is dlr for at2 :-)
> Cheers
> Andrea
> 
> 

-- 
Alex Judd
http://www.skywire.co.uk





Re: [FYI] Post-XML

2002-04-30 Thread Alex Judd

I have to say Bruno the new documentation is great - the XML POST, AT2 
section, OTA and PUSH are subjects that need to be covered. Good stuff.

For everyone's interest I currently have two development changes in test 
that I'll submit once I've fully tested them.

1. Addition of CMTI: reading of SIM stored messages from AT devices in 
AT2. Needed to add support for the Motorola P7389i. Had to modify the 
at2_pdu_extract to cope with the two.

2. SMPP validity, deferred and couple of other tidy ups.

Alex

On 30 Apr 2002, Bruno David Simões Rodrigues wrote:

> 
> As I don't yet have simple functions to parse xml, I've finished 
> (almost) the xml post code.
> 
> There's some differences for latest
> http://www.ietf.org/internet-drafts/draft-koponen-sms-xml-03.txt
> IETF draft, like it just define a  and we have
> dlr-mask and dlr-url, so I've adjusted and set
> 
>   x
>   http://
> 
> 
> and I've taked liberally the  and  (smsc directives) tags to
> have:
> kannel->appl: from = smsc-id, to=service-name
> appl->kannel: from = authentication, to=smsc-id
> 
> Please compile documentation with --enable-docs --enable-drafts or check
> at http://litux.org/~bruno/userguide.{html|rtf|pdf} and give me
> suggestions, critics, flames, anything.
> 
> I'll need this (or something alike) for the end of the week.
> 
> 
> On sendsms-user, it supports multiple destinations, altough I've yet not
> tested how many destinations we could have
> (BTW: do we have any string limit in octstr ? internally, multiple
> destinations is a string with numbers separated by space)
> 
> 

-- 
Alex Judd
http://www.skywire.co.uk





Re: CVS is broken?

2002-04-25 Thread Alex Judd

Thanks. Will diff the patches for a few things today and submit them.

Alex

On Wed, 24 Apr 2002, Stipe Tolj wrote:

> Seems to be fixed now. 
> 
> Commit that fixed the bug was:
> 
>http://www.kannel.3glab.org/cgi-bin/viewcvs.cgi/gateway/gw/smsbox.c.diff?r1=1.185&r2=1.186&sortby=date

-- 
Alex Judd
http://www.skywire.co.uk





CVS is broken?

2002-04-24 Thread Alex Judd

All

A clean CVS checkout is compiling with lots of "warning: passing arg 4 of 
`mutex_lock_real' discards qualifiers from pointer target type" warnings 
and crashes as soon as you try and communicate to it with a browser.

Can someone check and see what's broken from recent changes?

Alex

-- 
Alex Judd
http://www.skywire.co.uk





RE: SMPP Defer ability

2002-04-23 Thread Alex Judd

Got it (http://www.mail-archive.com/devel@kannel.3glab.org/msg02890.html). 
I'll implement against cvs, check it all works, and then resubmit it to 
get checked in.

Thanks

Alex

-- 
Alex Judd
http://www.skywire.co.uk





RE: SMPP Defer ability

2002-04-23 Thread Alex Judd

You sure you mean smsc_smpp.c validity period code as the version I have 
(and cvs has) doesn't appear to have any validity code setting in it (more 
is the shame!).

Therefore is any of smsc_at(2), smsc_cimd2, smsc_emi2 or smsc_ois share 
the same structure I'll borrow it from there and implement it.

Alex

On Tue, 23 Apr 2002, Michael Mulcahy wrote:

> Hi,
> 
> The code used for the validity period in SMPP may be reused for
> the scheduled delivery period in the SMPP module as the formats
> are the same.
> 
> Regards,
> Michael Mulcahy.
> 
> ANAM Wireless Internet Solutions
> http://www.anam.com mailto:[EMAIL PROTECTED]
> +353 1 284 7555 
> Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Alex Judd
> > Sent: Tuesday, April 23, 2002 1:16 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: SMPP Defer ability
> > 
> > 
> > Answering my own questions a little bit, SMPP does support 
> > schedule_delivery_time as an octet in the submit sms pdu and 
> > is definied 
> > in gw/smpp_pdu.def however isn't used.
> > 
> > The docs. say it is an octet of length 17 so it should be 
> > possible if we 
> > know the formatting to construct this. The code from the emi2 
> > driver is 
> > below - anyone know if the times are the same format?
> > 
> > if (msg->sms.deferred) {
> > str = octstr_create("1");
> > emimsg->fields[E50_DD] = str;
> > tm = gw_localtime(time(NULL) + msg->sms.deferred * 60);
> > sprintf(p, "%02d%02d%02d%02d%02d",
> > tm.tm_mday, tm.tm_mon + 1, tm.tm_year % 100,
> > tm.tm_hour, tm.tm_min);
> > str = octstr_create(p);
> > emimsg->fields[E50_DDT] = str;
> > }
> > 
> > because if they are we can set the 
> > pdu->u.submit_sm.schedule_delivery_time 
> > to be the right time and go with that.
> > 
> > Alex
> > 
> > On Tue, 23 Apr 2002, Alex Judd wrote:
> > 
> > > smsc_emi2 (and smsc_http) have the ability to defer 
> > messages with the 
> > > sms.deferred. Has anyone implemented this for SMPP and does 
> > it support it 
> > > in the PDU structure?
> > > 
> > > 
> > 
> > -- 
> > Alex Judd
> > http://www.skywire.co.uk
> > 
> 

-- 
Alex Judd
http://www.skywire.co.uk





Re: SMPP Defer ability

2002-04-23 Thread Alex Judd

Answering my own questions a little bit, SMPP does support 
schedule_delivery_time as an octet in the submit sms pdu and is definied 
in gw/smpp_pdu.def however isn't used.

The docs. say it is an octet of length 17 so it should be possible if we 
know the formatting to construct this. The code from the emi2 driver is 
below - anyone know if the times are the same format?

if (msg->sms.deferred) {
str = octstr_create("1");
emimsg->fields[E50_DD] = str;
tm = gw_localtime(time(NULL) + msg->sms.deferred * 60);
sprintf(p, "%02d%02d%02d%02d%02d",
tm.tm_mday, tm.tm_mon + 1, tm.tm_year % 100,
tm.tm_hour, tm.tm_min);
str = octstr_create(p);
emimsg->fields[E50_DDT] = str;
}

because if they are we can set the pdu->u.submit_sm.schedule_delivery_time 
to be the right time and go with that.

Alex

On Tue, 23 Apr 2002, Alex Judd wrote:

> smsc_emi2 (and smsc_http) have the ability to defer messages with the 
> sms.deferred. Has anyone implemented this for SMPP and does it support it 
> in the PDU structure?
> 
> 

-- 
Alex Judd
http://www.skywire.co.uk





SMPP Defer ability

2002-04-23 Thread Alex Judd

smsc_emi2 (and smsc_http) have the ability to defer messages with the 
sms.deferred. Has anyone implemented this for SMPP and does it support it 
in the PDU structure?

-- 
Alex Judd
http://www.skywire.co.uk





Re: SMPP error code (0x00000069)

2002-04-23 Thread Alex Judd

69 Decimal is 45 Hex which according to the SMPP 3.3 specification is

"Submit SM/Multi failed. the Mobile (ESM) doesnot have the SMS service 
activated"

There is a really good error message summary in a document I got from the 
Geeks Co site for their smartSMPP product which has them all summarised in 
Appendix B. I can probably dig it up if you can't find it.

Alex

On 
Tue, 23 Apr 2002, Steffen Lindemann wrote:

> Hi,
> 
> Does somebody have the list of error codes from a logical smsc.
> When I send it gives me a error code 69 and the message:
> "Warning: smpp: pdu nul terminated string has no nul"
> and
> "error: smpp: smsc returned error code 0x0069 in response to submit_sm"
> 
> any idea?
> 
> Steffen
> 
> 

-- 
Alex Judd
http://www.skywire.co.uk





RE: smsc_at2.c at+cmms=2

2002-04-18 Thread Alex Judd

+CMMS is "More messages to send" and is used by the Siemens, however not 
by most other devices.

Have a look at 

http://gatling.ikk.sztaki.hu/~kissg/gsm/at+c.html

and reports from Siemens vs. Falcon there too.

Alex

On Thu, 18 Apr 2002, Oded Arbel wrote:

> 
> I don't know what is +CMMS (IIRC it isn't mentioned on the wavecom
> manual),  what its suposed to do or why Bruno put it in, but latest CVS
> has a configuration for that (in modems.conf) that is disabled by
> default for most modem types (only enabled for nokia phone in the sample
> modems.conf).
> 
> --
> Oded Arbel
> m-Wise Inc.
> [EMAIL PROTECTED]
> (972)-67-340014
> (972)-9-9581711 (ext: 116)
> 
> ::..
> "I heard someone tried the monkeys-on-typewriters bit trying for the
> plays of W. Shakespeare, but all they got was the collected works of
> Francis Bacon."
>   -- Bill Hirst
> 
> 
> > -Original Message-
> > From: Andrea Viscovich [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, April 18, 2002 1:01 PM
> > To: [EMAIL PROTECTED]
> > Subject: smsc_at2.c at+cmms=2
> > 
> > 
> > Inside the code there is a call to at+cmms=2
> > if(list_len(privdata->outgoing_queue) > 1)
> > at2_send_modem_command(privdata, "AT+CMMS=2", 0, 0);
> > On all wavecom this generates an error response.
> > Looking to at manual (wavecom) there is no mention to this.
> > Does anybody know anything about it?
> > Andrea Viscovich
> > 
> > Email2Mobile: [EMAIL PROTECTED]
> > Web: http://www.smsprof.it
> > 
> > 
> > 
> > 
> 

-- 
Alex Judd
http://www.skywire.co.uk





Re: SMPP SMSC

2002-04-07 Thread Alex Judd

The current implementation of smsc_smpp only supports binding on both 
transceiver and receiver, not just one or the other. It does seem though 
this may be a useful feature to have if running multiple programs on one 
SMPP connection to do differing send and receive.

ALex

On Sun, 7 Apr 2002, Shridhar Raju wrote:

> I'm using gateway 1.1.6. Does Kanel supports bind_transceiver in SMPP. In
> smsc_smpp.c, there is no implementation for this. My service operator has
> given only one port i.e. transceiver port. Any way we could connect to SMSC.
> 
> Shridhar Raju
> 
> 

-- 
Alex Judd
http://www.skywire.co.uk





Disabling the auto response to reply from get-url

2002-04-04 Thread Alex Judd

Probably an obvious question but how do I stop the automatic SMS back to 
the user of any response triggered by the get-utl I specify.

For example 

get-url = http://do something

and when I run do-something it replies 'done', however I don't want to 
send 'done' to the user.

? Thanks

Alex

-- 
Alex Judd
http://www.skywire.co.uk





Re: sending too fast to SMPP SMSC?

2002-04-03 Thread Alex Judd

Can we please ensure we add the SMPP ability to force source_addr_ton etc. 
to the release or at least the cvs before it is released. I know it is not as per 
the specifications however myself, Stefan Cars, Benjamin Lee and various 
others on the list have to re-add these modifications each new build we 
get, and one of the biggest carriers in the UK, namely BT, are forcing the 
use of non-standard values.

Also - I'd like to review and then cvs add the throttling modifications to 
SMPP so that we can do it correctly by protocol using 0x0058 I/F Throttled 
Error to slow down the speed we are sending messages until a suitable 
level is reached

Is this suitable for everyone?

Alex

On Mon, 1 Apr 2002, Benjamin Lee wrote:

> 
> Yes, I'll be reposting it again against the current CVS (the repository
> changed a bit under my feet since the last diff...)
> 
> 
> On Thursday, 2002-03-28 at 11:03:49 PM, Kita Ndara scribbled:
> > I don't seem to be able to apply this patch to the cvs
> > set, could you provide one that is based on a diff
> > with the current set?
> > 
> > Thanks.
> > 
> > 
> >  --- Benjamin Lee <[EMAIL PROTECTED]> wrote: >
> > Find attached my patch for SMPP bits and pieces.
> > > It is a combined patch (sorry) including:
> > > 
> > > 1.  configurable TON and NPI (modified from Alex
> > > Judd>
> > > 
> > > 2.  unbind when shutting down
> > > 
> > > 3.  configurable default priority for SMS messages
> > > 
> > > 4.  configurable throughput to limit (throttle)
> > > sending SMS rate to SMPP SMSC
> > > 
> > > 5.  Makefile.in changes, added install -d
> > > $(DESTDIR)$(... etc...
> > > facilitating consistent builds using RPM
> > > non-root)
> > > 
> > > 
> > > (I apologise for some of the spacing differences...)
> > > 
> > > 
> > > On Thursday, 2002-03-21 at 08:43:56 AM, Benjamin Lee
> > > scribbled:
> > > > Well, actually nothing smart... we were sleeping
> > > when we received a
> > > > THROTTLE off packet from the SMSC but this
> > > behaviour isn't actually
> > > > specified in the protocol as far as I know; and
> > > such a sleep may or may not
> > > > help with the connection to the SMSC.
> > > > 
> > > > The throughtput is set in the .conf file with:
> > > > 
> > > > throughput = 20
> > > > 
> > > > 20 being 20 messages per second.
> > > > 
> > > > On Wednesday, 2002-03-20 at 11:26:05 PM, Kita
> > > Ndara scribbled:
> > > > > What's the principle? Do you detect certain
> > > types of
> > > > > errors and re-queue? I can do some testing on my
> > > end
> > > > > too, see if it helps more generally.
> > > > > 
> > > > > Let's see it!
> > > > > 
> > > > > Thanks.
> > > > > 
> > > > >  --- Benjamin Lee <[EMAIL PROTECTED]>
> > > wrote: > I
> > > > > finally got around to doing a throughput patch
> > > for
> > > > > > SMPP... I'll post it
> > > > > > shortly.
> > > > > > 
> > > > > > On Wednesday, 2002-03-20 at 10:29:26 PM, Kita
> > > Ndara
> > > > > > scribbled:
> > > > > > > Hi  
> > > > > > >  I have another issue. When I use kannel to
> > > > > > originate
> > > > > > > messages to many phone numbers, sometimes
> > > the SMSC
> > > > > > > (Comverse) returns errors and rejects some
> > > of the
> > > > > > > messages. If I slow down the rate at which
> > > I'm
> > > > > > > submitting the messages to the SMSC, then it
> > > works
> > > > > > > fine. Is there a way for kannel to kind of
> > > > > > > automatically back off from sending too fast
> > > in
> > > > > > such
> > > > > > > cases?
> > > > > > > 
> > > > > > > Thanks.
> > > > > > > 
> > > > > > > =
> > > > > > > Bruce Ndara
> > > > > > > York Messaging
> > > > > > > 
> > > > > > >
> > > __
> > > > > > > Do You Yahoo!?
>

RE: [RFC] feature freeze?!

2002-03-21 Thread Alex Judd

All

I would welcome adding the ability to manually specify the source ton and 
npi that I've submitted before we freeze. Patch reattached for review.

Thanks

Alex



On Wed, 20 Mar 2002, Angel Fradejas wrote:

> Hello,
> 
> I think the source and destination TON patch for SMPP should go in before
> freezing. Many of us have to manually hack the code after each release to
> get it working.
> 
> * smsc_smpp.c source and destination TON
> Posted by: Alex Judd <[EMAIL PROTECTED]
> Message-ID:
> <[EMAIL PROTECTED]>
> 
> 
> Also, I consider important all of the timestamping issues: emi2, at2 the
> most, also the http one (thread "bug with date_convert_universal" discussed
> this month), because of the traffic accounting many of us have to do.
> 
> Last, of course, I have a good use for my patch
> 
> * SMSC specific default-sender and forced-sender
> Posted by: "Angel Fradejas" <[EMAIL PROTECTED]>
> Message-ID: <[EMAIL PROTECTED]>
> Updated: <[EMAIL PROTECTED]>
> 
> and remember some other please who could use it, but maybe it is not of
> general interest.
> 
> My two cents.
> 
> Angel Fradejas.
> 
> 
> 
> -Mensaje original-
> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En
> nombre de Stipe Tolj
> Enviado el: miércoles 20 de marzo de 2002 17:54
> Para: [EMAIL PROTECTED]
> Asunto: [RFC] feature freeze?!
> 
> 
> Hi there,
> 
> when are we going to feature freeze the cvs tree?
> 
> What patches are still open? I see a couple of submissions to the
> devel@ list but yet to change in the STATUS file. Please heads up for
> anyone of the developers who wants this to go in before freezing.
> 
> Stipe
> 
> [EMAIL PROTECTED]
> ---
> Wapme Systems AG
> 
> Münsterstr. 248
> 40470 Düsseldorf
> 
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
> 
> E-Mail: [EMAIL PROTECTED]
> Internet: http://www.wapme-systems.de
> ---
> wapme.net - wherever you are
> 
> 

-- 
Alex Judd
http://www.skywire.co.uk



diffs.tar.Z
Description: Binary data


RE: msg->sms.smsc_id versus cfg_get(grp, octstr_imm("smsc-id"))

2002-03-20 Thread Alex Judd

Thanks very much to both of you

I'll try the denied/allowed route as I'd rather the message failed than 
went through the wrong SMS.

Alex

On Wed, 20 Mar 2002, Angel Fradejas wrote:

> Having a preferred-smsc would do what you want in most cases (unless the
> specified smsc is not online, in that case, kannel would route it to another
> smsc in absence of allowed-smc/denied-smsc.
> 
> group = smsc
> smsc-id = testsmsc1
> preferred-smsc-id = testsmsc1
> 
> Hope it helps.
> 
> Angel Fradejas.
> 
> -Mensaje original-
> De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En
> nombre de Bruno David Rodrigues
> Enviado el: miércoles 20 de marzo de 2002 17:25
> Para: Alex Judd; [EMAIL PROTECTED]
> Asunto: Re: msg->sms.smsc_id versus cfg_get(grp, octstr_imm("smsc-id"))
> 
> 
> it's not easy to do that in the current code.
> 
> You'll have to have a preferred-smsc in your smsc group
> or even an allowed-smsc/denied-smsc
> 
> what I'm thinking to do is to have a default prefered smsc, like
> if the message has a msg.smscid=A, it should preferelly go through A
> 
> - Original Message -
> From: "Alex Judd" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 20, 2002 4:17 PM
> Subject: msg->sms.smsc_id versus cfg_get(grp, octstr_imm("smsc-id"))
> 
> 
> > I think I'm trying to convince Kannel to do something that it doesn't want
> > to do and appreciate some input from the list.
> >
> > Objective: Receive /cgi-bin/sendsms message and send through specific SMS
> >
> > What happens is that when I specify the smsc= parameter to try and force
> > the message to go through that SMSC it is tagging the message as coming
> > from that SMSC, rather than sending it through the SMSC I specify
> >
> > The SMSC it sends through seems to be random depending on which thread it
> > wakes up and that SMSC has it's ID specified in the configuration file.
> >
> > Therefore what I'd like to do is when we go to wakeup or create the SMSC
> > needed, to create it according to the msg->sms.smsc == cfg_get(grp,
> > octstr_imm("smsc-id")) rather than being random
> >
> > Does this sound correct and where in the process does Kannel decide which
> > smsc to connect to?
> >
> > Thanks in advance
> >
> > Alex
> >
> >  --
> > Alex Judd
> > http://www.skywire.co.uk
> >
> >
> >
> 

-- 
Alex Judd
http://www.skywire.co.uk





msg->sms.smsc_id versus cfg_get(grp, octstr_imm("smsc-id"))

2002-03-20 Thread Alex Judd

I think I'm trying to convince Kannel to do something that it doesn't want 
to do and appreciate some input from the list.

Objective: Receive /cgi-bin/sendsms message and send through specific SMS

What happens is that when I specify the smsc= parameter to try and force 
the message to go through that SMSC it is tagging the message as coming
from that SMSC, rather than sending it through the SMSC I specify

The SMSC it sends through seems to be random depending on which thread it 
wakes up and that SMSC has it's ID specified in the configuration file.

Therefore what I'd like to do is when we go to wakeup or create the SMSC 
needed, to create it according to the msg->sms.smsc == cfg_get(grp, 
octstr_imm("smsc-id")) rather than being random

Does this sound correct and where in the process does Kannel decide which 
smsc to connect to?

Thanks in advance

Alex

 -- 
Alex Judd
http://www.skywire.co.uk





Additional [bug] /cgi-bin/sendsms?smsc=

2002-03-20 Thread Alex Judd

This appears to be something to do with the fact that as far as I can tell 
from reading smsc_http.c the smsc= parameter is now depricated so the 
system is alternating between the available SMSCs even though I'm telling 
it to use a specific one.

Can we do this in another way?

Thanks

Alex

-- 
Alex Judd
http://www.skywire.co.uk





[bug] /cgi-bin/sendsms?smsc=

2002-03-20 Thread Alex Judd

Strange behaviour with specifying the smsc to send through via the http 
interface with the latest cvs. If you switch SMSC, then the 1st time the 
query is run, Kannel is picking up parameters for the _last_ smsc it used 
before not the new one you specify

Next time you run the same query it picks up the new parameters (ie. the 
parameters from the last query) and works.

Anyone seen this happening before?

-> 1st Send (to use SMSC1)

GET
/cgi-bin/sendsms?username=username&password=password&to=+4477&from=username&text=Test+Message&smsc=SMSC2
HTTP/1.0

-> Response (note ton0 and npi0)

2002-03-20 11:53:08 [10] DEBUG: boxc_receiver: sms received
2002-03-20 11:53:08 [5] DEBUG: First character = 2 and 2nd character = 1
2002-03-20 11:53:08 [5] DEBUG: Manually set to ton = 0 and npi = 0
2002-03-20 11:53:08 [5] DEBUG: ton = 0 and npi = 0

-> 2nd Send (to use SMSC2)

GET 
/cgi-bin/sendsms?username=username&password=password&to=+4477&from=username&text=Test+Message&smsc=SMSC2
 
HTTP/1.0

-> Response (note incorrect ton0 and npi0 read from the configuration file 
even though SMSC changed)

2002-03-20 11:53:27 [10] DEBUG: boxc_receiver: sms received
2002-03-20 11:53:27 [5] DEBUG: First character = A and 2nd character = B
2002-03-20 11:53:27 [5] DEBUG: Manually set to ton = 0 and npi = 0
2002-03-20 11:53:27 [5] DEBUG: ton = 0 and npi = 0
2002-03-20 11:53:27 [5] WARNING: SMPP: PDU NUL terminated string has no 
NUL.
2002-03-20 11:53:27 [5] ERROR: SMPP: SMSC returned error code 0x0069 
in respons
e to submit_sm.

-> 3rd Send (to use SMSC2)

GET 
/cgi-bin/sendsms?username=username&password=password&to=+4477&from=username&text=Test+Message&smsc=SMSC2
 
HTTP/1.0

-> Response (note correct ton5 and npi6 picked up from configuration file)

2002-03-20 11:53:38 [10] DEBUG: boxc_receiver: sms received
2002-03-20 11:53:38 [7] DEBUG: First character = A and 2nd character = B
2002-03-20 11:53:38 [7] DEBUG: Manually set to ton = 5 and npi = 6
2002-03-20 11:53:38 [7] DEBUG: ton = 5 and npi = 6

-- 
Alex Judd
http://www.skywire.co.uk





Re: FW: SMPP PDU unpacking errors

2002-03-19 Thread Alex Judd

Thanks very much for the info., I'll check with them.

On another note, the '+' comparison checks in smsc_smpp.c never seem to 
work as the source address appears to be stripped of the + before it 
reaches the check.

>From some debugging yesterday using ABC, 123 and +123

2002-03-18 16:15:22 [8] DEBUG: boxc_receiver: sms received
2002-03-18 16:15:22 [5] DEBUG: First character = A and 2nd character = B
2002-03-18 16:15:22 [5] DEBUG: source addr = ABC

2002-03-18 16:15:27 [8] DEBUG: boxc_receiver: sms received
2002-03-18 16:15:27 [5] DEBUG: First character = 1 and 2nd character = 2
2002-03-18 16:15:27 [5] DEBUG: source addr = 123

2002-03-18 16:15:31 [8] DEBUG: boxc_receiver: sms received
2002-03-18 16:15:31 [5] DEBUG: First character =   and 2nd character = 1
2002-03-18 16:15:31 [5] DEBUG: source addr =  123

As you can see the +123 is already 123 by the time it reaches the 
check which would mean that any sourceaddress of + will have the wrong 
TON and NPI generated.

Alex

-- 
Alex Judd
http://www.skywire.co.uk





SMPP PDU unpacking errors

2002-03-15 Thread Alex Judd

Can anyone shed light on the following errors I get from trying to unpack 
the PDU sent back by our SMSC when rebinding?

2002-03-15 16:08:53 [5] ERROR: SMPP: I/O error or other error. 
Re-connecting.
2002-03-15 16:09:23 [5] ERROR: Unknown SMPP_PDU type, internal error.
2002-03-15 16:09:23 [5] ERROR: SMPP: PDU unpacking failed.
2002-03-15 16:09:23 [5] DEBUG: SMPP: Failed PDU follows.
2002-03-15 16:09:23 [5] DEBUG: Octet string at 1d2cd8:
2002-03-15 16:09:23 [5] DEBUG:   len:  12
2002-03-15 16:09:23 [5] DEBUG:   size: 13
2002-03-15 16:09:23 [5] DEBUG:   immutable: 0
2002-03-15 16:09:23 [5] DEBUG:   data: 80 00 00 00 00 00 00 03   
2002-03-15 16:09:23 [5] DEBUG:   data: 00 00 02 4e   ...N
2002-03-15 16:09:23 [5] DEBUG: Octet string dump ends.
2002-03-15 16:09:23 [5] ERROR: SMPP: I/O error or other error. 
Re-connecting.
2002-03-15 16:11:31 [5] ERROR: Unknown SMPP_PDU type, internal error.
2002-03-15 16:11:31 [5] ERROR: SMPP: PDU unpacking failed.
2002-03-15 16:11:31 [5] DEBUG: SMPP: Failed PDU follows.
2002-03-15 16:11:31 [5] DEBUG: Octet string at 1e05a8:
2002-03-15 16:11:31 [5] DEBUG:   len:  12
2002-03-15 16:11:31 [5] DEBUG:   size: 13
2002-03-15 16:11:31 [5] DEBUG:   immutable: 0
2002-03-15 16:11:31 [5] DEBUG:   data: 80 00 00 00 00 00 00 03   
2002-03-15 16:11:31 [5] DEBUG:   data: 00 00 02 51   ...Q
2002-03-15 16:11:31 [5] DEBUG: Octet string dump ends.

Thanks

Alex

-- 
Alex Judd
http://www.skywire.co.uk





RE: SMSC_SMTP ?

2002-03-13 Thread Alex Judd

To answer both response at once (thanks), it's not for a carrier 
connection it's to provide an interface for the users to use, it may be 
handy to have available in Kannel for a one-stop-solution type point of 
view although I do understand that writing the module in C and reinventing 
what a lot of good programs are already doing well is a waste.

Why use lynx? Very simple way of calling the http interface in Kannel. I 
agree that every language around has a good socket library (I'm using Java 
servlets to automatically respond to inbound messages via http). The 
traffic levels are also very very low so the overheads won't really 
matter.

BTW any feedback on adding the ability to overrider the default source and 
destination ton(s) and npi(s) for smsc_smpp? I've just readded it to the 
CVS version I checked out and I'd like to have it added for the future.

Alex

On Wed, 13 Mar 2002, Oded Arbel wrote:

> I don't think its necessary - using script to feed your application is
> usually easier then writing full fledged modules in C, and performance
> is rarely an issue when dealing with SMTP. but why use lynx ? every
> scripting language worth anything has usable internal HTTP calls  (see
> PERL LWP, PHP CURL and even BASH).
> 
> --
> Oded Arbel
> m-Wise Inc.
> [EMAIL PROTECTED]
> 
> "Enjoy the minor good things in life. The great things are rare."
> 
> 
> > -Original Message-
> > From: Alex Judd [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 13, 2002 3:36 PM
> > Cc: [EMAIL PROTECTED]
> > Subject: SMSC_SMTP ?
> > 
> > 
> > Has anyone written an SMTP SMSC interface for Kannel? I'm 
> > going to set it 
> > up using mail aliases, and lynx otherwise (a non attractive 
> > option) but 
> > potentially looking at the smsc_http.c interface this could 
> > be changed to 
> > parse responses on port 25?
> > 
> > Alex
> > 
> > -- 
> > Alex Judd
> > www.skywire.co.uk
> > 
> > 
> > 
> 

-- 
Alex Judd
http://www.skywire.co.uk





SMSC_SMTP ?

2002-03-13 Thread Alex Judd

Has anyone written an SMTP SMSC interface for Kannel? I'm going to set it 
up using mail aliases, and lynx otherwise (a non attractive option) but 
potentially looking at the smsc_http.c interface this could be changed to 
parse responses on port 25?

Alex

-- 
Alex Judd
www.skywire.co.uk





Re: SMPP throttling

2002-03-01 Thread Alex Judd

I've used sleeping Threads to implement this in Java which works quite 
nicely. If anyone wants the code feel free to email me.

Alex

On Fri, 1 Mar 2002, 
Bruno David Rodrigues wrote:

> A perl script that forks itself (fork or threads), open the socket and
> writes the
> 'GET /send... &to='. $number. '... HTTP/1.0\r\n\r\n', close the socket (or
> keep it open, I don't remember how's the keepalive feature of smsbox), and
> repeat until the end of the list ?
> 
> I've once done a perl script that forks itself 64 childs to do snmpget's at
> every 5 minutes
> The machine has a continuous load of 5 for more than one year. Then "they"
> disconnected it :(
> 
> 
> - Original Message -
> From: "Stipe Tolj" <[EMAIL PROTECTED]>
> To: "Bruno David Rodrigues" <[EMAIL PROTECTED]>
> Cc: "Matthew Flax" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, February 26, 2002 10:20 AM
> Subject: Re: SMPP throttling
> 
> 
> > Bruno David Rodrigues wrote:
> > >
> > > I've done spam^H^H^H^Hmarketing with something like this:
> > >
> > > a text file with one msisdn per line
> >
> > the main issue was how to create an input stream to Kannel's HTTP
> > sendsms interface with 300-400 concurrent messages.
> >
> > When we consider concurrent = "within the same second", then I think
> > initiating 300-400 processes of lynx in *one* second is almost
> > impossible for "normal" boxes.
> >
> > Basicly the concepts of load-testing and benchmarking apply in the
> > same way as for traditional HTTP servers. I recommend some readings at
> > http://researchindex.org/ for this, they have high-quality papers
> > about that. But keep in mind, it's a very theoretical background.
> >
> > Stipe
> >
> > [EMAIL PROTECTED]
> > ---
> > Wapme Systems AG
> >
> > Münsterstr. 248
> > 40470 Düsseldorf
> >
> > Tel: +49-211-74845-0
> > Fax: +49-211-74845-299
> >
> > E-Mail: [EMAIL PROTECTED]
> > Internet: http://www.wapme-systems.de
> > ---
> > wapme.net - wherever you are
> >
> >
> 
> 

-- 
Alex Judd
http://www.enpocket.com/





Bug with get-url

2002-02-27 Thread Alex Judd

My current (recent) cvs build appears to lose the responses from the SMS 
when using the url functions (get-url, post-url etc.) however works quite 
fine with a text dump etc.. Anyone else seen this or fixed it?

Logs..

2002-02-27 15:25:26 Receive SMS [SMSC:1] [SVC:] [ACT:] [from:44774] 
[to:2199] [flags:0:0:0:0:0] [msg:4:AJTJ] [udh:0:]
2002-02-27 15:25:26 SMS HTTP-request sender:44774 request: '' url: 
'http://machine:port/program?sender=44774&response=&smsc=1' reply: 200 '<< 
successful >>'

Alex





RE: Modification of gwthread_sleep for SMPP throttling

2002-02-21 Thread Alex Judd

Nope - sorry my mistake

It accepts values as doubles and therefore multiplying them by 1000 to get 
the time as milliseconds and converting it to a whole number will do the 
trick. Therefore we just need to make sure that

milliseconds = seconds * 1000;

ends up as an int for this to work.

On Wed, 20 Feb 2002, Jörg Pommnitz wrote:

> I second this. gwthread_sleep does what you want right now or
> I'm missing something.
> 
> Regards
>   Jörg
> 
> -Original Message-
> From: Oded Arbel
> To: Alex Judd; [EMAIL PROTECTED]
> Sent: 2/20/02 4:33 PM
> Subject: RE: Modification of gwthread_sleep for SMPP throttling
> 
> I don't think I understand. as gwthread_sleep accepts times in double
> and not integer, its easy to sleep for less then a second. for example -
> I usually use gwthread_sleep(0.1) which sleeps for a tenth of a second.
> what's wrong with the current implementation ?
> 
> Oded Arbel
> m-Wise Inc.
> [EMAIL PROTECTED]
> 
> --
> "Some say life is hell and death an escape, others say heaven awaits us
> in the world beyond, but either way I need a new pair of shoes."
>   -- Privateer.
> 
> 
> > -Original Message-
> > From: Alex Judd [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 20, 2002 5:20 PM
> > To: [EMAIL PROTECTED]
> > Subject: Modification of gwthread_sleep for SMPP throttling
> > 
> > 
> > In order to add (hopefully nice) throttling to the SMPP 
> > driver I'd like 
> > to modify the behaviour of the gwthread_sleep function in 
> > gwthread-pthread.c very slightly.
> > 
> > Currently the function receives the amount of seconds to sleep as a 
> > double, multiplies it by 1000 to get that value in 
> > milliseconds and then 
> > sleeps for that amount of time in milliseconds.
> > 
> > What I'd like to do is if the function recieves a value of < 1 as the 
> > number of seconds to sleep for, that it instead assumes this 
> > to be the 
> > number of milliseconds to sleep for, skips the *1000 part and 
> > sleeps for 
> > this time instead.
> > 
> > This way I can sleep nicely for < 1 second periods.
> > 
> > Any objections to this before I do so?
> > 
> > Regards
> > 
> > Alex
> > 
> > -- 
> > Alex Judd
> > http://www.skywire.co.uk/
> > http://www.enpocket.com/
> > 
> > 
> > 
> > 
> 

-- 
Alex Judd
http://www.enpocket.com/





Re: Modification of gwthread_sleep for SMPP throttling

2002-02-21 Thread Alex Judd

Yep - please ignore - no modifications needed - gwthread_sleep will 
handle values down to 0.001 (1 millisecond) anyway. Andreas was saying in 
an email today that SMPP should work without throttling anyway, however 
from our SMSC here, I've seen lots of throttling requests coming back from 
the SMSC which causes Kannel to wait for x amount of time, then retry and 
then loop with this kind of behaviour which makes for reasonably slow 
delievry behaviour.

Is this the correct behaviour?

Alex

On Wed, 20 Feb 2002, Alex Judd wrote:

> In order to add (hopefully nice) throttling to the SMPP driver I'd like 
> to modify the behaviour of the gwthread_sleep function in 
> gwthread-pthread.c very slightly.
> 
> Currently the function receives the amount of seconds to sleep as a 
> double, multiplies it by 1000 to get that value in milliseconds and then 
> sleeps for that amount of time in milliseconds.
> 
> What I'd like to do is if the function recieves a value of < 1 as the 
> number of seconds to sleep for, that it instead assumes this to be the 
> number of milliseconds to sleep for, skips the *1000 part and sleeps for 
> this time instead.
> 
> This way I can sleep nicely for < 1 second periods.
> 
> Any objections to this before I do so?
> 
> Regards
> 
> Alex
> 
> 

-- 
Alex Judd
http://www.enpocket.com/





Modification of gwthread_sleep for SMPP throttling

2002-02-20 Thread Alex Judd

In order to add (hopefully nice) throttling to the SMPP driver I'd like 
to modify the behaviour of the gwthread_sleep function in 
gwthread-pthread.c very slightly.

Currently the function receives the amount of seconds to sleep as a 
double, multiplies it by 1000 to get that value in milliseconds and then 
sleeps for that amount of time in milliseconds.

What I'd like to do is if the function recieves a value of < 1 as the 
number of seconds to sleep for, that it instead assumes this to be the 
number of milliseconds to sleep for, skips the *1000 part and sleeps for 
this time instead.

This way I can sleep nicely for < 1 second periods.

Any objections to this before I do so?

Regards

Alex

-- 
Alex Judd
http://www.skywire.co.uk/
http://www.enpocket.com/






RE: TON and NPI

2002-02-14 Thread Alex Judd

> The TON and NPI parameters are defined according to the GSM and the SMPP
> standards. Unfortunately how they are used in an SMSC does not seem to be
> standardised.

Yes - that unluckly is the problem - those of us who have to deal with 
non-standard implementations of SMPP have to modify the code every time to 
get around this so its more of a 'life' requirement than a 
'standardisation' requirment.

Before we all do the work multiple times shall I resubmit the patches I 
did for this which do as the list describes?

Also - what's everyone's thoughts on adding the retry timeout and 
throtling speed to these too?

Regards

Alex





Re: Contributions... generic NACK info and throttling

2002-02-14 Thread Alex Judd

> Also, I might like to implement a per SMSC throttling code... because our
> SMPP SMSC only allows 25 messages / sec... which means that if messages get
> queued up and/or stored to file... bearerbox can continuously attempt to
> overload the SMSC should the queue become large or should it reload a large
> store file upon startup... if you know what I mean. Pointers, objections?

Yep - a lot of carriers (ie. ours) are throttling our send speed as well 
and I'd rather control the flow of send than play the eternal 
throttlemessage -> sleep -> send -> throttle message etc. so this makes a 
lot of sense to me.

The current SMPP specific parameters are kept as #defines in the smpp code 
however I'd like to suggest we move these out to the configuration files 
so that different SMSCs running SMPP can have specific parameters set for 
them without source recompiles.

BTW did we add the ton/npi configuration file changes for the SMPP driver 
to CVS yet? I can add the other configuration changes at the same time.

Alex

> 
> Cheers all,
> Ben.
> 
> 

-- 
Alex Judd
http://www.enpocket.com/





Re: How to construct Flash SMS

2002-02-05 Thread Alex Judd

Stipe/Andreas

Can we not just apply the patch I submitted to do this last week? This 
allows for manual override or automatic fall back if not used.

Alex

On Tue, 5 Feb 2002, Stipe Tolj wrote:

> Andreas Fink wrote:
> > 
> > You got to send the numbers to kannel in international format (+...)
> > to get TON to be set to 1. If you send them in national format
> > without the +, TON is set to 2 (national), not 0 (unspecified)
> > 
> > Or you might simply patch that part to set TON always to zero.
> > Depends on the SMSC you are using. Mine does not accept zero.
> > 
> > Second problem you could run into is that you are sending
> > alphanumeric FROM address which some SMSC's dont like.
> 
> Andreas, it seems this TON issue is getting us into trouble. Shouldn't
> we use internal logic to handle this? I don't think it would be too
> hard to figure it out?
> 
> Stipe
> 
> [EMAIL PROTECTED]
> ---
> Wapme Systems AG
> 
> Münsterstr. 248
> 40470 Düsseldorf
> 
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
> 
> E-Mail: [EMAIL PROTECTED]
> Internet: http://www.wapme-systems.de
> ---
> wapme.net - wherever you are
> 

-- 
Alex Judd
http://www.enpocket.com/





Re: SMPP TON

2002-01-29 Thread Alex Judd

I just had to do this for the carrier I'm connecting to here (had to force 
combinations that the autodetect didn't support) so the patch against cvs 
is attached. As per current behaviour, if you don't specify it it is 
automatically detected from the to number.

Here's an example group for the config files

igroup=smsc
smsc=smpp
smsc-id=CARRIER
host=XXX.XXX.XXX.XXX
port=999
receive-port=999
smsc-username=USERNAME
smsc-password=PASSWORD
system-type=""
address-range=""
source_addr_ton=0
source_addr_npi=0
dest_addr_ton=1
dest_addr_npi=1
connect-allow-ip = 127.0.0.1

Hope this helps

Alex

http://www.enpocket.com

On Tue, 29 Jan 2002, Andreas Fink wrote:

> >Peter Löfman wrote:
> >>
> >>  Hi,
> >>
> >>  well I solved the problem by re-compiling with the ton set to 0.
> >>  It might be possible that 1 (international) will work also, I have 
> >>not tested yet.
> >>  But with 2 (national) it did not work.
> >
> >so, how about setting this ton variable by a configuration directive
> >within the smsc group?!
> 
> well TON usually have to be set to specific values for specific types 
> of numbers. The current code does set it to 1 for international 
> numbers (the ones who start with +) and 2 for others (assuming they 
> are national) and to 0 for alphanumeric ones. The point is that in 
> kannel there's no representation for TON so we have to assume 
> something. Setting it to a fixed value only makes sense if we always 
> send international numbers or always nationals etc. In my case, I'm 
> always sending international but I might reply to national ones when 
> I get them from the SMSC as such (polling).
> 
> So its not just adding a configuration directive to say TON=value 
> because in some cases you need to set it. Its more like a behaviour. 
> So in the mentioned case it might work out ok if a + is added to the 
> number (the code removes it afterwards).
> 

-- 
Alex Judd
http://www.enpocket.com/


Index: gw/smsc_smpp.c
===
RCS file: /home/cvs/gateway/gw/smsc_smpp.c,v
retrieving revision 1.50
diff -u -r1.50 smsc_smpp.c
--- gw/smsc_smpp.c  2002/01/28 15:12:13 1.50
+++ gw/smsc_smpp.c  2002/01/29 18:29:37
@@ -70,6 +70,10 @@
 Octstr *username;
 Octstr *password;
 Octstr *address_range;
+int source_addr_ton;
+int source_addr_npi;
+int dest_addr_ton;
+int dest_addr_npi;
 int transmit_port;
 int receive_port;
 int quitting;
@@ -80,7 +84,9 @@
 static SMPP *smpp_create(SMSCConn *conn, Octstr *host, int transmit_port, 
 int receive_port, Octstr *system_type, 
 Octstr *username, Octstr *password,
-Octstr *address_range)
+Octstr *address_range, int source_addr_ton,
+ int source_addr_npi, int dest_addr_ton,
+ int dest_addr_npi)
 {
 SMPP *smpp;
 
@@ -97,6 +103,10 @@
 smpp->username = octstr_duplicate(username);
 smpp->password = octstr_duplicate(password);
 smpp->address_range = octstr_duplicate(address_range);
+smpp->source_addr_ton = source_addr_ton;
+smpp->source_addr_npi = source_addr_npi;
+smpp->dest_addr_ton = dest_addr_ton;
+smpp->dest_addr_npi = dest_addr_npi;
 smpp->transmit_port = transmit_port;
 smpp->receive_port = receive_port;
 smpp->quitting = 0;
@@ -207,33 +217,45 @@
 pdu = smpp_pdu_create(submit_sm, 
  counter_increase(smpp->message_id_counter));
   
-pdu->u.submit_sm.dest_addr_ton = GSM_ADDR_TON_NATIONAL; /* national */
-pdu->u.submit_sm.source_addr_ton = GSM_ADDR_TON_NATIONAL; /* national */
-pdu->u.submit_sm.source_addr_npi = GSM_ADDR_NPI_E164; /* ISDN number plan */
-pdu->u.submit_sm.dest_addr_npi = GSM_ADDR_NPI_E164; /* ISDN number plan */
-
 pdu->u.submit_sm.source_addr = octstr_duplicate(msg->sms.sender);
 pdu->u.submit_sm.destination_addr = octstr_duplicate(msg->sms.receiver);
+
+/* Check for manual override of source ton and npi values */
+if(smpp->source_addr_ton > -1 && smpp->source_addr_npi > -1) {
+pdu->u.submit_sm.source_addr_ton = smpp->source_addr_ton;
+pdu->u.submit_sm.source_addr_npi = smpp->source_addr_npi;
+} else {
+pdu->u.submit_sm.source_addr_ton = GSM_ADDR_TON_NATIONAL; /* national */
+pdu->u.submit_sm.source_addr_npi = GSM_ADDR_NPI_E164; /* ISDN number plan */
  
-/* lets see if its international or alphanumeric sender */
-if( octstr_get_char(pdu->u.submit_sm.source_addr,0) == '+') {
-if (!octstr

Re: SMPP implementation in current CVS build

2002-01-29 Thread Alex Judd

Illogical and strange but thanks for looking at it (and the fix).

We don't check for host as a default config value either so you get an 
octstr error if you don't specify it. Quick diff fix for that.

# cvs diff -u gw/smsc_smpp.c
Index: gw/smsc_smpp.c
===
RCS file: /home/cvs/gateway/gw/smsc_smpp.c,v
retrieving revision 1.50
diff -u -r1.50 smsc_smpp.c
--- gw/smsc_smpp.c  2002/01/28 15:12:13 1.50
+++ gw/smsc_smpp.c  2002/01/29 10:27:57
@@ -829,6 +827,10 @@

 /* Check that config is OK */
 ok = 1;
+if (host == NULL) {
+error(0,"SMPP: Configuration file doesn't specify host");
+ok = 0;
+}
 if (username == NULL) {
error(0, "SMPP: Configuration file doesn't specify username.");
ok = 0;
#

Alex

On Tue, 29 Jan 2002, Stipe Tolj wrote:

> > I was able to reproduce this problem on my Solaris 8 box. I then made
> > a wrapper around mutex_lock (created mutex_lock_real adding __FILE__
> > and __LINE__ to the call as a macro) and print out the line and file
> > position of the mutex lock. This made the error go away. Its
> > completely illogical to me but it fixed it. its in CVS right now.
> 
> yep, that's strange.
> 
> I just reviewed the change and it seems the logic is the same. Hmmm..
> 
> Stipe





Re: SMPP implementation in current CVS build

2002-01-28 Thread Alex Judd

I'm pretty sure there is definitely something broken in the CVS SMPP code 
as with a default CIMD SMSC in the config file the program works fine, and 
with the default SMPP SMSC in the config file kannel has the mutex locking 
problem

CIMD

# gw/bearerbox cimd.conf
System SunOS, release 5.8, version Generic_108528-12, machine sun4u.
Libxml version 20413.
Using checking malloc.

2002-01-28 15:02:04 [0] INFO: Added logfile `logs/kannel.log' with level 
`0'.
2002-01-28 15:02:04 [0] INFO: 
2002-01-28 15:02:04 [0] INFO: Kannel bearerbox II version cvs starting
2002-01-28 15:02:04 [0] INFO: Started access logfile `logs/access.log'.
2002-01-28 15:02:04 [0] INFO: SSL not supported, no SSL initialization 
done.
2002-01-28 15:02:04 [0] DEBUG: HTTP: Opening server at port 13000.
2002-01-28 15:02:04 [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
2002-01-28 15:02:04 [0] DEBUG: Started thread 2 
(gwlib/http.c:server_thread)
2002-01-28 15:02:04 [0] DEBUG: Started thread 3 
(gw/bb_http.c:httpadmin_run)
2002-01-28 15:02:04 [0] DEBUG: starting smsbox connection module
2002-01-28 15:02:04 [0] DEBUG: Started thread 4 (gw/bb_boxc.c:smsboxc_run)
^C2002-01-28 15:02:04 [0] WARNING: Killing signal received, shutting 
down...

SMPP

# gw/bearerbox smpp.conf
System SunOS, release 5.8, version Generic_108528-12, machine sun4u.
Libxml version 20413.
Using checking malloc.

2002-01-28 15:02:17 [0] INFO: Added logfile `logs/kannel.log' with level 
`0'.
2002-01-28 15:02:17 [0] INFO: 
2002-01-28 15:02:17 [0] INFO: Kannel bearerbox II version cvs starting
2002-01-28 15:02:17 [0] INFO: Started access logfile `logs/access.log'.
2002-01-28 15:02:17 [0] INFO: SSL not supported, no SSL initialization 
done.
2002-01-28 15:02:17 [0] DEBUG: HTTP: Opening server at port 13000.
2002-01-28 15:02:17 [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
2002-01-28 15:02:17 [0] DEBUG: Started thread 2 
(gwlib/http.c:server_thread)
2002-01-28 15:02:17 [0] DEBUG: Started thread 3 
(gw/bb_http.c:httpadmin_run)
2002-01-28 15:02:17 [0] DEBUG: starting smsbox connection module
2002-01-28 15:02:17 [0] DEBUG: Started thread 4 (gw/bb_boxc.c:smsboxc_run)
2002-01-28 15:02:17 [0] DEBUG: Started thread 5 (gw/smsc_smpp.c:io_thread)
2002-01-28 15:02:17 [0] DEBUG: Started thread 6 (gw/smsc_smpp.c:io_thread)
2002-01-28 15:02:17 [0] DEBUG: Started thread 7 
(gw/bb_smscconn.c:sms_router)
2002-01-28 15:02:17 [5] PANIC: mutex_lock: Managed to lock the mutex 
twice!

Ideas??

Alex

-- 
Alex Judd
http://www.enpocket.com/





Re: SMPP implementation in current CVS build

2002-01-28 Thread Alex Judd

> > 2002-01-27 19:08:48 [5] PANIC: mutex_lock: Managed to lock the 
mutex twice!
> 
> Alex and Nisan, can you both please check if the recent change I
> commited to smsc_smpp.c has broke something for you? Even while I
> think it should not.

The version I checked out from cvs is pre those changes so it can't be 
those. I'll have a look further. BTW this is on Solaris 2.8 which 
shouldn't really make any difference imho.

Alex





Re: SMPP implementation in current CVS build

2002-01-27 Thread Alex Judd

> We havent seen this behavior. Please could you send us some beaererbox logs.

2002-01-27 19:08:48 [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
2002-01-27 19:08:48 [0] DEBUG: Started thread 2 
(gwlib/http.c:server_thread)
2002-01-27 19:08:48 [0] DEBUG: Started thread 3 
(gw/bb_http.c:httpadmin_run)
2002-01-27 19:08:48 [0] DEBUG: starting smsbox connection module
2002-01-27 19:08:48 [0] DEBUG: Started thread 4 (gw/bb_boxc.c:smsboxc_run)
2002-01-27 19:08:48 [0] DEBUG: Started thread 5 (gw/smsc_smpp.c:io_thread)
2002-01-27 19:08:48 [0] DEBUG: Started thread 6 (gw/smsc_smpp.c:io_thread)
2002-01-27 19:08:48 [0] DEBUG: Started thread 7 
(gw/bb_smscconn.c:sms_router)
2002-01-27 19:08:48 [5] PANIC: mutex_lock: Managed to lock the mutex 
twice!

and config file part

group = smsc
smsc-id = "OurID"
smsc = smpp
host = 999.999.999.999
port = 999
receive-port=999
smsc-username = "username"
smsc-password = "password"
system-type="VMA"
address-range=""

(all the ports and IPs are correct in the real file)

Thanks :)

Alex





SMPP implementation in current CVS build

2002-01-27 Thread Alex Judd

Just my luck that I upgrade to a SMPP connection and have lots of fun 
trying to get Kannel to run with it :) From my (brief) investigations it 
looks like the way that gwthread_create is implemented has changed - so 
that the old format of the function passes the wrong parameters to it - 
for example:

smsc_emi2.c:  gwthread_create(emi2_listener, conn)) == -1)
smsc_emi2.c:if ((privdata->sender_thread = 
gwthread_create(emi2_sender, conn)) == -1) {
smsc_smpp.c:smpp->transmitter = gwthread_create(io_thread, 
io_arg_create(smpp, 1));
smsc_smpp.c:smpp->receiver = gwthread_create(io_thread, 
io_arg_create(smpp, 0));

With the SMPP code this causes the mutex lock code to try and lock the 
same mutex twice and hence panics the box.

Before I look into moving the smpp code to a format similar to smsc_emi2  
or smsc_http has anyone already done this or is there a quick way around 
this?

Alex

-- 
Alex Judd
http://www.enpocket.com/





Re: clashing unified-prefix?

2002-01-26 Thread Alex Judd

> > I see the dilema and was just thinking of how to solve this with a
> > kludge in the unified-prefix itself, but I can't see one :((
> > 
> > You may be right here, so that a smsc specific unified-prefix would
> > fix this problems.
> 
> any comments on producing a patch for this from the other?!
> 
> Can someone fix Jakob's dilemma with the set of directives we
> currently have?
> 
> Jakob, can you provide a patch for this to be smsc-id specific?
> 
> Stipe

The problem is that unified=prefix is handled at the  bearerbox box 
connection module level and not the SMSC protocol level so it would either 
need to be moved up to smsc code level (not an attractive choice) or have 
SMSC specific conditional statements in the bb_smscconn.c

Probably the best way to go is to have the ability for a global prefix at 
core group level and then smsc group definitions as well which can be 
checked in bb_smscconn

Anyone else agree?

Alex

-- 
Alex Judd
http://www.enpocket.com/





Re: FW: [PATCH] smsc_at2.c not counting escape caracters (gsm7bit)

2002-01-24 Thread Alex Judd

The changes make sense to me including a minor fix for error handling and 
the major flow changes are well commented so if someone can test in a live 
environment I would vote for commiting.

Alex

On Thu, 24 Jan 2002, Oded Arbel wrote:

> Hi list.
> 
> Since we're already discussing the at2 gsm7bit escaping issue, I would
> like to resubmit my suggested fix for the problem (as apparently it did
> not arrive to the proper authorities the first time). my apologies if
> you are reading it for the second time.
> I would like to hear any comments on the patch, especially if it is
> rejected.





  1   2   >