Closed 101t closed 7 years ago
Please share a tcp trace showing your transformed part.
Hi,
I captured one concatenated message using wireshark tcp detailed trace,
GET /send?username=foo&password=bar&from=TarekKalaji&to=905312089995&content=An%20asynchronous%20SMPP%20client%20and%20server%20built%20on%20Node.js.%20Shorty%20is%20sponsored%20and%20maintained%20by%20SMS%20Cloud,%20a%20subsidiary%20of%20MediaTech%20Designs,%20LLC.%20wefwe%20wef%20ewf%20wef%20wef%20wef HTTP/1.1
Host: 1.2.3.4:1401
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Cookie: sessionid=k0zjw6qkr20ib7j3dz750o5nmqts1miy; csrftoken=Na8BldRXS4u8THxMUnka204zVzxFnqwcM6hbQPSC08tRTkTgVZaO9WA7IoV5aE9Z
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Fri, 03 Feb 2017 14:00:05 GMT
Content-Type: text/plain
Server: TwistedWeb/16.0.0
2e
Success "7b7c1087-5254-47de-a62a-7990374ceadf"
0
GET /send?username=foo&password=bar&from=TarekKalaji&to=905312089995&content=An%20asynchronous%20SMPP%20client%20and%20server%20built%20on%20Node.js.%20Shorty%20is%20sponsored%20and%20maintained%20by%20SMS%20Cloud,%20a%20subsidiary%20of%20MediaTech%20Designs,%20LLC.%20wefwe%20wef%20ewf%20wef%20wef%20wef HTTP/1.1
Host: 1.2.3.4:1401
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Cookie: sessionid=k0zjw6qkr20ib7j3dz750o5nmqts1miy; csrftoken=Na8BldRXS4u8THxMUnka204zVzxFnqwcM6hbQPSC08tRTkTgVZaO9WA7IoV5aE9Z
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Fri, 03 Feb 2017 14:02:01 GMT
Content-Type: text/plain
Server: TwistedWeb/16.0.0
2e
Success "33dd1b4f-980f-4bb2-85d3-889e0128d0d0"
0
GET /send?username=foo&password=bar&from=TarekKalaji&to=905312089995&content=An%20asynchronous%20SMPP%20client%20and%20server%20built%20on%20Node.js.%20Shorty%20is%20sponsored%20and%20maintained%20by%20SMS%20Cloud,%20a%20subsidiary%20of%20MediaTech%20Designs,%20LLC.%20wefwe%20wef%20ewf%20wef%20wef%20wef HTTP/1.1
Host: 1.2.3.4:1401
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Cookie: sessionid=k0zjw6qkr20ib7j3dz750o5nmqts1miy; csrftoken=Na8BldRXS4u8THxMUnka204zVzxFnqwcM6hbQPSC08tRTkTgVZaO9WA7IoV5aE9Z
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Fri, 03 Feb 2017 14:02:20 GMT
Content-Type: text/plain
Server: TwistedWeb/16.0.0
2e
Success "f62e2d8c-409a-4d35-a252-a36a4df1131b"
0
.
message content is that:
An asynchronous SMPP client and server built on Node.js. Shorty is sponsored and maintained by SMS Cloud, a subsidiary of MediaTech Designs, LLC. wefwe wef ewf wef wef wef
Thank you for respond.
decode pdu before sending after encode :)
The issue solved successfully by:
I just modified some script inside of gateway source code as:
nano /usr/lib/python2.7/dist-packages/jasmin/protocols/smpp/operations.py
inside this file inside SMPPOperationFactory
class in SubmitSM
method
class SMPPOperationFactory(object):
...
...
...
def SubmitSM(self, short_message, data_coding=0, **kwargs):
"""Depending on the short_message length, this method will return a classical SubmitSM or
a serie of linked SubmitSMs (parted message)
"""
kwargs['short_message'] = "%s BXXX" % short_message
kwargs['data_coding'] = data_coding
...
That is made my day. :))
Hello @101t
This is great solution.
Another issue with the concatenated sm, is that if you change the source address dinamic in the interceptor, the sm will be sent with diferent source address, and the destination will not be able to identify all concatenated sm as parts of the same one.
Any idea how to change the source address after the serie of linked SubmitSMs is set?
Hi, I am trying to append string " BXXX" to message content, but it is sometimes failed for long concatenated sms.
For example:
we have long message. original message
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
modified message
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. B999
I wrote some script using python language to handle message content:
I've got status error "ERROR/ESME_RINVESMCLASS". the message.log state is:
The Question is: Is it possible to add/modify message content via
routable.pdu.params["short_message"]
? how?Kind regards.