ukarim / smscsim

smpp smsc simulator
MIT License
17 stars 8 forks source link

[Feature request] Implementing status of unsent and undelivered messages #8

Closed elhananjair closed 11 months ago

elhananjair commented 12 months ago

Hello @ukarim Thank you for such nice tool, I was playing with smscsim and it works. But, for full simulation I want to request for feature which includes deliver_sm pdu response and show simulate unsent text message.

Thanks

ukarim commented 12 months ago

@elhananjair just pushed new changes to this branch https://github.com/ukarim/smscsim/tree/issue8 Can you build from this branch and test it?

go build
export FAILED_DLRS=true
./smscsim

With this new env variable (FAILED_DLRS) every returned delivery report will have UNDELIVERABLE msg state

elhananjair commented 12 months ago

@ukarim Ok thanks I will do that, but what about submit_sm error responses, if command_status is not equal to 0.

ukarim commented 12 months ago

@elhananjair made an update to the branch. Please look at this section in readme https://github.com/ukarim/smscsim/tree/issue8#env-variables

ukarim commented 11 months ago

@elhananjair any updates on this?

elhananjair commented 11 months ago

I haven't tried it yet, I will let you know.

elhananjair commented 11 months ago

Hey @ukarim I couldn't build it with go build export FAILED_DLRS=true ./smscsim


package export is not in GOROOT (/usr/src/export)
malformed import path "FAILED_DLRS=true": invalid char '='
ukarim commented 11 months ago

@elhananjair this should be three separate commands 1 - go build 2 - export FAILED_SUBMITS=true 3 - ./smscsim

ukarim commented 11 months ago

@elhananjair feature merged to master as is. If you want to test unsent messages, then you just need to set environment varaible FAILED_SUBMITS=true Pushed changes to docker-hub. You can just do docker run -e FAILED_SUBMITS=true -p 2775:2775 -p 12775:12775 ukarim/smscsim:0.2.0 Thanks!

elhananjair commented 11 months ago

Hello, @ukarim thanks, I have tried it and it shows a successful status on sending the message and receiving delivery PDU. But I have got some comments:

  1. PDU.esm_class for delivery should be equal to 4 as SMPP spec, but in this case, I am getting 0
  2. The PDU.source_addr is empty as I logged its value, but it should be the destination number I have used in submit_sm

image

Thank you

ukarim commented 10 months ago

@elhananjair thanks! I will take a look tommorow