group = pgsql-connection
id = pgdlr
host = localhost
port = 5432
username = seik
password =
database = vivatel
max-connections = 1

group = dlr-db
id = pgdlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc

my dlr table, its not the default kannel one ..
DROP TABLE dlr;
CREATE TABLE dlr
(
  smsc character varying(40),
  ts character varying(40),
  destination character varying(40),
  source character varying(40),
  service character varying(40),
  url character varying(255),
  mask smallint,
  status smallint,
  boxc character varying(40),
  dlr_id serial NOT NULL,
  tsread timestamp without time zone DEFAULT now(),
  CONSTRAINT dlr_id PRIMARY KEY (dlr_id)
) 
WITH OIDS;

NOTE: its critical to create the table with oids.

and use sqlbox as well : http://www.kannel.org/~mconte/
its damn handy, especially with pgsql for MT charging ..
http://www.kannel.org/pipermail/users/2006-October/000859.html

this is detailed config, start from there

regards

P.S.
never never use packages for production stage.
compile everything from source ... this is my belive.



-----Original Message-----
From: Anand Gupta [EMAIL PROTECTED]
Sent: 24 Юни 2007 г.
To: seik
Subject:smsc name inside mysql dlr 

> Hi Seik,

> seik wrote:
>> man i have no idea what can invoke such strange inserts,
>> from the logs i can tell its event triggered,
>> i hope its environment issue,in case you have no patches implemented on the 
>> initial kannel source.
>>   
> The same thing is beating the hell out of me ;)
> I am using debian deb, not compiled from source.
>> in general kannel reads once the configuration variables
>> what encoding is your configuration file ?
>>   
> Can you please explain what does this mean ?
>> and, whats the lines coming from
>> fgrep -i select  kannel.log | grep 5802
>> i.e. does kannel use the proper SMSC value when DLR comes ...
>>
>>   
> Here is the log entry

> 2007-06-23 21:18:36 [3454] [6] DEBUG: sql: SELECT mask, service, url, 
> source, destination, boxc FROM dlr WHERE smsc='EF' AND ts='5802';

> See in the initial Insert, kannel inserted 'BCDEF', however incase of 
> Select, its looking for 'EF' and this caused it to fail to register the 
> delivery of the message.
>> P.S.
>> move to posgtresql asap :)
>> very handy especially for MT charging based services ..
>>   
> Would you mind sharing the postgresql setup part ? I will try that out.

> Thanks again for all the help, appreciate it.
>> -----Original Message-----
>> From: Anand Gupta [EMAIL PROTECTED]
>> Sent: 23 Юни 2007 г.
>> To: seik
>> Subject:smsc name inside mysql dlr 
>>
>>   
>>> Hi Seik,
>>>     
>>
>>   
>>> Thanks for the reply.
>>>     
>>
>>   
>>> Here is the output as you asked.
>>>     
>>
>>   
>>> seik wrote: 
>>> whats the output of
>>>     
>> mysql>> show create table your_mysql_dlr_table
>>   
>>>   
>>>     
>>
>>   
>>> +-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
>>> | Table | Create Table                                             
>>> & nbsp;                                                             
>>> & nbsp;                                         |
>>> +-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
>>> | dlr   | CREATE TABLE `dlr` (
>>>   `smsc` varchar(100) default NULL,
>>>   `ts` varchar(100) default NULL,
>>>   `destination` varchar(100) default NULL,
>>>   `source` varchar(100) default NULL,
>>>   `service` varchar(100) default NULL,
>>>   `url` varchar(255) default NULL,
>>>   `mask` int(10) default NULL,
>>>   `status` int(10) default NULL,
>>>   `boxc` varchar(40) default NULL
>>> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | 
>>> +-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
>>> 1 row in set (0.00 sec)
>>>     
>>
>>   
>>> i am using pgsql storage atm, but used to have mysql based as well
>>> can you paste several lines from that:
>>> fgrep -i insert path_to_logs/kannel.log
>>>     
>>
>>   
>>>   
>>>     
>>
>>   
>>> My Provider is called ABCDEF inside smsc-id option of kannel.conf
>>>     
>>
>>   
>>> 2007-06-23 21:18:35 [3454] [6] DEBUG: sql: INSERT INTO dlr (smsc,
>>> ts, source, destination, service, url, mask, boxc, status) VALUES
>>> ('BCDEF', '5802', 'xxxxx', 'xxxxxx', 'xxxxx',
>>> 'http://www.xxxxx?type=%d&slid=25&uid=1', '31', '', '0');
>>> 2007-06-23 21:18:35 [3454] [6] DEBUG: sql: INSERT INTO dlr (smsc,
>>> ts, source, destination, service, url, mask, boxc, status) VALUES
>>> ('CDEF', '5803', 'xxxxxx', 'xxxxx', 'xxxxxx',
>>> 'http://www.xxxxxxx?type=%d&slid=26&uid=1', '31', '', '0');
>>> 2007-06-23 21:18:35 [3454] [6] DEBUG: sql: INSERT INTO dlr (smsc,
>>> ts, source, destination, service, url, mask, boxc, status) VALUES
>>> ('DEF', '5804', 'xxxxxx', 'xxxxxx', 'xxxxx',
>>> 'http://www.xxxxxxx?type=%d&slid=27&uid=1', '31', '', '0');
>>> 2007-06-23 21:18:35 [3454] [6] DEBUG: sql: INSERT INTO dlr (smsc,
>>> ts, source, destination, service, url, mask, boxc, status) VALUES
>>> ('EF', '5805', 'xxxxx', 'xxxxxx', 'xxxx',
>>> 'http://www.xxxxxxxx?type=%d&slid=28&uid=1', '31', '', '0');
>>>     
>>
>>   
>>> I also plan to move to postgresql, but would prefer to first resolve the 
>>> above problem.
>>>     
>>
>>
>>
>>   


Reply via email to