Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDR Enhancements - detailed CDRs #216

Closed
vetss opened this issue May 15, 2017 · 2 comments
Closed

CDR Enhancements - detailed CDRs #216

vetss opened this issue May 15, 2017 · 2 comments
Assignees
Milestone

Comments

@vetss
Copy link
Contributor

vetss commented May 15, 2017

A suggested list of fields :

  1. CDR recording timestamp
  2. Event type
  3. ErrorCode (status)
  4. MessageType
  5. Status code:
    a) Out SMPP response value (for out_smpp_rejected case - received non zero smpp response code when message sending, 0 for other cases)
    b) In SMPP response value (for in_smpp_reject_* cases - sent non zero smpp response code when message receiving, 0 for other cases)
    c) In HTTP response code (for in_http_reject_* cases - sent non zero http response code when a http response sending (code in the message body), 0 for other cases)
  6. CorrelationId (== messageId of a message)
  7. OrigCorrelationId (== messageId of an original message if this a recognized DLR and an original message is found, else - empty value)
  8. DlrStatus (value of “stat” field of DLR. Empty if it is not a DLR. “err” if it is a DLR but the field is not parsed or have different values in text and TLV parts)
  9. mprocRuleId (that led a message drop / reject, for in_smpp_reject_mproc, in_smpp_drop_mproc, in_http_reject_mproc, in_http_drop_mproc, else - empty value)
  10. ESME name (via which a message has come to SMSC for an IN case or has sent to SMSC GW via which a message has left SMSC GW for an OUT case, an empty value for other cases)
  11. Timestamp A
  12. Timestamp B
  13. Timestamp C
  14. Source IP (if a value is available for a channel connection)
  15. Source port (if a value is available for a channel connection)
  16. Dest IP (if a value is available for a channel connection)
  17. Dest port (if a value is available for a channel connection)
  18. SequenceNumber (for SMPP messages both for sending / receiving)

Below is a definition for fields values:

** Event types:

a) “In” (a result of message receiving) - we cover only smpp and http sides this step

in_smpp_received (a message is accepted from smpp connector)
in_smpp_reject_forbidden (smpp msg is rejected - reason: administrative reasons - SMSC is stopped or paused, cassandra database is not available, all messages from SMPP connector or a concrete ESME are forbidden)
in_smpp_reject_cong (smpp msg is rejected - reason: congestion at SMSC GW level or for a customer limitation)
in_smpp_reject_diameter (smpp msg is rejected - reason: rejection by a diameter server - ChargingSbb !!!)
in_smpp_reject_mproc (smpp msg is rejected - reason: rejection by mprov rules)
in_smpp_drop_mproc (smpp msg is dropped (OK result was sent to a sender but a message is dropped) - reason: rejection by mprov rules)
in_smpp_error (a message receiving failed for other reasons)

in_http_received (a message is accepted from http connector)
in_http_reject_forbidden (http msg is rejected - reason: administrative reasons - SMSC is stopped or paused, cassandra database is not available, all messages from HTTP connector are forbidden)
in_http_reject_cong (http msg is rejected - reason: congestion at SMSC GW level or for a customer limitation)
in_http_reject_diameter (http msg is rejected - reason: rejection by a diameter server - ChargingSbb !!!)
in_http_reject_mproc (http msg is rejected - reason: rejection by mprov rules)
in_http_drop_mproc (http msg is dropped (OK result was sent to a sender but a message is dropped) - reason: rejection by mprov rules)
in_http_error (a message receiving failed for other reasons)

b) “Out” (a result of message sending) - we cover only smpp side this step

out_smpp_sent (smpp: a message is successfully sent)
out_smpp_rejected (smpp: received non zero smpp response code when message sending)
out_smpp_error (smpp: error in a sending process for example a channel error)
out_smpp_timout (smpp: no response from a peer intime may be because of connection problems or peer malfunction, delivery timeout case included)
validiy_period_timeout (a message has not sent because of validity period timeout)

** ErrorCode:
From org.mobicents.smsc.library.ErrorCode.
We have error codes for all delivery parts. We need to add error codes for rejecting at an incoming step and internal rejecting by mproc rules (new values will be added from number 229).

** MessageType:
SubmitSm
SubmitMulti
DeliverSm
DataSm
Http

** Timestamp A :
IN: The time the message is successfully decoded
OUT: The time the message is received for sending

** Timestamp B :
IN: The timestamp taken immediately after sending of the response
OUT: Immediately after sending of the request

** Timestamp C :
IN: The timestamp taken immediately after submission for further processing
OUT: the time the message response is successfully decoded

This cdr logging will be put in a separate file “*.dcdr” (dcdr == detailed CDRs).
This logging is turned off by default. Configuring by:
GUI: “SMSC Gateway Server Settings - CDR - Generate detailed CDRs“
CLI: smsc set generateredcdr false

Testing:
Testing of a live system - checking generated CDRs for ALL described before cases including of checking values of fields
performance testing to see the impact of counters and potentially batch on the CI env performance job

@deruelle deruelle added this to the 7.3.0-sprint1 milestone May 16, 2017
@vetss
Copy link
Contributor Author

vetss commented Jul 3, 2017

Hello @satanatoly

I have a short look for https://github.com/satanatoly/smscgateway/commit/2833df266f43fe6225936c537967124eb9a66845

My comments:

  • I do not see you save timestamps A-C from anythere from code, so I think you have not finished of implementing, do you use also all needed fields like IP addresses etc ?
  • IMHO timestamps A-C are not needed to save into a database because they will be used before string of a message into a database.
  • code style - we need to remove extra unused "imports"
  • we need to store detailed CDRc into a special separate file and for this we need to update jboss-log4j.xml config file (and templates for it inside SMSC GW project)

vetss added a commit to vetss/smscgateway that referenced this issue Jul 4, 2017
vetss pushed a commit to vetss/smscgateway that referenced this issue Jul 4, 2017
vetss pushed a commit to vetss/smscgateway that referenced this issue Jul 4, 2017
vetss pushed a commit to vetss/smscgateway that referenced this issue Jul 4, 2017
vetss added a commit to vetss/smscgateway that referenced this issue Jul 4, 2017
satanatoly added a commit that referenced this issue Jul 11, 2017
satanatoly added a commit that referenced this issue Jul 24, 2017
…o false and configuring respective simulator profile smsc settings to true
satanatoly added a commit that referenced this issue Jul 25, 2017
@satanatoly
Copy link
Contributor

satanatoly added a commit that referenced this issue Jul 27, 2017
@vetss vetss closed this as completed Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants