RE: Message ID response from SMS Submit Request

2012-11-22 Thread satya
You already have that in %d I believe.


 Original Message 
Subject: Message ID response from SMS Submit Request
From: Christopher Burke christopher.bu...@simulity.com
Date: Fri, November 23, 2012 5:38 am
To: "users@kannel.org" users@kannel.org

Hi,   Is it possible to get as a response the message / sms ID from the sms submission request when using kannel?   Kind Regards   Chris  Christopher Burke Development Team Leader / Software Engineer http://simulity.com Mobile: +44 7590 571 833 Skype:krslynx Sent from my Mobile  NOTICE: This message contains privileged  confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message, you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error, please notify Simulity Labs immediately. Any views expressed in this message are those of the individual sender except where the sender specifically states them to be the view of Simulity Labs Ltd





Re: message id through sendsms url

2009-05-27 Thread Julien Buratto
Hi Piyush,

if you are using smpp tlv and your carrier provides one, yes,
otherwise you need to play with dlr-url and dlr-mask to customize your
own sms messages with a specific id that you can track back when the
dlr comes back from the smsc...

Julien

2009/5/27 Piyush piy...@ibibo.com:
 Hi,
 Can it be possible to get message id instead of 0: accepted for delivery
 in response when I call sendsms url.


 Thanks in advance
 Piyush Khandelwal
 
 ibibo Mail :: Get your FREE mail box with Music, Skins, Greetings and
 Stationery now!



-- 
Julien Buratto



Re: message id through sendsms url

2009-05-27 Thread Alejandro Guerrieri
No, the request is asynchronous, you need to use DLR's instead.
Regards,

Alejandro

On Wed, May 27, 2009 at 3:37 PM, Piyush piy...@ibibo.com wrote:

 Hi,
 Can it be possible to get message id instead of 0: accepted for delivery
 in response when I call sendsms url.


 Thanks in advance
 Piyush Khandelwal
 
 ibibo Mail :: Get your FREE mail box with Music, Skins, Greetings and
 Stationery now! http://mail.ibibo.com/?from=footer



RE: message id through sendsms url

2009-05-20 Thread Abdulraheem Obaisi

I have made a same idea but to save in MS SQL
I think you have to modify your URL like this:

http://192.168.xxx.xxx:13013/cgi-bin/sendsms?username=axpsmserpassword=1q2w3e4rto=123456789123text=testMessagefrom=smsc=SMSC2dlr-mask=31dlr-url=urlencode(http://192.168.xxx.xxx:9876/storeRep.asp?msgid=1state=%dmsisdn=%p

 

and in the  dlr-URL (StorRep) you need to write code to save the id with the 
status like 

%@ Language=VBScript %

!--#include virtual=/adovbs.inc--
%

Dim MyDBconn
Dim cn, rs

Dim M 'End User Message
Dim S
Dim MessageID
Dim MSISDN
Dim Encoding 'SMS Message Encoding
Dim MyAutoID, strSQL, retSQL
M = Request(Type)
S= Request(state)
MessageID=Request(msgid)
MSISDN=Request(msisdn)

If MSISDN =  Then
 response.End
Else

 MyDBconn=Provider=SQLOLEDB.1;User ID=User;Pwd=pwd;Initial Catalog=DB1;Data 
