charging using MMSAccounting

charging using MMSAccounting SearchSearch
Author Message
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 114
Registered: 01-2007
Posted on Wednesday, March 05, 2025 - 12:03 pm:   

Hi Nowsms support ,
We are currently migrate our MMSC under windows to Nextgen architecture.
In order to perform the charging , we was using diameter/tcp but our charging system is no more compliant with this and support only diameter/sctp.
Unfortunatly there's no way to do this with nextgen or windows version.
So the workaround will be to perform http request towards a gateway that will translate the http request into sctp diameter request.
i am in test phasis in order to verify that this is possible and the translate gateway is not working. So on MMSAccountingURL i set IP from a lambda http server and i trace the request using tcpdump in order to see the request.
SO the awaiting behaviour , is that when a MMS is send , the charging will be done using http request. we have also to put sgsn-MCC-MNC in order to charge when the user is on roaming situation.

i add into configuration on MMSC.INI
SGSNMCCMNCHeader=X-WAP-3GPP-SGSN-MCC-MNC
AccountingExtraHeaders=X-WAP-3GPP-SGSN-MCC-MNC,X-WAP-3GPP-SGSN-ADDRESS
MMSAccountingURL=http://x.x.x.x/
when i do a test , i see the msend req with proper header enrichment , as soon the msend req is received , there s a get http send to the mmsaccountingurl server. see below for the content and screenshot f trace( tell me if you need the whole trace , i will send it internally )
trace

trace

Now that the test is describe , here's my questions and remarks. :
- on the screenshot , you can see that there's no SGSN-MCC-MNC on the preauth request. but maybe it is just for Preauth request. SO maybe the preauth doesnt' care from roaming and this should be used on charging request , The charging request "MMSSend Charging Callback" is not perform because there's nothing on the remote http server ?
- if not how can add SGSN MCC-MNC on the request?
- we need only charging and not preauth because we use already mmsaccounting callback request ( MMSRoutingURL ) . how can i have only charging request ?

thanks before hand for your feedback
have a nice day ,
Br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8556
Registered: 10-2002
Posted on Wednesday, March 05, 2025 - 09:27 pm:   

Hi Marc,

1. Do you have the MMSC.INI [MMSC] setting in place AccountingExtraHeaders=SGSN-MCC-MNC,SGSN-IP

This should cause those headers to be extracted and included in the callback as URL parameters.

2. Unfortunately it is not possible to disable the PreAuth callback. We would recommend just ignoring it in your callback script but ensuring that you return an HTTP 200 OK response so the message is not rejected.

3. We are close to having an implementation with preliminary support for SCTP on Linux. Unfortunately we have no way to test it.

Regards,

Bryce
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 115
Registered: 01-2007
Posted on Thursday, March 06, 2025 - 01:21 pm:   

Hi Bryce ,
Thanks for your feedback,
this is definitly better , as you can see on the trace , as soon the msend req arrive , there's the preauth request followed by the "charging" one ( that is quite similar excepted the preauth)
the MNC MCC and the sgsn IP are now in the request.

tcpdump

Note that , my web server is only for test , and there's nothing that listen except tcp port 80 . but it is quite interessting because the 302 responded by the server , allow the mms to be send even if it did nt respond by HTTP 200 OK. this is the case for the preauth and the charging request.


Regarding SCTP , i can help here. i have a testbed system connected to a dev charging system , so i can do test for you. we can have a call in order to see what it can be done.
i have some skills regarding sctp so i can help. if it is ok , i will ask our core network team to configure the association in order the mmsc to connect. This is more relevant for us to have the sctp instead of a gateway that could add some point of failure.

Br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8557
Registered: 10-2002
Posted on Thursday, March 06, 2025 - 08:51 pm:   

The callback logic follows a 301/302 redirect, so if the redirect results in a 200 OK that is acceptable.

We've posted a version which is an initial attempt at supporting SCTP for DIAMETER, currently version 2025.03.06.
To update the Linux version, edit SMSGW.INI and under the [SMSGW] header add UpdateChannel=alpha ... Reload the "Admin/System Configuration" page in the web interface, and a button should appear near the top right corner to download the update. If the update button is not shown, it may be necessary to wait a few minutes and reload the page again.

The relevant changes are enabled by 1 new INI setting and 1 modified setting.

In the [MM9Diameter] section, add SCTP=Yes to enable SCTP.

When that setting is present, the Destination-Host-Address setting is parsed as a comma delimited list of destination host IP addresses, optionally including a port number (default port if not specified is 3868). For example:
Destination-Host-Address=192.168.1.45:3868,10.0.0.5:3868
Up to 8 destination addresses are supported.

Be sure to enable the debug log so we can see what happens. Confusingly there is only 1 debug log, SMSDEBUG.LOG.
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 116
Registered: 01-2007
Posted on Friday, March 07, 2025 - 07:59 am:   

Hi Bryce,
Thanks for your feedback ,
we are currently implementing the NowSMS NextGen Version 2024.05.15.
I did try to set the updatechannel and reload but i don't see any button appearing, should i downgrade into version 2025.03.06 ?
thanks for your feedback ,
Br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8558
Registered: 10-2002
Posted on Friday, March 07, 2025 - 12:16 pm:   

Use https://nowsms.com/download/linux/alpha/nowsms.tar.gz
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 117
Registered: 01-2007
Posted on Friday, March 07, 2025 - 02:07 pm:   

Hi Bryce ,
Thanks ,

In order to perform some tests , i need couple of things ,
ask architect for having and build two interfaces for diameter exchange , open the flow.
test diameter with core network team.

it should be relatively short time , but who knows ^^

as soon as i will have all this things i will be able to test.

Regarding the version , i have question, currently our futur production MMSC is on NowSMS NextGen Version 2024.05.15, but i will have to downgrade into version 2025.03.06 for sctp testing. the reason to not use testbed , is that currently , testbed system doesn't take traffic , and charging is launch by traffic. so i wanted to deploy it onto the futur linux mmsc ( that are not already onto production )
currently the real traffic is manage by windows nowsms version. if the test is correct , how will you do to implement the sctp onto NowSMS NextGen Version 2024.05.15 ?

is there any tool like MM9.exe that generate diameter request on linux ?

thanks beforehand for your feedback
Br
Marc
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 118
Registered: 01-2007
Posted on Thursday, March 20, 2025 - 03:54 pm:   

Hi Bryce ,
the MMSC is ready , i have two interfaces for the diameter , and flow had been opened for the access to charging system.

could you give me a feedback regarding my questions on the previous post on version with sctp . this is to know if i need a downgrade , or if the version we have could be use to activate sctp.

if i need to be on 2025.03.06 , what is the simplest way to do that , to keep the current configuration.

i can create a new post because the current topic is not related to sctp .

thanks beforehand for your feedback.

have a nice day
Br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8561
Registered: 10-2002
Posted on Thursday, March 20, 2025 - 05:41 pm:   

Hi Marc,

I am confused by your referring to version 2025.03.06 as a "downgrade", as it is a newer version than 2024.05.15.

To upgrade, download https://nowsms.com/download/linux/alpha/nowsms.tar.gz

One of the following commands should work:

curl https://nowsms.com/download/linux/alpha/nowsms.tar.gz -o nowsms.tar.gz

wget https://nowsms.com/download/linux/alpha/nowsms.tar.gz

Extract the installation program, NowSMSInstall with the following command:
tar -xzf nowsms.tar.gz

Set permissions to allow the installation program execute:
chmod +x NowSMSInstall

Start the installation with the following command:
./NowSMSInstall

If a desktop session is available, a web browser will open with an option to install. Otherwise the console window will tell you to press the "U" key to update/upgrade.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8562
Registered: 10-2002
Posted on Thursday, March 20, 2025 - 05:46 pm:   

There is not currently a Linux tool for configuring Diameter settings, only the command line tool for Windows. But the same MMSC.INI settings are available for both environments using the same syntax, with the exception of the one new setting to enable SCTP, and the changed setting to configure the multiple SCTP endpoints, as were detailed earlier.
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 119
Registered: 01-2007
Posted on Friday, March 21, 2025 - 11:21 am:   

Hi Bryce ,
Sorry , my mistake for the version ,
i did the upgrade , enable the sctp by adding SCTP=Yes on the mmsc.ini.

when i test , on pcap , i see the msend req and almost immediatly i have a m send conf with error ( see a screenshot below ). but i don't see any attempt to open the association , in order to do the CER and CCR diameter request.
pcap screenshot

