What’s new in EMG 7.1

Profiling log

Enabled when log level is at least DEBUG or when general keyword PROFILING_THRESHOLD is set. PROFILING_THRESHOLD can be set to a decimal value. For example 0.1 would log all operations that take longer than 0.1 seconds to complete. The log file will be created in default EMG log directory named named “profiling”.

Sample log data:

2015-11-19 11:49:41.396014 |906B7B5E| spent 0.001926s on: roundtrip on operation 21 with trn 1173 on (infoflex-smpp,0)
2015-11-19 11:49:41.396019 |906B7B5E| spent 0.000042s on: incoming ENQUIRE_LINK_RESP (0x80000015) on (infoflex-smpp,0)
2015-11-19 11:50:41.976910 |906B7B5E| spent 0.001840s on: roundtrip on operation 21 with trn 1174 on (infoflex-smpp,0)
2015-11-19 11:50:41.976951 |906B7B5E| spent 0.000078s on: incoming ENQUIRE_LINK_RESP (0x80000015) on (infoflex-smpp,0)
2015-11-19 11:51:18.731747 |908B7563| spent 0.000147s on: operation LOGON for user emguser on (mgp-in1,3)
2015-11-19 11:51:18.732694 |908B7563| spent 0.000826s on: operation GETCONNECTORINFO on (mgp-in1,3)
2015-11-19 11:51:18.733151 |908B7563| spent 0.000023s on: operation LOGOFF on (mgp-in1,3)

Support for JSON and XML responses on HTTP connector

Incoming HTTP connectors can now respond to http requests using JSON and XML format.

Normal URI for sending a message via EMG using HTTP would be “/bin/send”. By adding a “.json” and “.xml” suffix to the uri the respective response format will be used.

Sample requests using “wget”:

wget -q -O - "http://127.0.0.1:8080/bin/send.json?USERNAME=user1&PASSWORD=secret1&DESTADDR=46123456"
{
 "results": [
  {
  "status": "0",
  "msgid": "25593581",
  "statustext": "OK"
  }
 ],
 "balance": "-818.5710"
}
 
wget -q -O - "http://127.0.0.1:8080/bin/send.xml?USERNAME=user1&PASSWORD=secret1&DESTADDR=46123456"
<response>
 <results>
  <result>
   <status>0</status>
   <msgid>25593582</msgid>
   <statustext>OK</statustext>
  </result>
 </results>
 <balance>-818.6210</balance>
</response>

Credit limit for postpaid accounts

A new database column “emguser.charge_balance_postpaid_limit” has been added to limit the negative balance allowed for postpaid accounts.

For example, setting a value of -100 would cause messages to be rejected once charge_balance reaches -100 for the account (emguser).

New MGP operation RESCHEDULE_MESSAGE

A new MGP operation has been added to allow rescheduling a queued message. This operation can be used to retry sending a queued message immediately. The operation requires updated MGP API libraries.

Configurable delay for delivery reports

By default delivery reports are delayed by EMG around 1 second before being sent back to client to ensure the submit message response is received before delivery report. This can now be configured using general keyword DLR_DELAY=x where x is the delay in seconds. Decimal values are supported. It can also be configured on a per-user basis through the new database column “emguser.dlr_delay”.

Validity period override

Minimum and maximum values for a received message validity period can now be set per connector (connector keywords MIN_VP and MAX_VP) and per user (database columns “emguser.min_vp” and “emguser.max_vp”).

If validity period is set and is less than minimum validity period it will be set to the minimum validity period.

If validity period is set and is greater than max validity period it will be set to the max validity period.

Sending connectors can use connector keyword MAX_VP to enforce a max validity period for messages sent over the connector.

Improved character code handling

The goal is to handle different character codings for text (GSM IA5 and ISO 8859-1) more transparently.

The column routelog.charcode should always be set for a message.

New general keyword DEFAULT_CHARCODE_TEXT which indicates which character coding is used for text messages within EMG (1 = IA5, 3 = ISO 8859-1).

New connector keyword DEFAULT_CHARCODE_TEXT which indicates which character coding remote end would expect for text messages.

For example, if the coding within EMG is set to IA5 and coding on connector sending a message is ISO 8859-1 the message will be converted by EMG on the way out.

Sub-second resolution in retry scheme

Retry scheme can now handle delays with sub-second resolution.

Force DCS for text messages

New connector keyword FORCE_DCS_TEXT which can be used to force the DCS value set for text messages.

Schema changes

EMG 7.1 introduces four new fields in “emguser” table and one new field in “cfg_plugins” table.

After updating to EMG 7.1 it is required to run “emgd –upgradedb” before starting emgd in order to upgrade the database schema.