Source=xxx.xxx.xx.xx


 M=Replace(M,',)

  'changed by abdulraheem to general DB
End If

set cn = CreateObject(ADODB.Connection)
 cn.open MyDBconn
 'strSQL =Update sms_outbox set DLR ='  S  ', DLRDate= getdate() where 
recid=('  MessageID  ')
 ' cn.execute(strSQL)
 strSQL = Insert into Info_Delivery_Report (status,msisdn,refid,StatusDate) 
values('  S  ','  MSISDN  ','  MessageID  ',Getdate())

  cn.execute(strSQL)

 response.write(Done)
Function ExecuteID(SQL, DBCon)

 Dim cn, rs
Dim AutoID

 Set cn = CreateObject(ADODB.Connection)
Set rs = CreateObject(ADODB.Recordset)

 With rs
'Prepare the RecordSet
.CursorLocation = adUseServer
.CursorType = adOpenForwardOnly
.LockType = adLockReadOnly
.Source = SELECT @@IDENTITY AS NewID
End With

With cn
.ConnectionString = DBCon
.CursorLocation = adUseServer
.Open
.BeginTrans
.Execute SQL, , adCmdText + adExecuteNoRecords
With rs
.ActiveConnection = cn
.Open , , , , adCmdText
AutoID = rs(0).Value
.Close
End With
.CommitTrans
.Close
End With
Set rs = Nothing
Set cn = Nothing
'If we get here ALL was Okay
ExecuteID = AutoID
End Function

Function myArabicDecoder(text)
On Error Resume Next
Dim var2, var1, i
For i = 0 To ((Len(text) / 4) - 1)
var1 = H  Mid(text, i * 4 + 1, 4)
var2 = var2  ChrW(var1)
Next
myArabicDecoder = var2
End Function

Function myArabicDecoder2(text)
On Error Resume Next
Dim var2, var1, i
For i = 0 To ((Len(text) / 2) - 1)
  fpart = AscW(Mid(text, i * 2 + 1, 1))
  lpart = AscW(Mid(text, i * 2 + 2, 1))
  If Len(CStr(fpart))  2 Then fpart = 0  CStr(fpart)
  If Len(CStr(lpart))  2 Then lpart = 0  CStr(lpart)
var1 = H  fpart  lpart
var2 = var2  chrW(var1)
Next
myArabicDecoder = var2
End Function

%

 

... 
Best Regards 
Eng: Abdulraheem Ali Obaisi 
Software Engineer 



 
 Date: Wed, 20 May 2009 06:59:13 +0200
 From: a...@drlinux.no
 To: piy...@ibibo.com; users@kannel.org
 Subject: Re: message id through sendsms url
 
 Piyush wrote:
  Hi,
  When I call...
  http://XX.XXX.X.XXX:13013/cgi-bin/sendsms?username=xpassword=xto=xxtext=hellofrom=xdlr-mask=31
 
  it returns 0: accepted for delivery.
  But I want it to return message id. So that, later I can check out the 
  status of the message in dlr through these specific message id.
 
 Put your own message id in the dlr-url parameter, like 
 dlr-url=http://myhost/dlr.php?myid=12345status=%d
 
 Kannel will then call your url with the status and with your id, so you 
 can update your database.
 
 See 
 http://www.kannel.org/download/1.4.3/userguide-1.4.3/userguide.html#DELIVERY-REPORTS
 
 Arne
 
 

_
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/

Re: message id through sendsms url

2009-05-19 Thread Alejandro Guerrieri
Piyush,
Sadly, you cannot do it like that. This is because Kannel operates
asynchronously, so it won't be able to return the message id until the smsc
has accepted it. Think about it: the link with the smsc could be down, yet
kannel would accept the message (and place it in it's internal queue).

You need to pass some sort of id on your dlr-url, but cannot be that one,
because you don't have it when you enqueue the message.

Most people inserts the message into a db table before sending, and uses the
id from that table on the dlr-url.

Hope it helps,

Alejandro

On Tue, May 19, 2009 at 4:53 PM, Piyush piy...@ibibo.com wrote:

 Hi,
 When I call...

 http://XX.XXX.X.XXX:13013/cgi-bin/sendsms?username=xpassword=xto=xxtext=hellofrom=xdlr-mask=31

 it returns 0: accepted for delivery.
 But I want it to return message id. So that, later I can check out the
 status of the message in dlr through these specific message id.

 Regards,
 Piyush Khandelwal

 
 ibibo Mail :: Get your mail box with Music, Skins, Greetings and Stationery
 now! http://mail.ibibo.com/?from=footer



Re: message id through sendsms url

2009-05-19 Thread Arne K. Haaje

Piyush wrote:

Hi,
When I call...
http://XX.XXX.X.XXX:13013/cgi-bin/sendsms?username=xpassword=xto=xxtext=hellofrom=xdlr-mask=31

it returns 0: accepted for delivery.
But I want it to return message id. So that, later I can check out the 
status of the message in dlr through these specific message id.


Put your own message id in the dlr-url parameter, like 
dlr-url=http://myhost/dlr.php?myid=12345status=%d


Kannel will then call your url with the status and with your id, so you 
can update your database.


See 
http://www.kannel.org/download/1.4.3/userguide-1.4.3/userguide.html#DELIVERY-REPORTS


Arne




Re: Message ID from SMPP MO

2008-12-30 Thread Nikos Balkanas
Using the from and to fields. These contain phone numbers in the case of 
MO, and can contain a uniquely generated number in the from field in the 
case of MT.


BR,
Nikos
- Original Message - 
From: sangprabv sangpr...@gmail.com

To: Kannel User users@kannel.org
Sent: Tuesday, December 30, 2008 9:39 AM
Subject: Message ID from SMPP MO



Hi,
Is it true that all MO using SMPP protocol never carries Message ID?
Then how to analyze between MO-MT-DLR? How to connect/relate it? TIA.


Willy
You are standing on my toes.








Re: Message ID from SMPP MO

2008-12-30 Thread sangprabv
I don't see the solution here. How can you analyze just using sender and
receiver parameters? 1 sender may sent many MO, then how do you know the
MT for each MO if just using sender and receiver information. We need a
key which connect MO-MT-DLR, so we can analyze correctly. Unfortunatelly
AFAIK, Kannel has no built in function to do it. Using foreign_id may
help, but not all telco send message id in their MO. Currently I have
done the generate UUID in the MO if telco not send message id, but it is
only available in HTTP SMSC, I still look for how to implement it in
other protocol, such as SMPP. And if you generate unique number in from
field, it will mess your MT message to telco, since the 'from' field is
usually used to define the source address. TIA.


Willy
Life, loathe it or ignore it, you can't like it. -- Marvin,
Hitchhiker's Guide to the Galaxy


-Original Message-
From: Nikos Balkanas nbalka...@gmail.com
To: sangprabv sangpr...@gmail.com, Kannel User users@kannel.org
Subject: Re: Message ID from SMPP MO
Date: Tue, 30 Dec 2008 10:34:26 +0200
Mailer: Microsoft Outlook Express 6.00.2900.3138

Using the from and to fields. These contain phone numbers in the case of 
MO, and can contain a uniquely generated number in the from field in the 
case of MT.

BR,
Nikos
- Original Message - 
From: sangprabv sangpr...@gmail.com
To: Kannel User users@kannel.org
Sent: Tuesday, December 30, 2008 9:39 AM
Subject: Message ID from SMPP MO


 Hi,
 Is it true that all MO using SMPP protocol never carries Message ID?
 Then how to analyze between MO-MT-DLR? How to connect/relate it? TIA.


 Willy
 You are standing on my toes.


 





Re: Message ID from SMPP MO

2008-12-30 Thread Nikos Balkanas
Internally kannel matches DLRs to messages using a unique message ID. I 
don't know how you can get that. However, bear in mind that although a 
single sender can send a lot of MOs, these are to different recipients, 
therefore to.


BR,
Nikos

- Original Message - 
From: sangprabv sangpr...@gmail.com

To: Nikos Balkanas nbalka...@gmail.com
Cc: Kannel User users@kannel.org
Sent: Tuesday, December 30, 2008 11:05 AM
Subject: Re: Message ID from SMPP MO



I don't see the solution here. How can you analyze just using sender and
receiver parameters? 1 sender may sent many MO, then how do you know the
MT for each MO if just using sender and receiver information. We need a
key which connect MO-MT-DLR, so we can analyze correctly. Unfortunatelly
AFAIK, Kannel has no built in function to do it. Using foreign_id may
help, but not all telco send message id in their MO. Currently I have
done the generate UUID in the MO if telco not send message id, but it is
only available in HTTP SMSC, I still look for how to implement it in
other protocol, such as SMPP. And if you generate unique number in from
field, it will mess your MT message to telco, since the 'from' field is
usually used to define the source address. TIA.


Willy
Life, loathe it or ignore it, you can't like it. -- Marvin,
Hitchhiker's Guide to the Galaxy


-Original Message-
From: Nikos Balkanas nbalka...@gmail.com
To: sangprabv sangpr...@gmail.com, Kannel User users@kannel.org
Subject: Re: Message ID from SMPP MO
Date: Tue, 30 Dec 2008 10:34:26 +0200
Mailer: Microsoft Outlook Express 6.00.2900.3138

Using the from and to fields. These contain phone numbers in the case 
of

MO, and can contain a uniquely generated number in the from field in the
case of MT.

BR,
Nikos
- Original Message - 
From: sangprabv sangpr...@gmail.com

To: Kannel User users@kannel.org
Sent: Tuesday, December 30, 2008 9:39 AM
Subject: Message ID from SMPP MO



Hi,
Is it true that all MO using SMPP protocol never carries Message ID?
Then how to analyze between MO-MT-DLR? How to connect/relate it? TIA.


Willy
You are standing on my toes.











Re: Message ID from SMPP MO

2008-12-30 Thread Falko Ziemann
MO and MT are not related. This is not a problem of kannel, but of SMS  
in general. If your telco sends you such a ID, they are simply  
guessing which MO is related to which MT, but neither mobile phones  
nor the SS7 protocol (this protocol is used for the over the air  
connection) know such a field.
MT and DLR are related over the SMSC message id. To relate the MT with  
the DLR in your software, you can set your own unique ID inside the  
DLR request.


Regards
Falko

Am 30.12.2008 um 10:12 schrieb Nikos Balkanas:

Internally kannel matches DLRs to messages using a unique message  
ID. I don't know how you can get that. However, bear in mind that  
although a single sender can send a lot of MOs, these are to  
different recipients, therefore to.


BR,
Nikos

- Original Message - From: sangprabv sangpr...@gmail.com
To: Nikos Balkanas nbalka...@gmail.com
Cc: Kannel User users@kannel.org
Sent: Tuesday, December 30, 2008 11:05 AM
Subject: Re: Message ID from SMPP MO


I don't see the solution here. How can you analyze just using  
sender and
receiver parameters? 1 sender may sent many MO, then how do you  
know the
MT for each MO if just using sender and receiver information. We  
need a
key which connect MO-MT-DLR, so we can analyze correctly.  
Unfortunatelly

AFAIK, Kannel has no built in function to do it. Using foreign_id may
help, but not all telco send message id in their MO. Currently I have
done the generate UUID in the MO if telco not send message id, but  
it is

only available in HTTP SMSC, I still look for how to implement it in
other protocol, such as SMPP. And if you generate unique number in  
from
field, it will mess your MT message to telco, since the 'from'  
field is

usually used to define the source address. TIA.


Willy
Life, loathe it or ignore it, you can't like it. -- Marvin,
Hitchhiker's Guide to the Galaxy


-Original Message-
From: Nikos Balkanas nbalka...@gmail.com
To: sangprabv sangpr...@gmail.com, Kannel User users@kannel.org
Subject: Re: Message ID from SMPP MO
Date: Tue, 30 Dec 2008 10:34:26 +0200
Mailer: Microsoft Outlook Express 6.00.2900.3138

Using the from and to fields. These contain phone numbers in  
the case of
MO, and can contain a uniquely generated number in the from field  
in the

case of MT.

BR,
Nikos
- Original Message - From: sangprabv sangpr...@gmail.com
To: Kannel User users@kannel.org
Sent: Tuesday, December 30, 2008 9:39 AM
Subject: Message ID from SMPP MO



Hi,
Is it true that all MO using SMPP protocol never carries Message ID?
Then how to analyze between MO-MT-DLR? How to connect/relate it?  
TIA.



Willy
You are standing on my toes.













Re: Message ID

2008-07-21 Thread seik
use the MO kannel_ID, or create your OWN unique ID as unique DLR id for each MT.

then its simple sql to match them

in case you use sqlbox and pgsql/oracle it is not so complicated task,
dont know for sqlbox backed by mysql

we went a bit further and patched the sqlbox in a view to inject some 
additional data
like our unique ID in a view to match MT-MO traffic and to control the MT/MO 
ratio


-Original Message-
From:  []
Sent: 18 Юли 2008 г.
To: seik
Subject:Message ID 

 Hi,

 I am fairly new to Kannel, and am wondering if there is a parameter in Kannel 
 that links a replied message back to the original message that was sent. I 
 have 
 looked at the parameter list in Kannel and not 100% sure if there is one that 
 works the way I would like it to work. I can track the cell number, but this 
 isn't specific enough for my needs. Please advise.

 Regards

 James






Re: Message ID

2008-07-21 Thread Jovan Kostovski
2008/7/21 seik [EMAIL PROTECTED]:
 use the MO kannel_ID, or create your OWN unique ID as unique DLR id for each 
 MT.

 then its simple sql to match them

 in case you use sqlbox and pgsql/oracle it is not so complicated task,
 dont know for sqlbox backed by mysql

 we went a bit further and patched the sqlbox in a view to inject some 
 additional data
 like our unique ID in a view to match MT-MO traffic and to control the MT/MO 
 ratio

Ok,  I admit I've never used sqlbox ;)

From what you have written, the MT messages sent from Kannel should be
marked with a unique
DLR id, sent to the SMSC and delivered to the subscriber. When the
subscriber sends reply MO
message, the SMSC attaches the same unique ID and sends the data to
Kannel. Right?

What additional data is sent to the SMSC for this purpose?
Some SMPP optional parameters?

BR, Jovan



Re: Message ID

2008-07-19 Thread eduardo . raad
As far as I know there is no ID to relate mo and mt messages as they are 
generated from different modules (mo-smsc and sendsms). I have looked at this 
for a long time but failed to find any solution.

Eduardo
Sent from my BlackBerry® wireless device

-Original Message-
From: info.ubichip [EMAIL PROTECTED]

Date: Fri, 18 Jul 2008 21:15:42 
To: 'James Mubhoyi'[EMAIL PROTECTED]; users@kannel.org
Subject: RE: Message ID


Hello,

Take a look on the sqlbox and the table structure, it should answer your
question.

regards 

-Original Message-
From: James Mubhoyi [mailto:[EMAIL PROTECTED] 
Sent: vendredi 18 juillet 2008 12:41
To: users@kannel.org
Subject: Message ID

Hi,

I am fairly new to Kannel, and am wondering if there is a parameter in
Kannel that links a replied message back to the original message that was
sent. I have looked at the parameter list in Kannel and not 100% sure if
there is one that works the way I would like it to work. I can track the
cell number, but this isn't specific enough for my needs. Please advise.

Regards

James






RE: Message ID

2008-07-19 Thread info.ubichip
I managed to make it by a simple idea, I assumed if someone send a sms
through a specific route, it will come back through the same route, so I
wrote a script using default sms service to search for the last SMS sent to
this recipient, so I could them together. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: vendredi 18 juillet 2008 23:05
To: info.ubichip; 'James Mubhoyi'; users@kannel.org
Subject: Re: Message ID

As far as I know there is no ID to relate mo and mt messages as they are
generated from different modules (mo-smsc and sendsms). I have looked at
this for a long time but failed to find any solution.

Eduardo
Sent from my BlackBerryR wireless device

-Original Message-
From: info.ubichip [EMAIL PROTECTED]

Date: Fri, 18 Jul 2008 21:15:42
To: 'James Mubhoyi'[EMAIL PROTECTED]; users@kannel.org
Subject: RE: Message ID


Hello,

Take a look on the sqlbox and the table structure, it should answer your
question.

regards 

-Original Message-
From: James Mubhoyi [mailto:[EMAIL PROTECTED] 
Sent: vendredi 18 juillet 2008 12:41
To: users@kannel.org
Subject: Message ID

Hi,

I am fairly new to Kannel, and am wondering if there is a parameter in
Kannel that links a replied message back to the original message that was
sent. I have looked at the parameter list in Kannel and not 100% sure if
there is one that works the way I would like it to work. I can track the
cell number, but this isn't specific enough for my needs. Please advise.

Regards

James








Re: Message ID

2008-07-19 Thread James Mubhoyi
info.ubichip info.ubichip at free.fr writes:

 
 Hello,
 
 Take a look on the sqlbox and the table structure, it should answer your
 question.
 
 regards 
 
 

I hadn't looked sqlbox, I will definitely do so, thanks.





Re: Message ID

2008-07-19 Thread James Mubhoyi
info.ubichip info.ubichip at free.fr writes:

 
 I managed to make it by a simple idea, I assumed if someone send a sms
 through a specific route, it will come back through the same route, so I
 wrote a script using default sms service to search for the last SMS sent to
 this recipient, so I could them together. 
 


I toyed with this idea but realised that it will only be the last message I 
will be able to trap. Only being able to trap the last message is the gotcha! I 
am trying to workaround, as recipients will receive any number of messages and 
reply to any in the list sent.





Re: Message ID

2008-07-19 Thread Jovan Kostovski
On Sat, Jul 19, 2008 at 10:47 AM, James Mubhoyi [EMAIL PROTECTED] wrote:
 info.ubichip info.ubichip at free.fr writes:

 I toyed with this idea but realised that it will only be the last message I
 will be able to trap. Only being able to trap the last message is the gotcha! 
 I
 am trying to workaround, as recipients will receive any number of messages and
 reply to any in the list sent.

I don't want to sound discouraging, but this is to complicated and it depends
on too many things: your connection to the SMSC - SMS Center (if you are using
cell phone I don't see how you can do this), the structure of the
operators SMSC
and the operators policy.

The SMSC marks every message with a different ID. In the thing that you want to
accomplish the only parameters that are the same are the numbers of
the recipient
and the sender but they are switched in the reply messages.

Therefore the pairing should be first done on the SMSC side and then
on the SMPP
(Simple message point-to-point protocol [1]) client side (Kannel in this case).

Theoretically speaking, to track the messages the way you want to, you
need to have
SMPP connection to the SMSC so you can send optional PDU (protocol data unit)
parameters to tag the sending message. You'll send the message to the
SMSC with some SMPP
optional parameter, the SMSC will deliver the message to the
recipient, the recipient will
send reply message, the SMSC will somehow pair the messages and set
the same optional
parameter which you send with the original message and when Kannel
receives the reply
message you'll check the value of the optional parameter sent and pair
the messages.

I know it sounds complicated, but from my experience that's the only
way it could be done.
The whole chain goes through one part  where you don't have access,
the operator SMSC.
Talk to your operator and check if you can accomplish this.

If you don't really need it, just forget about this, because it gonna
cost you ;)

[1] www.alvento.com/productos/sms/smpp/smpp34.pdf

BR, Jovan



RE: Message ID

2008-07-18 Thread info.ubichip
Hello,

Take a look on the sqlbox and the table structure, it should answer your
question.

regards 

-Original Message-
From: James Mubhoyi [mailto:[EMAIL PROTECTED] 
Sent: vendredi 18 juillet 2008 12:41
To: users@kannel.org
Subject: Message ID

Hi,

I am fairly new to Kannel, and am wondering if there is a parameter in
Kannel that links a replied message back to the original message that was
sent. I have looked at the parameter list in Kannel and not 100% sure if
there is one that works the way I would like it to work. I can track the
cell number, but this isn't specific enough for my needs. Please advise.

Regards

James






Re: Message ID for MT message DLR in kannel

2008-04-23 Thread Samir Ghodasara
Hi,

I got the partial solution from forums like i can pass my message Id with
dlr-url and So i can track the result.

i am getting the response to submit_sm like..

SMSC returned error code 0x000b (Invalid Destination Address) in
response to submit_sm.

in my application i want the error code also.Is their any way to get error
code in dlr-url response ?.

Regards,
Samir.

On Wed, Apr 23, 2008 at 6:15 PM, Samir Ghodasara [EMAIL PROTECTED]
wrote:

 Hi,

 I am using the gateway-1.4.1. and i want to get delivery report for my
 billing MT message for that i am passing dlr-mask and dlr-url while sending
 the MT message and as DLR response i am getting message id by using %I
 attribute in dlr-url,

 but in the response of /cgi-bin/sendsms URL ,i am getting only 0-Accepted
 delivery no Message id.

 how can i get message id for MT billing message,so i can know which
 message got failed.

 Thanks  Regards,
 Samir.



RE: Message ID

2007-09-11 Thread ashwani
Hi, 

 

You can only get the message id once the message has been delivered/failed
by SMSC.

Try Capturing type from the delivery_sm PDU

 

Regards

Ashwani

 

 

  _  

From: Jins [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 11, 2007 1:11 PM
To: users@kannel.org
Cc: Kenney Jacob
Subject: Message ID

 


Hello,

How can i get the message id of a submitted message.
i tried with %b ,but it shows ACK at one time and other times it is
id:46E234A8 sub:001 

can somebody please tell me whats the var used for getting message id

reply ASAP



Re: Message ID

2007-09-11 Thread Vahid Ghafarpour
why you didn't implement to get it ad dlr-status=8?
after sumbit_sm message id responded but it didn't sent to client?

On 9/11/07, ashwani [EMAIL PROTECTED] wrote:

  Hi,



 You can only get the message id once the message has been delivered/failed
 by SMSC.

 Try Capturing type from the delivery_sm PDU



 Regards

 Ashwani




  --

 *From:* Jins [mailto:[EMAIL PROTECTED]
 *Sent:* Tuesday, September 11, 2007 1:11 PM
 *To:* users@kannel.org
 *Cc:* Kenney Jacob
 *Subject:* Message ID




 Hello,

 How can i get the message id of a submitted message.
 i tried with %b ,but it shows ACK at one time and other times it is
 id:46E234A8 sub:001

 can somebody please tell me whats the var used for getting message id

 reply ASAP




-- 
--Vahid Ghafarpour.
http://vahid.ghafarpour.ir/
vahid at ghafarpour dot ir
ghafarpour at gmail dot com


Re: Message ID

2007-09-11 Thread Jins
which parameter should i use for that.My requirement is that i need to
update the delivery status in my DB using that message id

On 11/09/2007, Vahid Ghafarpour [EMAIL PROTECTED] wrote:

 why you didn't implement to get it ad dlr-status=8?
 after sumbit_sm message id responded but it didn't sent to client?

 On 9/11/07, ashwani  [EMAIL PROTECTED] wrote:
 
   Hi,
 
 
 
  You can only get the message id once the message has been
  delivered/failed by SMSC.
 
  Try Capturing type from the delivery_sm PDU
 
 
 
  Regards
 
  Ashwani
 
 
 
 
   --
 
  *From:* Jins [mailto:[EMAIL PROTECTED]
  *Sent:* Tuesday, September 11, 2007 1:11 PM
  *To:* users@kannel.org
  *Cc:* Kenney Jacob
  *Subject:* Message ID
 
 
 
 
  Hello,
 
  How can i get the message id of a submitted message.
  i tried with %b ,but it shows ACK at one time and other times it is
  id:46E234A8 sub:001
 
  can somebody please tell me whats the var used for getting message id
 
  reply ASAP
 



 --
 --Vahid Ghafarpour.
 http://vahid.ghafarpour.ir/
 vahid at ghafarpour dot ir
 ghafarpour at gmail dot com




-- 
Jinson Abraham,
Torque Technology Solutions,
T-BIC, Park Center, Technopark,
Trivandrum.
www.torque.co.in


Re: message-id

2007-03-20 Thread sangprabv
AFAIK the message id is exist even the dlr is disabled, therefore we still can 
grab the value. Please check the user guide for the dlr escaped chars part. 
There should be information about this.

Regards


Willy
  - Original Message - 
  From: Mario Noboa 
  To: [EMAIL PROTECTED] ; users@kannel.org 
  Sent: Monday, March 19, 2007 7:36 PM
  Subject: RE: message-id


  Hi Willy, with dlr I have a problem, half of users are cdma, and the operator 
have disabled dlr to this phones. Do you think in another alternative?

   

  Thanks,

  Mario 


--

  De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  Enviado el: Viernes, 16 de Marzo de 2007 10:31 p.m.
  Para: Mario Noboa; users@kannel.org
  Asunto: Re: message-id

   

  Hi,

  Of course we can, just check the user guide in the dlr part.

   

  Regards

   

   

  Willy

- Original Message - 

From: Mario Noboa 

To: users@kannel.org 

Sent: Saturday, March 17, 2007 4:42 AM

Subject: message-id

 

Hi List,

 

Anybody knows how can I get the message.id that the smsc returns in the 
submit_sm_resp?

 

Thanks a lot.

Mario 

 


Re: message-id

2007-03-16 Thread sangprabv
Hi,
Of course we can, just check the user guide in the dlr part.

Regards


Willy
  - Original Message - 
  From: Mario Noboa 
  To: users@kannel.org 
  Sent: Saturday, March 17, 2007 4:42 AM
  Subject: message-id


  Hi List,

   

  Anybody knows how can I get the message.id that the smsc returns in the 
submit_sm_resp?

   

  Thanks a lot.

  Mario 

   


Re: Message ID higher than 2147483647

2006-06-04 Thread Mi Reflejo

Heh, resentful attitude. ;)

M

On 6/1/06, Rene Kluwen [EMAIL PROTECTED] wrote:

Stipe,

Are you maintaining a ChangeLog of the ChangeLog? ;)

-- ME

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Stipe Tolj
Sent: vrijdag 2 juni 2006 1:15
To: Mi Reflejo
Cc: users@kannel.org
Subject: Re: Message ID higher than 2147483647


Mi Reflejo wrote:
 Well. Actually the patch was mine ;)

wups... need to correct the credits in ChangeLog then.. :)

Stipe

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

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

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








Re: Message ID higher than 2147483647

2006-06-04 Thread Stipe Tolj

Rene Kluwen wrote:

Stipe,

Are you maintaining a ChangeLog of the ChangeLog? ;)


nop :], should I? ;)

Stipe

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

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

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



Re: Message ID higher than 2147483647

2006-06-04 Thread Stipe Tolj

Mi Reflejo wrote:

Heh, resentful attitude. ;)