on the smsdebug , i see a failed ,
14:02:14:920955 [7FE253AFA640] m=73,0 ThreadProcessConnectionMMSC: Got application/vnd.wap.mms-message
14:02:14:921014 [7FE253AFA640] m=73,0 ThreadProcessConnectionMMSC: Got m-send-req
14:02:14:921380 [7FE253AFA640] m=73,0 ThreadProcessConnectionMMSC: msisdnHeader auth for user +26269377xxxx
14:02:14:921403 [7FE253AFA640] m=73,0 ThreadProcessConnectionMMSC: TO: +26269208yyyy/TYPE=PLMN
14:02:14:921414 [7FE253AFA640] m=74,0 ParseMMSContentClass: body part #1 Content-Type = application/smil
14:02:14:921420 [7FE253AFA640] m=74,0 ParseMMSContentClass: body part #2 Content-Type = image/jpeg
14:02:14:921425 [7FE253AFA640] m=74,0 ParseMMSContentClass: body part #3 Content-Type = text/plain
14:02:14:921430 [7FE253AFA640] m=74,0 ParseMMSContentClass: got image
14:02:14:921456 [7FE253AFA640] m=74,0 MMSRoutingCallback: +26269208yyyy/TYPE=PLMN
14:02:14:921693 [7FE253AFA640] m=74,0 MMSRoutingCallback: +26269208yyyy/TYPE=PLMN
14:02:14:922960 [7FE253AFA640] m=74,0 CheckMMSBlockedContent: body part #1 Content-Type = application/smil
14:02:14:922977 [7FE253AFA640] m=74,0 CheckMMSBlockedContent: body part #2 Content-Type = image/jpeg
14:02:14:922982 [7FE253AFA640] m=74,0 CheckMMSBlockedContent: body part #3 Content-Type = text/plain
14:02:14:923022 [7FE253AFA640] m=74,0 MMSAccountingDiameterChargeArray: Diameter charge FAILED
14:02:14:923030 [7FE253AFA640] m=74,0 userAccount=: +26269377xxxx
14:02:16:016972 [7FE253CFC640] m=72,0 AssignThreadNumber: InternalProcessConnectionMMSC


thanks beforehand for your feedback ,
Br
Marc}
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8565
Registered: 10-2002
Posted on Friday, March 21, 2025 - 06:22 pm:   

Hi Marc,

It looks like the Diameter SCTP connection is not getting established. Can you search the log for ThreadProcessDiameterOut? That will hopefully offer some insight to the stage at which the connection is failing.
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 120
Registered: 01-2007
Posted on Thursday, July 10, 2025 - 01:54 pm:   

Hi Nowsms support ,
internal team did the configuration in order to validate the SCTP /diameter on the mmsc.
Note that , there's an SCTP INIT , and the heeartbeat is ok too. Now in order to test the CER and CCR , i need to know if it is possible to have a static source port. Currently the Source port is dynamic , but for security reason , guy from Charging system need a static port.
is it possible?
Thanks before hand for your feedback ,
br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8572
Registered: 10-2002
Posted on Friday, July 11, 2025 - 09:23 pm:   

Hi Marc,

We've pushed an update out to the alpha channel. Version 2025.07.10 will allow you to set the origin port number for the Diameter client in the MMSC. Under the [MM9Diameter] header in MMSC.INI you can add a setting Source-Host-Port-Number=####

This setting is supported for either SCTP or TCP, but when SCTP is active and this setting is applied, the SMSDEBUG.LOG should give some info. If it is successful, you should see "ThreadProcessDiameterOut: SCTP bound to source port XXXX" or "ThreadProcessDiameterOut: SCTP Error binding to source port XXXX".

Regards,

Bryce Norwood
NowSMS Support
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 121
Registered: 01-2007
Posted on Tuesday, July 15, 2025 - 02:58 pm:   

Hi Bryce
Thanks for the advice , it is ok now for the port.

Now i have a next issue , the server reject the connection because on the sctp init , IP address from all the interface is set as IPV4. see screenshot
screenshot from pcap

i did try to set ip like the port , by adding
Source-Host-Address=X.X.180.229,X.X.182.229
but without effect

is it a way to set it ?
thanks beforehand for your feedback
Br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8573
Registered: 10-2002
Posted on Tuesday, July 15, 2025 - 06:52 pm:   

Hi Marc,

I don't think that I/we have sufficient expertise with SCTP to understand why the connection is being aborted, or how to fix this.

Here is an overview of how we are initializing the SCTP connection, perhaps we are missing a step?

diameterSocket = socket (AF_INET, SOCK_STREAM, IPPROTO_SCTP);

If Source-Port-Number is set we use the bind command to bind the socket to the port and any IP (INADDR_ANY).

Next, we use sctp_connectx passing an array of remote/destination addresses (Destination-Host-Address).

Perhaps instead of bind, we should use sctp_bindx passing an array of local/source IPs (Source-Host-Address)???

Any thoughts?

Regards,

Bryce
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 122
Registered: 01-2007
Posted on Wednesday, July 16, 2025 - 07:29 am:   

Hi Bryce ,
Sorry for the misunderstanding ,
Server reject the connection because , on the SCTP init , there are 4 IP addresses.
on the server side , IP address from client are configured , but only IP address from the interface that manage the SCTP. currently the sctp init , include also IP from managment and mediation interface that doesn't act for diamter.
on our case , as our MMSC has got 4 IP interfaces , on the sctp init , there's 4 IP addresses instead of 2 IP addresses ( the 2 diameter interfaces ).
i was thinking that we could set the IP address ( like the source port ) in order to have only the two diameter Ip interfaces on the sctp init.

