SMS Forum Online Discussion

APIs => OpenSMPP API (aka Logica SMPP API) => Topic started by: bingo on August 03, 2007, 13:04:59 UTC



Title: missing information about receiver and sender address
Post by: bingo on August 03, 2007, 13:04:59 UTC
Hi all,
I use smsc simulator from opensmpp.logica.com . But when I send message to client it's missing information about receiver and sender address like this :

1: i run  the smsc simulator  as the smsc
2: bind as receiver to the smsc
3: deliver sm to my application(which bind as receiver to the smsc)
- 1 start simulation
- 2 stop simulation
- 3 list clients
- 4 send message
- 5 list messages
- 6 reload users file
- 7 log to screen off
- 0 exit
> 4
123
Type the message> 12345
08:34:13 [123] server request: (deliver: (pdu: 0 5 0 [6]) (addr: 0 0 )  (addr: 0
 0 )  (sm: enc: ASCII msg: 12345)  (opt: ) )
Message sent.

How can I put the number receiver and sender and the client see them  ?

Please help me


Title: Re: missing information about receiver and sender address
Post by: abhiksarkar on August 03, 2007, 16:05:37 UTC
If you look into the code of the smsc simulator, you will find that the address fields are not populated in the deliver_sm. If you want to have this functionality, you will have to modify the code yourself, to ask you for the source and destination address fields along with the message text.

Best regards,
Abhik


Title: Re: missing information about receiver and sender address
Post by: bingo on August 03, 2007, 16:27:19 UTC
hi abhiksarkar,

Can you tell me exactly where I have to change this get receiver and sender address , please?

Thanks in advance


Title: Re: missing information about receiver and sender address
Post by: abhiksarkar on August 03, 2007, 21:03:59 UTC
In the sendMessage() method of org.smpp.smscsim.Simulator in the following part, you will have to add lines to read in the source and destination addresses (and the TON and NPI values if you want).


Code:
if (proc.isActive()) {
  System.out.print("Type the message> ");
  String message = keyboard.readLine();
  DeliverSM request = new DeliverSM();
  ...

Good luck
Abhik


Title: Re: missing information about receiver and sender address
Post by: bingo on August 04, 2007, 07:43:35 UTC
Thank abhiksarkar, I did it.