structural, yes... but unreal ;)

Stipe

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

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

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



Re: Message ID higher than 2147483647

2006-06-01 Thread Stipe Tolj

Ady Wicaksono wrote:

Dear all

on 32 bit system, we have max int 2^31 - 1 = 2147483647

(look at /usr/include/stdint.h)
:# define INT32_MAX(2147483647)

I have the problem with this, some of SMSC use hex/decimal pair.
submit_sm_resp is using hexadecimal

2006-05-18 15:30:18 [16274] [6] DEBUG:   type_name: submit_sm_resp
2006-05-18 15:30:18 [16274] [6] DEBUG:   command_id: 2147483652 = 
0x8004

2006-05-18 15:30:18 [16274] [6] DEBUG:   command_status: 0 = 0x
2006-05-18 15:30:18 [16274] [6] DEBUG:   sequence_number: 13 = 0x000d
2006-05-18 15:30:18 [16274] [6] DEBUG:   message_id: B88B2856

Message ID is 3096127574 in decimal which is bigger than max-int so

2006-05-18 15:30:18 [16274] [6] DEBUG: SMPP PDU dump ends.
2006-05-18 15:30:18 [16274] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smpp, 
ts=2147483647, src=xxx, dst=x, mask=31, boxc=


Kannel set ts to 2147483647 :(. It's bad since when i have deliver_sm as 
delivery report like this, they inform id 3096127574 state but our 
kannel can't find

DLR entries

2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 69 64 3a 33 30 39 36 
31 32 37 35 37 34 20 73 75   id:3096127574 su
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 62 3a 30 30 30 20 64 
6c 76 72 64 3a 30 30 30 20   b:000 dlvrd:000
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 73 75 62 6d 69 74 20 
64 61 74 65 3a 30 36 30 35   submit date:0605
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 31 38 31 35 33 32 20 
64 6f 6e 65 20 64 61 74 65   181532 done date
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 3a 30 36 30 35 31 38 
31 35 33 32 20 73 74 61 74   :0605181532 stat
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 3a 44 45 4c 49 56 52 
44 20 65 72 72 3a 30 30 30   :DELIVRD err:000
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 20 74 65 78 74 3a 54 
65 72 69 6d 61 20 4b 61 73text:

2006-05-18 15:30:36 [16274] [9] DEBUG:Octet string dump ends.
2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP PDU dump ends.
2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP[smpp] handle_pdu, got DLR
2006-05-18 15:30:36 [16274] [9] DEBUG: DLR[mysql]: Looking for DLR 
smsc=smpp, ts=2147483647, dst=, type=1

2006-05-18 15:30:36 [16274] [9] DEBUG: no rows found
2006-05-18 15:30:36 [16274] [9] WARNING: DLR[mysql]: DLR for 
DSTxxx not found.
2006-05-18 15:30:36 [16274] [9] ERROR: SMPP[smpp]: got DLR but could not 
find message or was not interested in it id

2147483647 dstx, type1

Any issue on this limit?


ok, this is a major one please do as Vincent suggest, provide the same data 
as you desribed here to the bug tracking system at


  http://bugs.kannel.org/

I'm investigating if this is really the case in the code and propose a fix.

Thanks for the report.

Stipe

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

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

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



Re: Message ID higher than 2147483647

2006-06-01 Thread Stipe Tolj

Vincent CHAVANIS wrote:

joke
buy a 64bit server :-)
/joke


now, joking is only allowed if afterwards code analysis follows! :p

Stipe

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

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

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



Re: Message ID higher than 2147483647

2006-06-01 Thread Mi Reflejo

There is a patch :)

http://bugs.kannel.org/view_bug_advanced_page.php?f_id=345

Regards,
M

On 6/1/06, Stipe Tolj [EMAIL PROTECTED] wrote:

Vincent CHAVANIS wrote:
 joke
 buy a 64bit server :-)
 /joke

now, joking is only allowed if afterwards code analysis follows! :p

Stipe

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

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

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






Re: Message ID higher than 2147483647

2006-06-01 Thread Stipe Tolj

Ady Wicaksono wrote:

Dear all

on 32 bit system, we have max int 2^31 - 1 = 2147483647

(look at /usr/include/stdint.h)
:# define INT32_MAX(2147483647)

I have the problem with this, some of SMSC use hex/decimal pair.
submit_sm_resp is using hexadecimal

2006-05-18 15:30:18 [16274] [6] DEBUG:   type_name: submit_sm_resp
2006-05-18 15:30:18 [16274] [6] DEBUG:   command_id: 2147483652 = 
0x8004

2006-05-18 15:30:18 [16274] [6] DEBUG:   command_status: 0 = 0x
2006-05-18 15:30:18 [16274] [6] DEBUG:   sequence_number: 13 = 0x000d
2006-05-18 15:30:18 [16274] [6] DEBUG:   message_id: B88B2856

