Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to query_sm #2

Open
chakhedik opened this issue Apr 5, 2011 · 10 comments
Open

How to query_sm #2

chakhedik opened this issue Apr 5, 2011 · 10 comments

Comments

@chakhedik
Copy link

Hi,

I tried your echo_esme and it's awesome, it really easy to understand for a beginner to smpp like me.

Can you help me with how to do query_sm?

I tried this,

Body = #query_sm{message_id=Id, source_addr=Src},
gen_esme34:transmit_pdu(?MODULE, Body, id()).

But always received this,

{pdu,16,2147483648,3,87,{generic_nack}}

The command status = 3 which means Invalid Command ID...

Chak

@essiene
Copy link
Owner

essiene commented Apr 5, 2011

Hi Chak,

On Tue, Apr 5, 2011 at 10:51 AM, chakhedik
[email protected]
wrote:

Hi,

I tried your echo_esme and it's awesome, it really easy to understand for a beginner to smpp like me.

Thanks! ;)

Can you help me with how to do query_sm?

I tried this,

       Body = #query_sm{message_id=Id, source_addr=Src},
       gen_esme34:transmit_pdu(?MODULE, Body, id()).

But always received this,

{pdu,16,2147483648,3,87,{generic_nack}}

The command status = 3 which means Invalid Command ID...

Let me quickly check my code, it may be an error on my part.

Your server is version 3.4 right?

Chak

Reply to this email directly or view it on GitHub:
#2

@chakhedik
Copy link
Author

Yes, my server is 3.4

@essiene
Copy link
Owner

essiene commented Apr 5, 2011

On Tue, Apr 5, 2011 at 12:07 PM, chakhedik
[email protected]
wrote:

Yes, my server is 3.4

Hmm... so far, things look good in the simulator.

I'll test this against a live SMSC and get back to you later tonight.

Reply to this email directly or view it on GitHub:
#2 (comment)

@essiene
Copy link
Owner

essiene commented Apr 5, 2011

{pdu,21,2147483651,103,6,{query_sm_resp,[],[],0,0}}

RespComandId = 2147483651
StatusCode = 103dec (67hex) -> query failed. (but at least, the query_sm command was accepted and acted on)

See code snippet I'm using https://gist.github.com/904073

Let me know if you still have any issues and then send me a code snippet ;)

@chakhedik
Copy link
Author

Hi,

{pdu,16,2147483648,3,9,{generic_nack}}

I still receive the same response. I test it against live SMSC also, received sms on my phone but still failed to query_sm. I'll contact my SMSC regarding this matter and will let u know what's the problem.

@essiene
Copy link
Owner

essiene commented Apr 6, 2011

great. I'll still leave this issue open till I hear back from you.

@chakhedik
Copy link
Author

Hi,

I've contacted them they ask me to send using version 3.3 parameters with the only difference is message_id vs original_message_id. I simply change the pdu record for query_sm. However, I still got the same reply. Maybe the command id is different for version 3.3.

This is from v3.3 doc :

generic_nack - Generic response to a command for which the message header is invalid.

@essiene
Copy link
Owner

essiene commented Apr 6, 2011

On Wed, Apr 6, 2011 at 10:09 AM, chakhedik
[email protected]
wrote:

Hi,

I've contacted them they ask me to send using version 3.3 parameters with the only difference is message_id vs original_message_id. I simply change the pdu record for query_sm. However, I still got the same reply. Maybe the command id is different for version 3.3.

Ahhhh... so they have a 3.3 gateway. I will compare the version specs,
I was of the opinion they were backward compatible.

This is from v3.3 doc :

generic_nack - Generic response to a command for which the message header is invalid.

Reply to this email directly or view it on GitHub:
#2 (comment)

@essiene
Copy link
Owner

essiene commented Apr 6, 2011

On Wed, Apr 6, 2011 at 11:37 AM, Essien Essien [email protected] wrote:

On Wed, Apr 6, 2011 at 10:09 AM, chakhedik
[email protected]
wrote:

Hi,

I've contacted them they ask me to send using version 3.3 parameters with the only difference is message_id vs original_message_id. I simply change the pdu record for query_sm. However, I still got the same reply. Maybe the command id is different for version 3.3.

Ahhhh... so they have a 3.3 gateway. I will compare the version specs,
I was of the opinion they were backward compatible.

So I've checked the SMPP 3.3 codes at
http://www.world-text.com/docs/smpp_codes.php

And they're the same with SMPP 3.4 codes, so this should work as it
works against a live SMSC supporting SMPP 3.4, just to be on the safe
side, I'll include some PDU logging, so you can dump out the packed
binary PDU which ends up being sent across the wire to your SMSC.

I'll do this later in the evening.

This is from v3.3 doc :

generic_nack - Generic response to a command for which the message header is invalid.

Reply to this email directly or view it on GitHub:
#2 (comment)

@chakhedik
Copy link
Author

That would be great. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants