When we use SMPP as SMS gateway to send SMS from Clearpass Guest we could find the following issue.
The following error is seen in the Application Log under ClearPass Guest - 'Unable to send message. No Error - 0x0
On analyzing the packet captures we could notice that ClearPass is submitting a Malformed Packet to the configured SMS service provider.
The Packet captures are pre-filtered for communication between ClearPass and the service provider.
As per the service provider log analysis, the cause for marking the sms requested as Malformed Packet we have found the following.
“ SMS Provider receives following string in his application while transferring a SMS:
The red marked characters represent the length of the command string. As the trailing ‘00’ (green marked) do not have any function it might get stripped off and therefore the length of the command string changes. But not the ‘3C’ in the transmitted command string. This is why they get the parse error.
SMS Provider would expect the above string as following:
As the command length is shorter, the length should be changed from ‘3C‘ to ‘3B‘ ”
The SMPP spec says “Octet String: A series of octets, not necessarily NULL terminated.”, so the system they are using is assuming that Octet String are NOT null terminated, however, our code is making the assumption that they ARE null terminated, but not actually adding a null terminator to the string. So there are not enough chars, and it thinks the extra space is option package, but it’s an invalid options package size.
The optimization can be done only from command line for CPPM version prior to 6.6.2 and this can be done only from support login (TAC only) has root privilege.
We need to edit the /opt/amigopod/www/_include/NwaCore/smppclient.clas
And change the following parameter from true to false
public static $sms_null_terminate_octetstring=true
public static $sms_null_terminate_octetstring=false
Restart all the services in CPPM and to verify the working state.
This could also not work if there are any NPI values set, however if the SMPP is set to accept any NPI [Numbering plan indicator] value then it should work.
Note: By default the NPI value is null and will be set to SMPP::NPI_UNKNOWN
To verify the NPI value settings edit /opt/amigopod/www/_include//NwaCore/NwaSmsHan
$from = new SmppAddress($options['sms_source'], (is_numeric($options['sms_source']) ? SMPP::TON_INTERNATIONAL : SMPP::TON_ALPHANUMERIC), SMPP::NPI_UNKNOWN);
Save, restart the service and test to verify.
If you are using Clearpass version 6.6.2 then we have an option in UI in SMS gateway Configuration settings available in Clearpass Guest as show below.