Message ID is 3096127574 in decimal which is bigger than max-int so

2006-05-18 15:30:18 [16274] [6] DEBUG: SMPP PDU dump ends.
2006-05-18 15:30:18 [16274] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smpp, 
ts=2147483647, src=xxx, dst=x, mask=31, boxc=


Kannel set ts to 2147483647 :(. It's bad since when i have deliver_sm as 
delivery report like this, they inform id 3096127574 state but our 
kannel can't find

DLR entries

2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 69 64 3a 33 30 39 36 
31 32 37 35 37 34 20 73 75   id:3096127574 su
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 62 3a 30 30 30 20 64 
6c 76 72 64 3a 30 30 30 20   b:000 dlvrd:000
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 73 75 62 6d 69 74 20 
64 61 74 65 3a 30 36 30 35   submit date:0605
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 31 38 31 35 33 32 20 
64 6f 6e 65 20 64 61 74 65   181532 done date
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 3a 30 36 30 35 31 38 
31 35 33 32 20 73 74 61 74   :0605181532 stat
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 3a 44 45 4c 49 56 52 
44 20 65 72 72 3a 30 30 30   :DELIVRD err:000
2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 20 74 65 78 74 3a 54 
65 72 69 6d 61 20 4b 61 73text:

2006-05-18 15:30:36 [16274] [9] DEBUG:Octet string dump ends.
2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP PDU dump ends.
2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP[smpp] handle_pdu, got DLR
2006-05-18 15:30:36 [16274] [9] DEBUG: DLR[mysql]: Looking for DLR 
smsc=smpp, ts=2147483647, dst=, type=1

2006-05-18 15:30:36 [16274] [9] DEBUG: no rows found
2006-05-18 15:30:36 [16274] [9] WARNING: DLR[mysql]: DLR for 
DSTxxx not found.
2006-05-18 15:30:36 [16274] [9] ERROR: SMPP[smpp]: got DLR but could not 
find message or was not interested in it id

2147483647 dstx, type1

Any issue on this limit?


provided patch from Ady has been commited to cvs. Resolving bug #345. Please 
confirm.


Stipe

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

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

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



Re: Message ID higher than 2147483647

2006-06-01 Thread Mi Reflejo

Well. Actually the patch was mine ;)

M.

On 6/1/06, Stipe Tolj [EMAIL PROTECTED] wrote:

Ady Wicaksono wrote:
 Dear all

 on 32 bit system, we have max int 2^31 - 1 = 2147483647

 (look at /usr/include/stdint.h)
 :# define INT32_MAX(2147483647)

 I have the problem with this, some of SMSC use hex/decimal pair.
 submit_sm_resp is using hexadecimal

 2006-05-18 15:30:18 [16274] [6] DEBUG:   type_name: submit_sm_resp
 2006-05-18 15:30:18 [16274] [6] DEBUG:   command_id: 2147483652 =
 0x8004
 2006-05-18 15:30:18 [16274] [6] DEBUG:   command_status: 0 = 0x
 2006-05-18 15:30:18 [16274] [6] DEBUG:   sequence_number: 13 = 0x000d
 2006-05-18 15:30:18 [16274] [6] DEBUG:   message_id: B88B2856

 Message ID is 3096127574 in decimal which is bigger than max-int so

 2006-05-18 15:30:18 [16274] [6] DEBUG: SMPP PDU dump ends.
 2006-05-18 15:30:18 [16274] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smpp,
 ts=2147483647, src=xxx, dst=x, mask=31, boxc=

 Kannel set ts to 2147483647 :(. It's bad since when i have deliver_sm as
 delivery report like this, they inform id 3096127574 state but our
 kannel can't find
 DLR entries

 2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 69 64 3a 33 30 39 36
 31 32 37 35 37 34 20 73 75   id:3096127574 su
 2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 62 3a 30 30 30 20 64
 6c 76 72 64 3a 30 30 30 20   b:000 dlvrd:000
 2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 73 75 62 6d 69 74 20
 64 61 74 65 3a 30 36 30 35   submit date:0605
 2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 31 38 31 35 33 32 20
 64 6f 6e 65 20 64 61 74 65   181532 done date
 2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 3a 30 36 30 35 31 38
 31 35 33 32 20 73 74 61 74   :0605181532 stat
 2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 3a 44 45 4c 49 56 52
 44 20 65 72 72 3a 30 30 30   :DELIVRD err:000
 2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 20 74 65 78 74 3a 54
 65 72 69 6d 61 20 4b 61 73text:
 2006-05-18 15:30:36 [16274] [9] DEBUG:Octet string dump ends.
 2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP PDU dump ends.
 2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP[smpp] handle_pdu, got DLR
 2006-05-18 15:30:36 [16274] [9] DEBUG: DLR[mysql]: Looking for DLR
 smsc=smpp, ts=2147483647, dst=, type=1
 2006-05-18 15:30:36 [16274] [9] DEBUG: no rows found
 2006-05-18 15:30:36 [16274] [9] WARNING: DLR[mysql]: DLR for
 DSTxxx not found.
 2006-05-18 15:30:36 [16274] [9] ERROR: SMPP[smpp]: got DLR but could not
 find message or was not interested in it id
 2147483647 dstx, type1

 Any issue on this limit?

provided patch from Ady has been commited to cvs. Resolving bug #345. Please
confirm.

Stipe

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

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

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






Re: Message ID higher than 2147483647

2006-06-01 Thread Mi Reflejo

But all merits to Ady for show us the light ;)



On 6/1/06, Mi Reflejo [EMAIL PROTECTED] wrote:

Well. Actually the patch was mine ;)

M.

On 6/1/06, Stipe Tolj [EMAIL PROTECTED] wrote:
 Ady Wicaksono wrote:
  Dear all
 
  on 32 bit system, we have max int 2^31 - 1 = 2147483647
 
  (look at /usr/include/stdint.h)
  :# define INT32_MAX(2147483647)
 
  I have the problem with this, some of SMSC use hex/decimal pair.
  submit_sm_resp is using hexadecimal
 
  2006-05-18 15:30:18 [16274] [6] DEBUG:   type_name: submit_sm_resp
  2006-05-18 15:30:18 [16274] [6] DEBUG:   command_id: 2147483652 =
  0x8004
  2006-05-18 15:30:18 [16274] [6] DEBUG:   command_status: 0 = 0x
  2006-05-18 15:30:18 [16274] [6] DEBUG:   sequence_number: 13 = 0x000d
  2006-05-18 15:30:18 [16274] [6] DEBUG:   message_id: B88B2856
 
  Message ID is 3096127574 in decimal which is bigger than max-int so
 
  2006-05-18 15:30:18 [16274] [6] DEBUG: SMPP PDU dump ends.
  2006-05-18 15:30:18 [16274] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smpp,
  ts=2147483647, src=xxx, dst=x, mask=31, boxc=
 
  Kannel set ts to 2147483647 :(. It's bad since when i have deliver_sm as
  delivery report like this, they inform id 3096127574 state but our
  kannel can't find
  DLR entries
 
  2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 69 64 3a 33 30 39 36
  31 32 37 35 37 34 20 73 75   id:3096127574 su
  2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 62 3a 30 30 30 20 64
  6c 76 72 64 3a 30 30 30 20   b:000 dlvrd:000
  2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 73 75 62 6d 69 74 20
  64 61 74 65 3a 30 36 30 35   submit date:0605
  2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 31 38 31 35 33 32 20
  64 6f 6e 65 20 64 61 74 65   181532 done date
  2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 3a 30 36 30 35 31 38
  31 35 33 32 20 73 74 61 74   :0605181532 stat
  2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 3a 44 45 4c 49 56 52
  44 20 65 72 72 3a 30 30 30   :DELIVRD err:000
  2006-05-18 15:30:36 [16274] [9] DEBUG:  data: 20 74 65 78 74 3a 54
  65 72 69 6d 61 20 4b 61 73text:
  2006-05-18 15:30:36 [16274] [9] DEBUG:Octet string dump ends.
  2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP PDU dump ends.
  2006-05-18 15:30:36 [16274] [9] DEBUG: SMPP[smpp] handle_pdu, got DLR
  2006-05-18 15:30:36 [16274] [9] DEBUG: DLR[mysql]: Looking for DLR
  smsc=smpp, ts=2147483647, dst=, type=1
  2006-05-18 15:30:36 [16274] [9] DEBUG: no rows found
  2006-05-18 15:30:36 [16274] [9] WARNING: DLR[mysql]: DLR for
  DSTxxx not found.
  2006-05-18 15:30:36 [16274] [9] ERROR: SMPP[smpp]: got DLR but could not
  find message or was not interested in it id
  2147483647 dstx, type1
 
  Any issue on this limit?

 provided patch from Ady has been commited to cvs. Resolving bug #345. Please
 confirm.

 Stipe

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

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

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







Re: Message ID higher than 2147483647

2006-06-01 Thread Stipe Tolj

Mi Reflejo wrote:

Well. Actually the patch was mine ;)


