Visit your regional website: Clickatell Ireland Regional Website Clickatell Australia Regional Website Clickatell United Kingdom Regional Website Clickatell United States Regional Website Clickatell India Regional Website Clickatell South Africa Regional Website
SA: +27 21 910 7700 | USA: +1 (800) 720-0802
 
 
Buy Now | Login | Contact Us
September 02, 2010, 04:29:16 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: sending SMS to a specified Port  (Read 13506 times)
sirandres
Member
*

Karma: 0
Posts: 3


« on: April 28, 2006, 07:05:47 AM »

Hi

I develop some applications in J2ME (Java for mobile devices).

I have to send a SMS to a specified port, because the application is "listening" there.

How can I send a SMS directly to a specified port like +41791112233:1000
??

I use a Nokia 6230i as destination.

How can I specifiy in the UDH that I want to send to the Port 1000?
Logged
smsguru
Super Member
***

Karma: 0
Posts: 29


« Reply #1 on: May 03, 2006, 10:50:05 AM »

Are you using the incoming MO service?
Logged
sirandres
Member
*

Karma: 0
Posts: 3


« Reply #2 on: May 03, 2006, 11:11:42 AM »

Hi, I found a solution for the problem.

When I send the SMS with following paramter "udh = 06050404BC04BC", the source and destination port are "1212".

I had to set this port number as hex-value. So 04BC is equal 1212 as decimal value.

With this manipulated udh I am now able to activate the push registry on my mobile (because the J2ME push registry is listen on the port 1212).
Logged
mshita
Member
*

Karma: 0
Posts: 6


« Reply #3 on: May 22, 2006, 11:48:27 PM »

Hi Sirandres,

How did you do this? I'm trying to do Push Registry too but can't get it to work. On my clickatell report it says routing error. This is what I do (PHP):

$url = $base_url."/http/sendmsg?session_id=$sess_id&to=$to&udh=06050404BC04BC&text=$text";

Just won't work...
Logged
ryan.felix
Support
Super Member
***

Karma: 0
Posts: 347


« Reply #4 on: May 23, 2006, 07:05:16 AM »

Hi Sirandres,

Please send me the number you have the problem with. The message status that you have received (routing error) means that our gateway has received your message, but could not route it for delivery due to one or more reasons (such as a feature not being supported to a particular destination).

More information regarding routing errors can be easily accessed by simply clicking on the following link –

http://support.clickatell.com/faq.php?mode=view_entry&kbid=92&kbcat=6

I will provide you with more information as soon as you reply.
Logged

ind Regards

Ryan Felix
Customer Support
support@clickatell.com
www.clickatell.com/
Tel: +27 21 910 7700
Fax: +27 21 910 7701
Any Message, Anywhere.
mshita
Member
*

Karma: 0
Posts: 6


« Reply #5 on: May 23, 2006, 04:06:58 PM »

Hi Ryan....I'm assuming that message was for me and not sirandres?

The phone numbers I'm trying to send to is 5036217261 and a couple of other (that I don't remember from the top of my head). They are all Cingular Wireless numbers.

Mounir
Logged
sirandres
Member
*

Karma: 0
Posts: 3


UDH
« Reply #6 on: May 23, 2006, 05:15:23 PM »

Hi!

I think that the first digits of "udh=06050404BC04BC" are specified to Nokia mobile phones. Which manufacter is your mobile from?

The first numbers ("udh=06050") tells to nokia phones, that the source and destination port will be user specified.....

If you work with a Nokia phone, there must be another error....perhaps a wrong text in the JAD (java application descriptor). There must be written something like sms://1212 (when you set the udh to 04BC) and allowed sender should be set as * , that means wildcard. And you have to specify the wright name of your class (package name included for ex. "package.class").

Hope you'll find the solution....
Logged
mshita
Member
*

Karma: 0
Posts: 6


« Reply #7 on: May 23, 2006, 05:19:38 PM »

No, I believe 060504 on the udh means length and a couple of other things. That is a standard UDH format. Then I'm trying to send to port 10000 to activate the Push Registry and launch the app, but didn't work. So I tried your port number (1212) but that didn't work either.
Logged
mshita
Member
*

Karma: 0
Posts: 6


« Reply #8 on: May 31, 2006, 06:35:18 PM »

Clickatell support: Any ideas on my problem?
Logged
Jasong
Member
*

Karma: 0
Posts: 1


WWW
« Reply #9 on: July 26, 2006, 09:01:35 PM »

ms***a is correct on the UDH "060504" means...

USER DATA LENGTH : 20 septets
UDH LENGTH : 6 octets
UDH : 05 04 27 11 00 00
UDH ELEMENTS : 05 - Appl. port addressing 16bit
4 (0x04) Bytes Information Element
00000 : SOURCE port
is: allocated by IANA
10001 : DESTINATION port
is: allocated by IANA
--- DATA ----------------------
05 04 27 11 00 00

[b]Now, I also have an issue with sending to a specific port...[/b]
I am attempting to send SMS messages to a specific port on a device. I have taken the generic http get example, and modified it.

The original, no modified example works fine, i.e. this…
[code] String host = "api.clickatell.com";
String file = "/http/sendmsg?api_id=2609425&user=JasonG&password=123AbC6";
String strTo = "&to=14806430361";
String strTxt = "&text=hello+a+test+from+clickatells+api";[/code]

Then I use this for connecting…
[code]s = new Socket(host, port);
outw.print("GET " + file
+ strTo
//+ strUDH
+ strTxt
+ " HTTP/1.1\r\nHost:api.clickatell.com\r\n");[/code]

It successfully get’s delivered to device.

But when trying to specify the port or ports, I get a routing error. I have verified that 1.5 credit’s, are enabled in my profile, I have also verified, that the carriers I am sending to (tmobile and cingular usa) support the UDH header. Here is the example code, it seems correct, can anyone possibly give any insight, it seems the UDH is wrong?
Example:
[code]String host = "api.clickatell.com";
String file = "/http/sendmsg?api_id=2609425&user=JasonG&password=123AbC6";
String strTo = "&to=14806430361";
String strTxt = "&text=hello+a+test+from+clickatells+api";
//String strUDH = "&udh=060504FF970000"; //dest port =65431
String strUDH = "&udh=06050427110000"; //dest port =10001
//String strUDH = "&udh=060504FF97FF96"; //source port = 65430 dest port =65431

s = new Socket(host, port);
outw.print("GET " + file
+ strTo
+ strUDH
+ strTxt
+ " HTTP/1.1\r\nHost:api.clickatell.com\r\n");[/code]

I tried dest port=65431, as well as 10001 with source set to zero for both, I also tried setting source port to 65430 and dest to 65431 but no matter what I try, I astill get the routing error.
Logged

tmost Sincerity
Jason Glass
colin
Administrator
Super Member
*****

Karma: 0
Posts: 49


WWW
« Reply #10 on: October 10, 2006, 11:47:04 AM »

Hi Jasong

You are receiving the routing error as we do not currently support binary content delivery to the network you are using the USA.
Logged

Regards

Colin Jenkins
Developer

www.clickatell.com/
Tel:  +27 21 910 7700
Fax: +27 21 910 7
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC