Accounting callback - change senderid

Accounting callback - change senderid SearchSearch
Author Message
Srikanth M
New member
Username: Srikanthm

Post Number: 8
Registered: 11-2014
Posted on Friday, December 30, 2016 - 10:25 am:   

Dear NowSMS support,

Just need some help. While performing accounting calls back I am extracting data for type=smssend trigger and trying to change the senderid based on certain logic. In order to do this I used SMSAccountingAllowChanges=Yes under smsgw.ini file. Now what is happening is the To which should have the value of the receiver number is being appended with lots of junk number and these number are the numeric values being return in a large url and the delivery fails. I did see Des from your team mentioned that setting the parameter could take an entire url as a response as a value to the parameter To

But it really didn't make any sense since I am just changing value for smscroute and sender id in my asp.net page as below and leaving rest of parameters without any change in their values

Response.Clear()
Response.Write("SMSCRoute=smpproute1" & vbCrLf)
Response.Write("Sender=SMS22" & vbCrLf)

Can you advise over this?

Thanks

Srikanth.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5774
Registered: 08-2008
Posted on Friday, December 30, 2016 - 09:02 pm:   

Hi Srikanth,

Is it possible for you to use Wireshark to capture the raw HTTP response from your callback?

It would seem that NowSMS is finding To= somewhere in the response, causing confusion. Maybe somehow the original Url its getting returned in the response?

--
Des
NowSMS Support
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5778
Registered: 08-2008
Posted on Tuesday, January 03, 2017 - 08:22 pm:   

Hi Srikanth,

We have done some further investigation.

It appears that there are two problems.

First, when NowSMS parses the accounting response to look for keywords, it parses the complete HTTP response, including headers. It should only parse the content.

If, for some reason, you are including the original HTTP URL in an HTTP header, then this could cause confusion. (I'm not sure why you would do this, but that is why I asked for a Wireshark trace.)

The second issue is that there is a bug with how SMSAccountingAllowChanges=Yes handles a To= recipient change.

You should be able to solve the issue by ensuring that you do not include the URL anywhere in the accounting response.

However, if you are still having problems there is an update that fixes these issues at https://www.nowsms.com/download/nowsms20170102.zip

--
Des
NowSMS Support
Srikanth M
New member
Username: Srikanthm

Post Number: 9
Registered: 11-2014
Posted on Wednesday, January 04, 2017 - 08:20 am:   

Hi Des,

Thanks for the further update.

We are not appending any url in the response as you said we don't need a full url in the response.

What is happening is the To field is taking all the numbers in the URL by itself and appending it to the original recipient number and using it as a recipient number where the msisdn gets invalid and rejected by the smsc.

My running version is 2015.06.24 can I download the update and apply the fix without any issue?

Regards,
Srikanth.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5780
Registered: 08-2008
Posted on Wednesday, January 04, 2017 - 08:35 pm:   

Hi Srikanth,


quote:

What is happening is the To field is taking all the numbers in the URL by itself and appending it to the original recipient number and using it as a recipient number where the msisdn gets invalid and rejected by the smsc.




That's why I'd like to see a Wireshark trace. There is something unexpected in the response.

The only way we can explain this is that a URL is being included in the HTTP response headers. (Such as a redirect Location: header.)

Maybe there is some other way that we are not aware of...but the only way for us to know is to see a Wireshark trace of the raw HTTP response.



quote:

My running version is 2015.06.24 can I download the update and apply the fix without any issue?




You are entitled to support an upgrades for 1 year from purchase. Beyond that, we sell annual maintenance and update agreements.

The installer in the update will check if you are eligible for the update. If not, it will not install the update and make no changes.

If you can install the update, and there is a problem and you want to go back to the old version, normally you just need to run install for the old version. However, this update changes the web Interface. To go back to the old version, you need to delete the NowSMS\html and NowSMS\webbadmin directories before you install the old version, so that the web templates for the old version will be re-installed.

Whatever you do, never uninstall. Uninstall will remove all of your configuration settings. The normal install programs will only change the version.


--
Des
NowSMS Support
Srikanth M
New member
Username: Srikanthm

Post Number: 10
Registered: 11-2014
Posted on Thursday, January 05, 2017 - 05:27 am:   

Hello Des,

Thanks for all the explanation

The reason I am not able to send you wireshark trace is for some reason it is not detecting the http traffic. We tried several ways with no luck and tried googling however no such information exists.

I will attempt the wireshark one more time and will revert back to you if I could make it this time

I will also try the update and see if it works since my software agreement expired

Regards,
Srikanth.