sendsms interface

2002-11-18 Thread Kita B. Ndara
Hi,

 I have a web2sms system whereby I collect and
reformat messages from the web, then push them into my
kannel through the sendsms interface. If I push
messages rapidly through the sendsms interface using
lynx -dump '...', intermitently the interface goes
silent (i.e. empty response), and the message doesn't
get sent. Any ideas why? Is there some kind of
throughput limit? What can I do about it? Is there a
better way to send many messages through the sendsms
interface? 

Thanks.

B

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com




Bug in wap_push_ppg.c ?

2002-11-18 Thread Paul Keogh

The push response seems to be inconsistent with the DTD for
this spec.

Specifically, the child element response-result is outside 
the push-response element when according to the DTD and the PAP spec 
(wap-247,section 8.3 page 21) it should be inside the push-response 
element. Attached is a patch which may not apply as my srcs are
a little out of sync...

Patch:

RCS file: /home/cvs/cvsroot/wirelesswindow/gw/wap_push_ppg.c,v
retrieving revision 1.28
diff -r1.28 wap_push_ppg.c
2774d2773
/push-response
2786a2786
 /push-response
2794c2794,2795
 debug(wap.push.ppg, 0, PPG: send_push_response: telling pi);
---
 debug(wap.push.ppg, 0, PPG: send_push_response: telling pi (%s),
   octstr_get_cstr (reply_body));

Paul Keogh
ANAM Wireless Internet Solutions
http://www.anam.com 
+353 1 284 7555 (wired)   +353 86 234 6047 (wireless)
Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland
 




Re: SDU-Size and UAProfiles

2002-11-18 Thread Aarno Syvänen
Hi Vjacheslav,

Long way to do this is:

a) take value of Profile header, fetch the url.
b) parse the document, get Client SDU size here
b) store size, use stored value later

Yes, there are rdf parsers around (one called sirpac, at least,
if memory servers me rigth).

If you are interested doing, I would like to help you.

There are of course short cuts:

a) store data of all phone models to a database (not all phones do
User Agent Profiling, of course).

b) not *parse* the document, just do octstr_search for client SDU size.

In long run, UA prof would be useful, because profile contains lots of
data about phone. You would be able customize your application for
a particular phone.

Aarno

On Thursday, November 14, 2002, at 08:25 AM, Vjacheslav Chekushin wrote:


Hi, list.
New phones go to market, they support new specifications...

I have tested how Nokia 7210 handles MMS.
The problem is that this phone (at least with my soft version)
don't use SDU-Size parameter but UAprofiling
(http://nds.nokia.com/uaprof/N7210r100.xml).
So WAP gw take default value 1400 and phone can't fetch mms from 
server.
Now I simply remove SDU-Size checking from kannel, but it's temporary 
solution.
What people think about this?

--
Vjacheslav Chekushinmailto:[EMAIL PROTECTED]
Latvian Mobile Phone Companyhttp://www.lmt.lv







ringing tones

2002-11-18 Thread Dejan Djusic








Dear Sirs,



Is it possible to send ringing tones, picture messages, etcc.. by Kannel
gateway.



Best regards,



Dejan Djusic










Re: wap push receiving on siemens

2002-11-18 Thread Aarno Syvänen
Hello,

there is a bug in ppg, it sends host header to the phone, even though 
this one
is meaningful only for pi-ppg transaction. So can you add function 
call http_
header_remove_all(push_headers, Host) into module gw/wap_push_ppg.c,
into function pap_request thread, before test if (!headers_acceptable).

Aarno

On Saturday, November 16, 2002, at 01:13 PM, Szymon Stasik wrote:

Hello,

I'm tring the wap push service with different phones. It works for me 
with all newer ericssons, nokia 3410, 6310, motorola v66, however I 
have a problem with siemens me45 and mt50 (same as m50). Kannel 
version is 1.2.0

the problem is that wap push message shows in sms inbos as data 
mesasge containing some strange characters ending with something like 
'Host' header and sending user agent.

While checking push settings in a phone - everyting seems to be ok - 
full access for receiving push messages.

maybe someone have some test example that works with siemens?

I am using folowing test (problem exists for both si and sl messages; 
all works for any other phones):

$test_ppg -c si 
http://127.0.0.1:8181/cgi-bin/wap-push.cgi?username=***''password=*** 
si.xml pap.xml

here is data http-posted to kannel:

POST /cgi-bin/wap-push.cgi?username=***password=*** HTTP/1.1
Host: 127.0.0.1:8181
Content-Type: multipart/related; boundary=asdlfkjiurwghasf; 
type=application/xml
X-WAP-Application-Id: http://www.efigence.com:*
Content-Length: 1175


--asdlfkjiurwghasf
Content-Type: application/xml
?xml version=1.0?
!DOCTYPE pap PUBLIC -//WAPFORUM//DTD PAP//EN
  http://www.wapforum.org/DTD/pap_1.0.dtd;
pap
push-message push-id=[EMAIL PROTECTED]
  deliver-before-timestamp=2002-11-28T06:45:00Z
  deliver-after-timestamp=2002-10-28T06:45:00Z
  progress-notes-requested=false
  address
   address-value=[EMAIL PROTECTED]
  /address
  quality-of-service
priority=low
delivery-method=unconfirmed
network-required=true
network=GSM
bearer-required=true
bearer=SMS
  /quality-of-service
/push-message
/pap
			
			
--asdlfkjiurwghasf
Content-Type: text/vnd.wap.si
?xml version=1.0?
!DOCTYPE si PUBLIC -//WAPFORUM//DTD SI 1.0//EN
 http://www.wapforum.org/DTD/si.dtd;
si
indication href=http://wap.sth.pl/test/g.wml;
si-id=[EMAIL PROTECTED]
action=signal-high
created=2002-10-28T15:23:15Z
si-expires=2002-11-28T00:00:00Z
Some tested content
/indication
/si


--asdlfkjiurwghasf--



regards,

Szymon







Re: Bug in wap_push_ppg.c ?

2002-11-18 Thread Aarno Syvänen
Yeah. Thanks for the report.

Aarno

On Monday, November 18, 2002, at 02:52 PM, Paul Keogh wrote:



The push response seems to be inconsistent with the DTD for
this spec.

Specifically, the child element response-result is outside
the push-response element when according to the DTD and the PAP spec
(wap-247,section 8.3 page 21) it should be inside the push-response
element. Attached is a patch which may not apply as my srcs are
a little out of sync...

Patch:

RCS file: /home/cvs/cvsroot/wirelesswindow/gw/wap_push_ppg.c,v
retrieving revision 1.28
diff -r1.28 wap_push_ppg.c
2774d2773
 	 /push-response
2786a2786

		  /push-response

2794c2794,2795
 debug(wap.push.ppg, 0, PPG: send_push_response: telling pi);
---

debug(wap.push.ppg, 0, PPG: send_push_response: telling pi 
(%s),
		octstr_get_cstr (reply_body));

Paul Keogh
ANAM Wireless Internet Solutions
http://www.anam.com
+353 1 284 7555 (wired)   +353 86 234 6047 (wireless)
Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland








Re: ringing tones

2002-11-18 Thread me
Dear Sir,

 Is it possible to send ringing tones, picture messages, etcc.. by
 Kannel gateway.

Everything is possible as long as your TELCO let you specify the UDH header.

Cheers,
Toni







automatic starting again wapbox

2002-11-18 Thread Yury Mikhienko
Hi all!

I use kannel v.1.2.1 on Linux system and last time I have noticed strange lines in 
wapbox.log (starting at [2002-11-14 13:00:52]):

2002-11-14 13:00:51 [10] DEBUG:   data: 47 61 74 65 77 61 79 3a   Gateway:
2002-11-14 13:00:51 [10] DEBUG:   data: 20 4b 61 6e 6e 65 6c 2fKannel/
2002-11-14 13:00:51 [10] DEBUG:   data: 31 2e 32 2e 31 0d 0a 58   1.2.1..X
2002-11-14 13:00:51 [10] DEBUG:   data: 2d 57 41 50 2d 53 65 73   -WAP-Ses
2002-11-14 13:00:51 [10] DEBUG:   data: 73 69 6f 6e 2d 49 44 3a   sion-ID:
2002-11-14 13:00:51 [10] DEBUG:   data: 20 31 0d 0a 41 75 74 681..Auth
2002-11-14 13:00:51 [10] DEBUG:   data: 6f 72 69 7a 61 74 69 6f   orizatio
2002-11-14 13:00:51 [10] DEBUG:   data: 6e 3a 20 42 61 73 69 63   n: Basic
2002-11-14 13:00:51 [10] DEBUG:   data: 20 5a 32 31 36 0d 0a 0dZ216...
2002-11-14 13:00:51 [10] DEBUG:   data: 0a.
2002-11-14 13:00:51 [10] DEBUG: Octet string dump ends.
2002-11-14 13:00:51 [9] DEBUG: HTTP: Status line: HTTP/1.0 503 Service Unavailable
2002-11-14 13:00:51 [7] DEBUG: get_cookies: Examining header (Server: 
Squid/2.4.STABLE7)
2002-11-14 13:00:51 [7] DEBUG: get_cookies: Examining header (Mime-Version: 1.0)
2002-11-14 13:00:51 [7] DEBUG: get_cookies: Examining header (Date: Thu, 14 Nov 2002 
10:00:51 GMT)
2002-11-14 13:00:51 [7] DEBUG: get_cookies: Examining header (Content-Type: text/html)
2002-11-14 13:00:51 [7] DEBUG: get_cookies: Examining header (Content-Length: 786)
2002-11-14 13:00:51 [7] DEBUG: get_cookies: Examining header (Expires: Thu, 14 Nov 
2002 10:00:51 GMT)
2002-11-14 13:00:51 [7] DEBUG: get_cookies: Examining header (X-Squid-Error: 
ERR_DNS_FAIL 0)
2002-11-14 13:00:51 [7] DEBUG: get_cookies: Examining header (X-Cache: MISS from 
wapgate.mobicomk.donpac.ru)
2002-11-14 13:00:51 [7] DEBUG: get_cookies: Examining header (X-Cache-Lookup: MISS 
from wapgate.mobicomk.donpac.ru:)
2002-11-14 13:00:51 [7] DEBUG: get_cookies: Examining header (Proxy-Connection: 
keep-alive)
2002-11-14 13:00:51 [7] DEBUG: get_cookies: End
2002-11-14 13:00:51 [7] WARNING: WSP: Content type text/html not supported by 
client, deleting body.
2002-11-14 13:00:51 [1] DEBUG: WSP: machine 0x80d8848, state CONNECTED, event 
S-MethodResult.req
2002-11-14 13:00:51 [1] DEBUG: WSP: method 5, state PROCESSING, event 
S-MethodResult.req
2002-11-14 13:00:51 [1] DEBUG: WSP 1/5: New method state REPLYING
2002-11-14 13:00:51 [1] DEBUG: WSP 1: New state CONNECTED
2002-11-14 13:00:51 [5] DEBUG: WTP: resp_machine 5, state RESULT_WAIT, event 
TR-Result.req.
2002-11-14 13:00:51 [5] DEBUG: WTP 5: New state RESULT_RESP_WAIT
2002-11-14 13:00:52 [0] INFO: Added logfile `/var/log/kannel/wapbox.log' with level 
`0'.
2002-11-14 13:00:52 [0] INFO: Starting to log to file /var/log/kannel/wapbox.log level 0
2002-11-14 13:00:52 [0] DEBUG: no syslog parameter
2002-11-14 13:00:52 [0] DEBUG: Could not open access-log
2002-11-14 13:00:52 [0] DEBUG: map_url_max = -1
2002-11-14 13:00:52 [0] INFO: 

2002-11-14 13:00:52 [0] INFO: Kannel wapbox version 1.2.1 starting up.
2002-11-14 13:00:52 [0] DEBUG: Started thread 1 (wap/wsp_session.c:main_thread)
2002-11-14 13:00:52 [0] DEBUG: Started thread 2 (wap/wsp_unit.c:main_thread)
2002-11-14 13:00:52 [0] DEBUG: Started thread 3 (wap/wsp_push_client.c:main_thread)
2002-11-14 13:00:52 [0] DEBUG: Started thread 4 (wap/timers.c:watch_timers)
2002-11-14 13:00:52 [0] DEBUG: Started thread 5 (wap/wtp_resp.c:main_thread)
2002-11-14 13:00:52 [0] DEBUG: Started thread 6 (gw/wap-appl.c:main_thread)
2002-11-14 13:00:52 [0] DEBUG: Started thread 7 (gw/wap-appl.c:return_replies_thread)
2002-11-14 13:00:52 [0] INFO: Connected to bearerbox at 217.106.95.134 port 9201.
2002-11-14 13:00:52 [0] DEBUG: Started thread 8 (gw/heartbeat.c:heartbeat_thread)
2002-11-14 13:00:52 [5] INFO: WTP_RESP: resp_machine_find_or_create: ack received, yet 
having no machine

Looks like another (?) instance of wapbox is started. Is it correct situation or wrong?

And after it works for some hours, the wapbox is lost :(( 
in bearerbox.log:
2002-11-14 13:00:51 [21] DEBUG: Thread 21 (gw/bb_boxc.c:boxc_sender) terminates.
2002-11-14 13:00:51 [20] DEBUG: Thread 20 (gw/bb_boxc.c:function) terminates.
...
2002-11-14 13:00:52 [12] DEBUG: Started thread 22 (gw/bb_boxc.c:function)
...
2002-11-14 13:00:52 [22] DEBUG: Started thread 23 (gw/bb_boxc.c:boxc_sender)
...
2002-11-14 19:51:04 [22] DEBUG: boxc_receiver: got wdp from wapbox
2002-11-14 19:51:04 [10] DEBUG: udp: sending message
2002-11-14 19:51:05 [9] DEBUG: datagram received
2002-11-14 19:51:05 [23] DEBUG: boxc_sender: sent message to 217.106.95.134
2002-11-14 19:51:05 [9] DEBUG: datagram received
2002-11-14 19:51:05 [23] DEBUG: boxc_sender: sent message to 217.106.95.134
2002-11-14 19:51:10 [9] DEBUG: datagram received
2002-11-14 19:51:10 [23] DEBUG: boxc_sender: sent message to 217.106.95.134
2002-11-14 19:51:11 [9] DEBUG: datagram received
2002-11-14 19:51:11 [23] DEBUG: 

Re: [FYI] smsbox routing patch commited

2002-11-18 Thread Nisan Bloch

Hi Stipe
There is a small problem in the smsbox routing patch.
I have a configuration as before your patch. i.e. no smsbox-id and no
smsbox-route group. When smsbox receives a dlr notification from bbox we
get the following error. The dlrurl still gets called however.

2002-11-18 14:45:38 [5] DEBUG: Found entry, row[0]=31, row[1]=,
row[2]=http://newsite.clickatell.com:13303/test_dlr?from=%PapiMsgId=XXtext=Result:%d,SMSC:%i,Text:%A,
row[3]=tester, row[4]=(null) 
2002-11-18 14:45:38 [5] DEBUG: created DLR message for URL
http://newsite.clickatell.com:13303/test_dlr?from=%PapiMsgId=XXtext=Result:%d,SMSC:%i,Text:%A

2002-11-18 14:45:38 [5] DEBUG: DLR not deleted because we wait on more
reports 
2002-11-18 14:45:38 [5] ERROR: Could not route message to smsbox id
(null), smsbox is gone!

Smsboxes are running just fine.. they are definately there ;-)
Nisan
Nisan


Re: CVS SMPP Optional parameters

2002-11-18 Thread Nisan Bloch
Hi Stipe

We are experiencing problems with the current cvs with the optional smpp 
parameters.
Here is a debug log. I will try look into it further, but seen as you have 
just done this code it may be quicker for u to look.

2002-11-18 14:10:40 [0] INFO: Kannel bearerbox II version cvs- starting
2002-11-18 14:10:40 [0] INFO: MAIN: Start-up done, entering mainloop
2002-11-18 14:10:40 [7] DEBUG: sms_router: time to sleep
2002-11-18 14:10:40 [7] DEBUG: sms_router: list_len = 0
2002-11-18 14:10:40 [6] DEBUG: SMPP[log1]: Sending PDU:
2002-11-18 14:10:40 [6] DEBUG: SMPP PDU 0x912c968 dump:
2002-11-18 14:10:40 [6] DEBUG: type_name: bind_receiver
2002-11-18 14:10:40 [6] DEBUG: command_id: 1 = 0x0001
2002-11-18 14:10:40 [6] DEBUG: command_status: 0 = 0x
2002-11-18 14:10:40 [6] DEBUG: sequence_number: 0 = 0x
2002-11-18 14:10:40 [6] DEBUG: system_id: 
2002-11-18 14:10:40 [6] DEBUG: password: 
2002-11-18 14:10:40 [6] DEBUG: system_type: 
2002-11-18 14:10:40 [6] DEBUG: interface_version: 52 = 0x0034
2002-11-18 14:10:40 [6] DEBUG: addr_ton: 0 = 0x
2002-11-18 14:10:40 [6] DEBUG: addr_npi: 0 = 0x
2002-11-18 14:10:40 [6] DEBUG: address_range: 
2002-11-18 14:10:40 [6] DEBUG: SMPP PDU dump ends.
2002-11-18 14:10:41 [5] DEBUG: SMPP[log1]: Sending PDU:
2002-11-18 14:10:41 [5] DEBUG: SMPP PDU 0x912caa0 dump:
2002-11-18 14:10:41 [5] DEBUG: type_name: bind_transmitter
2002-11-18 14:10:41 [5] DEBUG: command_id: 2 = 0x0002
2002-11-18 14:10:41 [5] DEBUG: command_status: 0 = 0x
2002-11-18 14:10:41 [5] DEBUG: sequence_number: 1 = 0x0001
2002-11-18 14:10:41 [5] DEBUG: system_id: 
2002-11-18 14:10:41 [5] DEBUG: password: 
2002-11-18 14:10:41 [5] DEBUG: system_type: 
2002-11-18 14:10:41 [5] DEBUG: interface_version: 52 = 0x0034
2002-11-18 14:10:41 [5] DEBUG: addr_ton: 0 = 0x
2002-11-18 14:10:41 [5] DEBUG: addr_npi: 0 = 0x
2002-11-18 14:10:41 [5] DEBUG: address_range: 
2002-11-18 14:10:41 [5] DEBUG: SMPP PDU dump ends.
2002-11-18 14:10:41 [6] DEBUG: Optional parameter length read as 0
2002-11-18 14:10:41 [6] DEBUG: Optional parameter length read as -1
2002-11-18 14:10:41 [6] PANIC: gwlib/octstr.c:275: octstr_copy_real: 
Assertion `len = 0' failed.


Nisan




[BUG] smsc stop start

2002-11-18 Thread Nisan Bloch
Hi All

There is a bug in the smsc stop/start admin interface. Before I fix it, I 
want to check that the soln we propose will work for the list.

The scenario is as follows:
Assume  you have more than one smsc group with the same smsc-id. eg one 
provider with 2 different host.
Ok when you use the stop-smsc code it stops the first smsc in the list with 
that smsc-id and not the others.
If you then start and stop and start again one ends up with both the links 
up, but not necessary to the two different hosts.

eg.. snips from status page
[snip]
linka8SMPP:web1.host.com:16252/16252:Clickatell: (online 21s, rcvd 
0, sent 0, failed 0, queued 0 dlrq 1 msgs)
linka8SMPP:web2.host.com:26252/26252:Clickatell: (online 24s, rcvd 
0, sent 0, failed 0, queued 0 dlrq 1 msgs)
[end snip]
[snip]
linka8SMPP:web1.host.com:16252/16252:Clickatell: (dead, rcvd 0, 
sent 0, failed 0, queued 0 dlrq 1 msgs)
linka8SMPP:web2.host.com:26252/26252:Clickatell: (online 73s, rcvd 
0, sent 0, failed 0, queued 0 dlrq 1 msgs)
[end snip]
[snip]
linka8SMPP:web2.host.com:26252/26252:Clickatell: (online 107s, 
rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
linka8SMPP:web1.host.com:16252/16252:Clickatell: (online 1s, rcvd 
0, sent 0, failed 0, queued 0 dlrq 1 msgs)
[end snip]
[snip]
linka8SMPP:web2.host.com:26252/26252:Clickatell: (dead, rcvd 0, 
sent 0, failed 0, queued 0 dlrq 1 msgs)
linka8SMPP:web1.host.com:16252/16252:Clickatell: (online 16s, rcvd 
0, sent 0, failed 0, queued 0 dlrq 1 msgs)
[end snip]
[snip]
linka8SMPP:web1.host.com:16252/16252:Clickatell: (online 31s, rcvd 
0, sent 0, failed 0, queued 0 dlrq 1 msgs)
linka8SMPP:web1.host.com:16252/16252:Clickatell: (online 1s, rcvd 
0, sent 0, failed 0, queued 0 dlrq 1 msgs)
[end snip]


I propose that the stop-smsc admin interface should stop ALL smsc links 
with the given smsc-id, similarly start-smsc should start/restart all smsc 
links with the given smsc-id


In addition there is a new memory leak. For each stop/start we end up with 
the following
2002-11-18 15:42:45 [0] DEBUG: Allocated by list_create_real at 
gwlib/list.c:71
2002-11-18 15:42:45 [0] DEBUG: Claimed by smsc2_start at gw/bb_smscconn.c:332


Nisan 




[BUG] smsbox memleak

2002-11-18 Thread Nisan Bloch
Hi All

There is a new memory leak in the cvs, in smsbox.

For each dlr ack.. and probabally sms-service

2002-11-18 15:59:11 [0] DEBUG: Allocated by octstr_create_from_data_real at 
gwlib/octstr.c:185
2002-11-18 15:59:11 [0] DEBUG: Claimed by parse_url at gwlib/http.c:1156
2002-11-18 15:59:11 [0] DEBUG: Contents of area (first 16 bytes):
2002-11-18 15:59:11 [0] DEBUG: 48 5a 0c 09 16 00 00 00 17 00 00 00 00 00 00 00
2002-11-18 15:59:11 [0] DEBUG: Area 0x90c2960, size 16, max_size 16
2002-11-18 15:59:11 [0] DEBUG: Allocated by octstr_create_from_data_real at 
gwlib/octstr.c:185
2002-11-18 15:59:11 [0] DEBUG: Claimed by parse_url at gwlib/http.c:1156
2002-11-18 15:59:11 [0] DEBUG: Contents of area (first 16 bytes):


Nisan




Re: CVS SMPP Optional parameters

2002-11-18 Thread Nisan Bloch
At 12:20 AM 11/18/02 +0100, Stipe Tolj wrote:



No, the client side (smsc_smpp.c) has yet not been modified by us to
use the optional parameters.


ok.. i am about to do this to replace our msgpayload patch. Do you have any 
utils code to get and set the optional parameters in the PDU?

Nisan

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: [BUG] smsc stop start

2002-11-18 Thread Andreas Fink
I was thinking of exactly the reverse. How do I stop /start a single link if I have mutiple ones name the same way (for DLR grouping this is required). Maybe we should have the SMSC link be named unique and group them by some other name for DLR processing.




On Montag, November 18, 2002, at 07:05  Uhr, Nisan Bloch wrote:

Hi All

There is a bug in the smsc stop/start admin interface. Before I fix it, I want to check that the soln we propose will work for the list.

The scenario is as follows:
Assume  you have more than one smsc group with the same smsc-id. eg one provider with 2 different host.
Ok when you use the stop-smsc code it stops the first smsc in the list with that smsc-id and not the others.
If you then start and stop and start again one ends up with both the links up, but not necessary to the two different hosts.

eg.. snips from status page
[snip]
linka8SMPP:web1.host.com:16252/16252:Clickatell: (online 21s, rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
linka8SMPP:web2.host.com:26252/26252:Clickatell: (online 24s, rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
[end snip]
[snip]
linka8SMPP:web1.host.com:16252/16252:Clickatell: (dead, rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
linka8SMPP:web2.host.com:26252/26252:Clickatell: (online 73s, rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
[end snip]
[snip]
linka8SMPP:web2.host.com:26252/26252:Clickatell: (online 107s, rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
linka8SMPP:web1.host.com:16252/16252:Clickatell: (online 1s, rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
[end snip]
[snip]
linka8SMPP:web2.host.com:26252/26252:Clickatell: (dead, rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
linka8SMPP:web1.host.com:16252/16252:Clickatell: (online 16s, rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
[end snip]
[snip]
linka8SMPP:web1.host.com:16252/16252:Clickatell: (online 31s, rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
linka8SMPP:web1.host.com:16252/16252:Clickatell: (online 1s, rcvd 0, sent 0, failed 0, queued 0 dlrq 1 msgs)
[end snip]


I propose that the stop-smsc admin interface should stop ALL smsc links with the given smsc-id, similarly start-smsc should start/restart all smsc links with the given smsc-id


In addition there is a new memory leak. For each stop/start we end up with the following
2002-11-18 15:42:45 [0] DEBUG: Allocated by list_create_real at gwlib/list.c:71
2002-11-18 15:42:45 [0] DEBUG: Claimed by smsc2_start at gw/bb_smscconn.c:332


Nisan 


Andreas Fink
Global Networks, Inc.

--
Tel: +41-61-333  Fax: +41-61-6932729   Mobile: +41-79-2457333
Global Networks, Inc. Clarastrasse 3, 4058 Basel, Switzerland
Web: http://www.global-networks.ch/  [EMAIL PROTECTED]
--
Member of the GSM Association



Re: [BUG] smsc stop start

2002-11-18 Thread Nisan Bloch

At 08:21 PM 11/18/02 +0100, Andreas Fink wrote:
I was thinking of exactly the
reverse. How do I stop /start a single link if I have mutiple ones name
the same way (for DLR grouping this is required). Maybe we should have
the SMSC link be named unique and group them by some other name for DLR
processing. 

mm.. not sure.. we use the smsc-ids for routing (done external to
kannel), then within Kannel multiple links with the same smsc-id are
balanced by Kannel, or are failovers of each other
(connections to the same provider on different ips) -
maybe a name for the links that is distinct from the smsc-id?
nisan



On Montag, November 18, 2002, at
07:05 Uhr, Nisan Bloch wrote: 
Hi All 
There is a bug in the smsc stop/start admin interface. Before I fix it, I
want to check that the soln we propose will work for the list. 
The scenario is as follows: 
Assume you have more than one smsc group with the same smsc-id. eg
one provider with 2 different host. 
Ok when you use the stop-smsc code it stops the first smsc in the list
with that smsc-id and not the others. 
If you then start and stop and start again one ends up with both the
links up, but not necessary to the two different hosts. 
eg.. snips from status page 
[snip] 
 linka8
SMPP:web1.host.com:16252/16252:Clickatell: (online 21s, rcvd 0, sent 0,
failed 0, queued 0 dlrq 1 msgs) 
 linka8
SMPP:web2.host.com:26252/26252:Clickatell: (online 24s, rcvd 0, sent 0,
failed 0, queued 0 dlrq 1 msgs) 
[end snip] 
[snip] 
 linka8
SMPP:web1.host.com:16252/16252:Clickatell: (dead, rcvd 0, sent 0, failed
0, queued 0 dlrq 1 msgs) 
 linka8
SMPP:web2.host.com:26252/26252:Clickatell: (online 73s, rcvd 0, sent 0,
failed 0, queued 0 dlrq 1 msgs) 
[end snip] 
[snip] 
 linka8
SMPP:web2.host.com:26252/26252:Clickatell: (online 107s, rcvd 0, sent 0,
failed 0, queued 0 dlrq 1 msgs) 
 linka8
SMPP:web1.host.com:16252/16252:Clickatell: (online 1s, rcvd 0, sent 0,
failed 0, queued 0 dlrq 1 msgs) 
[end snip] 
[snip] 
 linka8
SMPP:web2.host.com:26252/26252:Clickatell: (dead, rcvd 0, sent 0, failed
0, queued 0 dlrq 1 msgs) 
 linka8
SMPP:web1.host.com:16252/16252:Clickatell: (online 16s, rcvd 0, sent 0,
failed 0, queued 0 dlrq 1 msgs) 
[end snip] 
[snip] 
 linka8
SMPP:web1.host.com:16252/16252:Clickatell: (online 31s, rcvd 0, sent 0,
failed 0, queued 0 dlrq 1 msgs) 
 linka8
SMPP:web1.host.com:16252/16252:Clickatell: (online 1s, rcvd 0, sent 0,
failed 0, queued 0 dlrq 1 msgs) 
[end snip] 

I propose that the stop-smsc admin interface should stop ALL smsc links
with the given smsc-id, similarly start-smsc should start/restart all
smsc links with the given smsc-id 

In addition there is a new memory leak. For each stop/start we end up
with the following 
2002-11-18 15:42:45 [0] DEBUG: Allocated by list_create_real at
gwlib/list.c:71 
2002-11-18 15:42:45 [0] DEBUG: Claimed by smsc2_start at
gw/bb_smscconn.c:332 

Nisan 
Andreas Fink

Global Networks, Inc. 
-- 
Tel: +41-61-333 Fax: +41-61-6932729 Mobile:
+41-79-2457333 
Global Networks, Inc. Clarastrasse 3, 4058 Basel, Switzerland 
Web:
http://www.global-networks.ch/
 [EMAIL PROTECTED] 
-- 
Member of the GSM Association 

/blockquote/x-html 


[PATCH] admin, sendsms bind to interface

2002-11-18 Thread Nisan Bloch
Hi All

Patches to the bb_http.c and smsbox.c to allow the admin and sendsms http 
interface to bind to a specified interface.

files patched: gw/smsbox.c, gw/bb_http.c, gwlib/cfg.def

Nisan

--- ../cvs/gateway/gw/smsbox.c Thu Nov 14 12:11:38 2002
+++ ../gateway-cvsup/gw/smsbox.c Sun Nov 17 22:51:45 2002
@@ -44,6 +44,7 @@
static long bb_port;
static int bb_ssl = 0;
static long sendsms_port = 0;
+static Octstr *sendsms_interface = NULL;
static Octstr *smsbox_id = NULL;
static Octstr *sendsms_url = NULL;
static Octstr *sendota_url = NULL;
@@ -2930,6 +2937,7 @@
}
cfg_get_integer(sendsms_port, grp, octstr_imm(sendsms-port));
+ sendsms_interface= cfg_get(grp, octstr_imm(sendsms-interface));
cfg_get_integer(sms_max_length, grp, octstr_imm(sms-length));
#ifdef HAVE_LIBSSL
@@ -2977,7 +2985,7 @@
cfg_get_integer(http_queue_delay, grp, octstr_imm(http-queue-delay));
if (sendsms_port  0) {
- if (http_open_port(sendsms_port, ssl) == -1) {
+ if (http_open_port_if(sendsms_port, ssl,sendsms_interface) == -1) {
if (only_try_http)
error(0, Failed to open HTTP socket, ignoring it);
else
@@ -3111,6 +3119,7 @@
octstr_destroy(reply_requestfailed);
octstr_destroy(reply_couldnotfetch);
octstr_destroy(reply_couldnotrepresent);
+ octstr_destroy(sendsms_interface);
numhash_destroy(black_list);
numhash_destroy(white_list); cfg_destroy(cfg);


--- ../cvs/gateway/gw/bb_http.c Wed Aug 7 21:03:48 2002
+++ ../gateway-cvsup/gw/bb_http.c Sun Nov 17 20:54:04 2002
@@ -24,6 +24,7 @@
static volatile sig_atomic_t httpadmin_running;
static long ha_port;
+static Octstr *ha_interface;
static Octstr *ha_password;
static Octstr *ha_status_pw;
static Octstr *ha_allow_ip;
@@ -364,6 +365,8 @@
if (cfg_get_integer(ha_port, grp, octstr_imm(admin-port)) == -1)
panic(0, Missing admin-port variable, cannot start HTTP admin);
+ ha_interface = cfg_get(grp, octstr_imm(admin-interface));
+
ha_password = cfg_get(grp, octstr_imm(admin-password));
if (ha_password == NULL)
panic(0, You MUST set HTTP admin-password);
@@ -398,7 +401,7 @@
octstr_destroy(ssl_server_key_file);
#endif /* HAVE_LIBSSL */
- http_open_port(ha_port, ssl);
+ http_open_port_if(ha_port, ssl, ha_interface);
if (gwthread_create(httpadmin_run, NULL) == -1)
panic(0, Failed to start a new thread for HTTP admin);
@@ -413,6 +416,7 @@
http_close_all_ports();
gwthread_join_every(httpadmin_run);
octstr_destroy(ha_password);
+ octstr_destroy(ha_interface);
octstr_destroy(ha_status_pw);
octstr_destroy(ha_allow_ip); octstr_destroy(ha_deny_ip);

--- ../cvs/gateway/gwlib/cfg.def Mon Nov 18 08:02:12 2002
+++ ../gateway-cvsup/gwlib/cfg.def Mon Nov 18 11:36:26 2002
@@ -21,6 +21,7 @@
SINGLE_GROUP(core,
OCTSTR(admin-port)
OCTSTR(admin-port-ssl)
+ OCTSTR(admin-interface)
OCTSTR(admin-password)
OCTSTR(status-password)
OCTSTR(admin-deny-ip)
@@ -137,6 +138,7 @@
OCTSTR(bearerbox-host)
OCTSTR(sendsms-port)
OCTSTR(sendsms-port-ssl)
+ OCTSTR(sendsms-interface)
OCTSTR(sendsms-url)
OCTSTR(sendota-url)
OCTSTR(xmlrpc-url) 




send-sms interface - followup question

2002-11-18 Thread Kita B. Ndara
Hi,

 I've been looking at the code in sendms_req_handle()
(smsbox.c). Is it possible that in some instances, the
return str is empty on success? I think that might
account for the error I got earlier...

Please help

Thanks

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com