wups... need to correct the credits in ChangeLog then.. :)

Stipe

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

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

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



RE: Message ID higher than 2147483647

2006-06-01 Thread Rene Kluwen
Stipe,

Are you maintaining a ChangeLog of the ChangeLog? ;)

-- ME

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Stipe Tolj
Sent: vrijdag 2 juni 2006 1:15
To: Mi Reflejo
Cc: users@kannel.org
Subject: Re: Message ID higher than 2147483647


Mi Reflejo wrote:
 Well. Actually the patch was mine ;)

wups... need to correct the credits in ChangeLog then.. :)

Stipe

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

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

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






(Solutions) Re: Message ID higher than 2147483647

2006-05-18 Thread Ady Wicaksono

Hahahaha

That's not a solutions :D,

I found a very simple solutions for this just now:
 cut here 
#include stdio.h

int main(){
   printf(B88B2856 = %lu\n,strtol(B88B2856,NULL,16));
   printf(B88B2856 = %ld\n,strtoll(B88B2856,NULL,16));
   printf(B88B2856 = %lu\n,strtoll(B88B2856,NULL,16));
}
 cut here 
B88B2856 is just an example of hexa number which is = 3096127574 in decimal
look at the result:

$ ./a.out
B88B2856 = 2147483647
B88B2856 = -1198839722
B88B2856 = 3096127574

The correct value is if we use printf(B88B2856 = 
%lu\n,strtoll(B88B2856,NULL,16));


I use kannel 1.4.0, and found this problem at file gw/smsc/smsc_smpp.c

1. in function static Msg *handle_dlr(SMPP *smpp, Octstr 
*destination_addr, Octstr *short_message, Octstr *message_payload, 
Octstr *receipted_message_id, long message_state)


 cut here -
if (smpp-smpp_msg_id_type == -1) {
/* the default, C string */
tmp = octstr_duplicate(msgid);
} else {
if (smpp-smpp_msg_id_type  0x02) {
tmp = octstr_format(%ld, strtol(octstr_get_cstr(msgid), NULL, 
16));

} else {
tmp = octstr_format(%ld, strtol(octstr_get_cstr(msgid), NULL, 
10));

}
}
 cut here -
to fix it, change line
tmp = octstr_format(%ld, strtol(octstr_get_cstr(msgid), NULL, 16));
to
tmp = octstr_format(%lu, strtoll(octstr_get_cstr(msgid), NULL, 16));

also
tmp = octstr_format(%ld, strtol(octstr_get_cstr(msgid), NULL, 
10));

to
tmp = octstr_format(%lu, strtoll(octstr_get_cstr(msgid), 
NULL, 10));


2. in function
static void handle_pdu(SMPP *smpp, Connection *conn, SMPP_PDU *pdu,
   long *pending_submits)

on case submit_sm_resp:
 cut here -
   Octstr *tmp;

   /* check if msg_id is C string, decimal or hex for this 
SMSC */

   if (smpp-smpp_msg_id_type == -1) {
   /* the default, C string */
   tmp = 
octstr_duplicate(pdu-u.submit_sm_resp.message_id);

   } else {
   if (smpp-smpp_msg_id_type  0x01) {
   tmp = octstr_format(%ld, strtol(  /* hex */
   
octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 16));

   } else {
   tmp = octstr_format(%ld, strtol(  /* decimal */
   
octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 10));

   }
   }

   /* SMSC ACK.. now we have the message id. */
   if (DLR_IS_ENABLED_DEVICE(msg-sms.dlr_mask))
   dlr_add(smpp-conn-id, tmp, msg);
 cut here -
change line :
   tmp = octstr_format(%ld, strtol(  /* hex */
   
octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 16));


to
   tmp = octstr_format(%lu, strtoll(  /* hex */
   
octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 16));


also:
   tmp = octstr_format(%ld, strtol(  /* decimal */
   
octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 10));


to
   tmp = octstr_format(%lu, strtoll(  /* decimal */
   
octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 10));



and recompile your kannel

Good luck




Vincent CHAVANIS wrote:

joke
buy a 64bit server :-)
/joke

btw, please fill a bug report on mantis : http://bugs.kannel.org/main_page.php

regards

Vincent

--
Telemaque - NICE - (FR)
Service Technique - Developpement
http://www.telemaque.fr/
[EMAIL PROTECTED]
Tel : +33 4 93 97 71 64 (fax 68)

- Original Message - 
From: Ady Wicaksono [EMAIL PROTECTED]

To: users@kannel.org
Sent: Thursday, May 18, 2006 11:42 AM
Subject: Message ID higher than 2147483647


  

Dear all

on 32 bit system, we have max int 2^31 - 1 = 2147483647

(look at /usr/include/stdint.h)
:# define INT32_MAX(2147483647)

I have the problem with this, some of SMSC use hex/decimal pair.
submit_sm_resp is using hexadecimal

2006-05-18 15:30:18 [16274] [6] DEBUG:   type_name: submit_sm_resp
2006-05-18 15:30:18 [16274] [6] DEBUG:   command_id: 2147483652 = 0x8004
2006-05-18 15:30:18 [16274] [6] DEBUG:   command_status: 0 = 0x
2006-05-18 15:30:18 [16274] [6] DEBUG:   sequence_number: 13 = 0x000d
2006-05-18 15:30:18 [16274] [6] DEBUG:   message_id: B88B2856

Message ID is 3096127574 in decimal which is bigger than max-int so

2006-05-18 15:30:18 [16274] [6] DEBUG: SMPP PDU dump ends.
2006-05-18 15:30:18 [16274] [6] DEBUG: DLR[mysql]: Adding DLR smsc=smpp, 
ts=2147483647, src=xxx, dst=x, mask=31, boxc=


Kannel set ts to 2147483647 :(. It's bad since when i have deliver_sm as 
delivery report like this, they inform id 3096127574 state but our 
kannel can't find

DLR entries

2006-05-18 15:30:36