I ask to charging system team if they can allow all the IP addresses from mmsc instead of the two diameter interfaces in case it is too difficult to set ip on the client side.

thanks for your support and advices,
br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8575
Registered: 10-2002
Posted on Wednesday, July 16, 2025 - 03:28 pm:   

Hi Marc,

OK. In this case, it would appear that we need to use sctp_bindx to explicitly set which IP addresses to use for the connection.

We will add support for Source-Host-Address=X.X.180.229,X.X.182.229 to specify which IP addresses to include in the SCTP connection. It expects a comma delimited list.

The version at the previously mentioned link has been updated to 2025.07.14

Regards,

Bryce
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 123
Registered: 01-2007
Posted on Wednesday, July 16, 2025 - 03:36 pm:   

Hi Bryce ,
Thanks for the always professional support. when i compare with other company , for which we pay support , it a shame. Good job.
let me test this. i will give you feedback as soon as possible
br
Marc
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 124
Registered: 01-2007
Posted on Monday, July 21, 2025 - 07:45 am:   

Hi Bryce
we did a test after correcting the source port and the source address , but still it doesn't work.
in fact what we see is the following.
SCTP INITis done and SCTP INIT ack is send back from diameter server. but nothing happen, and 10 sec after that server ABORT the sctp exchange.
This is like , no diameter request is done so server close it.
i guess normally , there s a CER send by the mmsc.
thanks beforehand for your support,
Br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8576
Registered: 10-2002
Posted on Monday, July 21, 2025 - 08:06 pm:   

Hi Marc,

The SMSDEBG.LOG revealed a logic error in our SCTP implementation. Without direct access to an SCTP based Diameter server, it's likely to be several more iterations of trial and error, but hopefully we are getting close.

2025.07.21 posted.

Regards,

Bryce
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 125
Registered: 01-2007
Posted on Tuesday, July 22, 2025 - 08:28 am:   

Hi Bryce ,
Thanks for the support , don't worry , we will achieve this. And what could be a good thing to go further , when sctp will be operational , is a connection to HLR or HSS in order to treat mobile numnber portability. Doing a sri for sm is quite the only way to have a correct information regarding MNP.

Can you check the version on alpha directory ? if i am not mistaken , the version on the directory is still 2025.07.14 so i guess it is not the correct one.

thnaks for your feedback,
Br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8577
Registered: 10-2002
Posted on Tuesday, July 22, 2025 - 04:57 pm:   

Hi Marc,

Clear your browser cache and try again. I've confirmed that the alpha link has the correct file.

Regards,

Bryce
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 126
Registered: 01-2007
Posted on Monday, August 04, 2025 - 03:58 pm:   

Hi Bryce ,
Sorry for the delay, and for the cache ^^
Thanks , good news ,
i did test and now i have the diameter over sctp that do the CER.
I have got an error diameter_unknow_peer 3010 so i guess it is just matter of configuration between the mmsc and the diameter server. and if you see the trace , you can notice that AVP 257 Host-IP-address is set to 255.255.255.255 so diameter server reject it as this is not the correct IP Address.

trace CER

it smell's good,
Br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8578
Registered: 10-2002
Posted on Monday, August 04, 2025 - 11:16 pm:   

The code that encodes AVP 257 Host-IP-address was confused by the multiple IP addresses. So, another update and it uses the first address.

Version is now 2025.08.04
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 127
Registered: 01-2007
Posted on Tuesday, August 05, 2025 - 02:27 pm:   

Hi Bryce ,
good news , with this version , CER receive a 2001 response and there's a CCR that is initiated when a MMS MO is sent.
the credit control request receive an error , but due to internal missing configuration in order to connect to the charging system.
As soon this issue will be resolved , i will be able to follow up for testing all the diameter exchange, test the multihoming , etc, in order to fully validate the Diameter over SCTP.
do you want me to test particular use case ?
br
Marc
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 128
Registered: 01-2007
Posted on Wednesday, August 06, 2025 - 02:01 pm:   

Hi Bryce ,
Great News , and not the less , thanks a lot for your work and troubleshoot.
We did configure properly the diameter node and now it is working perfectly.
the CCR is ok and receive the expected response from server.
i have now to validate all of that before putting this into production.
don't forget to tell me if you need specific use case , to test and trace.
Br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8580
Registered: 10-2002
Posted on Friday, August 08, 2025 - 07:00 pm:   

Hi Marc,

The only test case that I would have concern about is whether the SCTP connection can be properly re-established after an unexpected disconnect. We think it should reconnect properly, but if you could test this it would be appreciated.

Regards,

Bryce

Add Your Message Here, or click here to start a new topic.
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image
Options: Automatically activate URLs in message
Action: