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

CAP: Implementation of callGap operation (code=41) #77

Closed
domimod opened this issue May 9, 2016 · 12 comments
Closed

CAP: Implementation of callGap operation (code=41) #77

domimod opened this issue May 9, 2016 · 12 comments
Assignees
Milestone

Comments

@domimod
Copy link

domimod commented May 9, 2016

Implementation of CAP CallGap operation.

The CAP CallGap (CG) operation may be used at any moment during an active CAMEL dialogue, and the operation may be sent from TelScale to multiple MSCs. For CAMEL, this operation can only be sent on a dialogue opened by the gsmSSF by an InitialDP operation. This is a TC class 4 operation (neither results nor errors are reported).

Implementation should be according to: ETSI TS 129 078 V13.0.0 (2016-01) - CAMEL Application Part (CAP) specification (3GPP TS 29.078 version 13.0.0 Release 13)

@deruelle deruelle added this to the 3.1.0 milestone May 9, 2016
@vetss vetss changed the title Implementation of CAP Call Gapping CAP: Implementation of callGap operation (code=41) May 9, 2016
@vetss vetss modified the milestone: 7.1.0 Jun 30, 2016
@deruelle
Copy link
Member

@domimod any news on that one ?

@bkrok
Copy link
Collaborator

bkrok commented Jan 10, 2017

As we are ready to contribute enhancement please assign me to that case.

@deruelle
Copy link
Member

@bkrok please accept the invitation at https://github.com/RestComm/jss7/invitations

@vetss
Copy link
Contributor

vetss commented Jan 12, 2017

Partially fixed by:

47974b2
fbe4692

@vetss
Copy link
Contributor

vetss commented Jan 12, 2017

Hello @bkrok

I have added your update from #193 into a master branch and also I have fixed some staff (not all needed updates), please see my extra commit:
fbe4692

But the task is not fully done:

  1. CallGap operation is available only for CAP V 3 and 4. You added also V2. I have fixed it in my commit
  2. CallGapRequest - I have removed "isCapVersion3OrLater" variable because we need in this only if encoding is different between CAP versions
  3. We need to add new added primitives into a factory "CAPParameterFactoryImpl.java"
  4. We need to add unit tests and by them check encoding / decoding and XML serializing part. Please add it. This step may bring some bug fixing at code. If you have live traces it is better to take data from them, else you need to create your own data. We do unit tests for at least two minimal and maximal set of parameters for a primitive. In choice case we have obviousely cover all choises.
  5. We need to add a functional test for the operation. Please add it. This step may bring some bug fixing at code. Check "CAPFunctionalTest.java" class.
  6. I refactor several primitive implementation by using of SequenceBase implementation. Please follw this way in further implementations. (These is no sucj base class for a choice primitive)
  7. Choice cases:
  • you need to provide tegTag / Class / isPrimitive for proper values for any choice and reuse them in encoding
  • BasicGapCriteria has two-level choices (rather compliceted). I made some updates for encoding as I think they must be. If you have some traces please recheck encoding style.

Then we will need to update also CAP RA with the new opration.

@bkrok
Copy link
Collaborator

bkrok commented Jan 16, 2017

Hello @vetss

Thanks for your suggestions.

I have tested callgap after your modification and unfortunately it doesn't work now (I have test service and simulator scenario).
[CAPParsingComponentException when parsing components: MistypedParameter - IOException when decoding BasicGapCriteria: AsnInputStream has reached the end
org.mobicents.protocols.ss7.cap.api.CAPParsingComponentException: IOException when decoding BasicGapCriteria: AsnInputStream has reached the end]

I don't have live traces so can you tell me what is the fastest way to create data to do unit tests?

@vetss
Copy link
Contributor

vetss commented Jan 16, 2017

Hello @bkrok

my updates do not cover all cases / bugs so you need to continure a work with unit test / functional test implementing and debugging of staff a primitive after a primitive.

If you don't have live traces you can do following:

  • create a unit test module for encoding, this will provide you encoded data. Then you can check bytes manually or / and decode them. You will have to get same decoded data. Do not forget to create tests for cases all parameters / min set of parameters.
  • if encoding rules are complicated and not clear you can use FunctionalTest that allow to save pcap trace data. Than you can just open WireShark and check if it properly decodes what you have encoded.
  • inside unit tests you need to add a test for XML encoding. This test has text output. You can check / print manually it and check if the XML content fits to original values.

We do so way for adding of new operations

@vetss
Copy link
Contributor

vetss commented Jan 18, 2017

Fixing by commits:

47974b2
fbe4692
d9c7a4e
b6cce6c
364f07a
ebf4b41
f9b7d07

@vetss
Copy link
Contributor

vetss commented Feb 10, 2017

Hello @bkrok

I have checked your update #198, thanks for your work.

  1. The problem is UnitTests are not properly formed:
  • each file for unit testing must be for encoding / decoding of a primitive that is described (you can check our other test implementations). For example BasicGapCriteriaTest test tests decoding / encoding of a top level primitive CallGapRequestImpl. A root element for encoding must be BasicGapCriteria for this java test file. But we need to test BasicGapCriteria and for lower primitives we need to create separate tests in separate files (like a separate GapCriteriaImplTest file).
  • not all choices are tested. For example BasicGapCriteriaTest does not contain a test for "calledAddressValue [0] Digits {bound}," choice.
  • we need to implement tests for XML (de)serializing (if we support XML serializing in an operation).
  • all tests (serializing / XML serializing) must cover at least two cases - min possible set of parameters / full set of paramteres to test all cases.
  1. Functional test must also contain code like
    assertTrue(Client.checkTestInitialDp(ind));
    and not like
    System.out.println("ERROR");
    because we need the test will automated check and generate errors if any (withoul manual logd chacking).

  2. Functional test doews not pass (I have commented it out)

May I ask t fix tests and possibly implementation if needed ? I have added your commint and two my commits (with some fixes).

@bkrok
Copy link
Collaborator

bkrok commented Feb 10, 2017

Hello @vetss

I will do it asap.

@vetss
Copy link
Contributor

vetss commented Feb 10, 2017

Hello @bkrok

thank you. Let's finish this isue in a short time because not much work is still pending.

@vetss
Copy link
Contributor

vetss commented Feb 24, 2017

Hello @bkrok

thanks for your PR #203, I have added it.

Also I made some updates from my side for extra testing that was not provided by your update and little code update for bug fixing. Please test the result.
This is my commit:
f9b7d07

@vetss vetss closed this as completed Feb 24, 2017
@ghost ghost assigned vetss Feb 24, 2017
@ghost ghost removed the Peer Review label Feb 24, 2017
vetss added a commit to vetss/jss7 that referenced this issue Mar 15, 2017
vetss added a commit to vetss/jss7 that referenced this issue Mar 15, 2017
Conflicts:
	cap/CAPMessagesImplemented.ods
vetss added a commit to vetss/jss7 that referenced this issue Mar 15, 2017
Conflicts:
	cap/CAPMessagesImplemented.ods
	cap/cap-impl/src/main/java/org/mobicents/protocols/ss7/cap/primitives/OctetStringBase.java
@vetss vetss modified the milestones: 7.2.0, 8.0.0 Mar 22, 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