How to define specific sms route for network detection MNP?

How to define specific sms route for network detection MNP? SearchSearch
Author Message
liudas
New member
Username: Bogiukas

Post Number: 4
Registered: 08-2011
Posted on Monday, March 31, 2014 - 09:01 pm:   

I'm tested nowsms function "SMSSend Accounting Callback" (SMSAccountingURL=myurl) to define specific route. The problem is that I receive 3 url request(PreAuth SMSSend SMSOut) to my server when submit only one sms. I want to receive only one request SMSSend and then I will return SMSCRoute parameter to define route. Other 2 requests not needed, because use CPU load.

Maybe is another way how to easy change SMSCRoute?

thanks

Bogas
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4860
Registered: 08-2008
Posted on Monday, March 31, 2014 - 11:06 pm:   

Hi Bogas,

You will always receive both PreAuth and SMSSend, as there is no way to disable either.

If you do not require processing of a particular callback, exit your callback quickly and there will be minimal overhead.

My suggestion would be to set the route in response to the PreAuth callback and ignore SMSSend.

Manually edit SMSGW.INI, and under the SMSGW.INI header add the following under the [SMSGW] header :

SMSAccountingMustSetRoute=Yes
AccountingExtended=No

The first setting will reject messages if your callback does not set a route, so that you do not encounter unexpected routing.

The second setting disables SMSOut (and SMSIN) callbacks.

--
Des
NowSMS Support
Ahmed Negm
New member
Username: Anegm

Post Number: 1
Registered: 04-2014
Posted on Tuesday, April 01, 2014 - 11:25 am:   

I am new user for NowSms and I am trying to configure new SMPP connection between two NowSMS , I added SMPP connection on Server A to talk to Now SMS on Server B which have many SMPP connection with different SMSCRoute and I am trying to route all message received on Server A to specific SMSCRoute on server B , the problem is each time I send message to server B its assigned to different SMSCRoute so It’s not delivered to the end user as each SMSCRoute for one operator .
Appreciate your prompt support
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4889
Registered: 08-2008
Posted on Wednesday, May 07, 2014 - 05:50 pm:   

Moderator cleanup: The follow-up question in this thread has more detail at http://support.nowsms.com/discus/messages/1/72356.html
liudas
New member
Username: Bogiukas

Post Number: 5
Registered: 08-2011
Posted on Monday, May 26, 2014 - 07:39 am:   

hello Des,

Thanks for Your answer to callback processing.
All works according Your recommendation but unfortunately when I set the route in response to the PreAuth callback and ignored SMSSend anyway system use lot of CPU and sending gets slow, overloaded.
Need just one option, if route sent via HTTP then do not call callback HTTP.
Problem that I use SMPP and HTTP and would like that if customer uses nowsms HTTP and SMPP and want to network detection so route him accordingly.

Des do U have another idea how to escape requests?

cannot wait your answer,

thanks
bogas
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4905
Registered: 08-2008
Posted on Tuesday, May 27, 2014 - 01:29 pm:   

Hi Bogas,


Let me discuss this with some of my colleagues...

NowSMS should not use excessive CPU in this instance, but the server environment in which the scripts run might. My experience is that PHP is pretty lightweight in this regard, but it might take more resources to initialize other environments.

We should offer ways to limit what callbacks are enabled. As part of that review, I'll see if we can add a setting to call the pre-auth when there is no route set.

Let me see if we can make some changes.

--
Des
NowSMS Support
liudas
New member
Username: Bogiukas

Post Number: 6
Registered: 08-2011
Posted on Wednesday, May 28, 2014 - 10:57 am:   

Des, thanks for reply.

with PHP it goes even slower.
I offer to create additional parameter in smsgw.ini file - routecallback.
route callback will work only if route not sent!
if we already set route via HTTP parameter then dont need to process route callback url.

what do U think?

Bogas
liudas
New member
Username: Bogiukas

Post Number: 7
Registered: 08-2011
Posted on Wednesday, May 28, 2014 - 06:35 pm:   

Des,

another options could be:

1.we send sms to nowsms via HTTP, using SMSAccountingURL callback we detect network MNP. Pushing sms to NowSMS took time, because nowsms waiting response from nowsms and nowsms waiting response from SMSAccountingURL. I want to push sms to nowsms fast and sms can stay in Q folder without detectin MNP. When nowsms send out SMS from q folder via SMPP only then call MNP callback url.


2. Or another way - dont call MNP callback URL if Route is already set with parameter. Can create setting in nowsms - DisableCallbackIfRouteSet=Yes

3. Add parameter setroutecallbackurl - if route not sent then open url
this option will be harder implement but will work waster and for other customers will be usable as best solution.

Des, is any options could be used?


Bogas
liudas
New member
Username: Bogiukas

Post Number: 8
Registered: 08-2011
Posted on Wednesday, May 28, 2014 - 07:25 pm:   

in addition enabled callbacks extremely reduce sms sending speed
liudas
New member
Username: Bogiukas

Post Number: 9
Registered: 08-2011
Posted on Wednesday, May 28, 2014 - 07:27 pm:   

callback don't work in threads - parallel
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4912
Registered: 08-2008
Posted on Wednesday, May 28, 2014 - 07:54 pm:   

Hi Bogas,

We are in the process of adding the following settings to limit callbacks:

SMSAccountingOnlyIfNoRoute=Yes - Disables PreAuth and SmsSend callbacks for messages where a route has been explicitly set.

SMSAccountingLimitCallbacks=PreAuth,SMSSend,SMSIn,SMSOut - If this setting is present, any accounting callback types not listed are disabled. For example, SMSAccountingLimitCallbacks=PreAuth,SMSSend enables only PreAuth and SMSSend callbacks (SMSIn and SMSOut are disabled).

An update with those settings should be ready early next week.

However, I think it is important to stress that hundreds of callbacks can be processed per second. PHP in its typical "Fast CGI" implementation, or in ISAPI mode for IIS, can keep pace better than one would expect.

But there are some considerations...

If you are submitting a bulk SMS submission in a single HTTP request, and SMSAccountingMustSetRoute=Yes is set, the submission will block as a callback occurs for each recipient before the processing starts.


quote:

in addition enabled callbacks extremely reduce sms sending speed




If SMPP Async mode is not enabled, slow processing of the SMSOut callback can impact performance. When async mode is enabled, the SMSOut callback occurs in the main transmission thread,


quote:

callback don't work in threads - parallel




That is not true.

But they are often processed in-line for a particular connection, with a few exceptions (such as SMPP async mode). So they can affect performance on a particular connection, but multiple connections work in parallel.


My point is that you are over-generalizing. There are definitely scenarios where callbacks can impact performance. That impact can often be lessened with simple changes such as more connections or SMPP async mode.

That said, I think that settings to help limit callbacks will be a welcome enhancement. Lots of people have asked for this change over the years.

--
Des
NowSMS Support