Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Testing SIPmsg demo defined in titan.TestPorts.SIPmsg(Testing SIPmsg demo defined in titan.TestPorts.SIPmsg)
Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717038] Wed, 09 December 2015 17:22 Go to next message
Yannick LH is currently offline Yannick LHFriend
Messages: 5
Registered: November 2015
Junior Member
Hello,

I open this topic concerning SIP. After installing TITAN and trying to start a 1st basic example (Hello world) which one works, I try to use the SIP Protocol message demo.

My config is the following one : I use TITAN 5.3 under cygwin via Eclipse Luna 4.4.2 .

I imported the source code from GIT: https://github.com/eclipse/titan.TestPorts.SIPmsg.git.

so after some "tests" I finnally build the project and I start Titan parallel launcher ( it seems correct), so i can see the "Main Controller" in TITAN Executing.

It seems listening on a port that change ( but it is normal as it is specified in the doc )

*************************************************************************
* TTCN-3 Test Executor - Main Controller 2 *
* Version: CRL 113 200/5 R4A *
* Copyright (c) 2000-2015 Ericsson Telecom AB *
* All rights reserved. This program and the accompanying materials *
* are made available under the terms of the Eclipse Public License v1.0 *
* which accompanies this distribution, and is available at *
* http://www.eclipse.org/legal/epl-v10.html *
*************************************************************************

Using configuration file: temporal_4821250385716375358_XXXXX.cfg
MC@FR00115358: Listening on TCP port 60095.
MC information:
MC state: listening
host information:
no HCs are connected
pause function: disabled
console logging: enabled

Then I try to start " testcases" and I have the following error message in the console :

"sh: ./......workspaceTESTProtocolSIPbinTESTProtocolSIP.exe: No such file or directory" I guess that the file directory is not correct

I can see the "TESTProtocolSIP.exe" file in bin.

I should miss something, I'm looking for a solution.

Thanks in advance for your support.

Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717140 is a reply to message #1717038] Thu, 10 December 2015 09:19 Go to previous messageGo to next message
Jeno Attila Balasko is currently offline Jeno Attila BalaskoFriend
Messages: 80
Registered: September 2013
Location: Budapest, Hungary
Member

Hi,

the line "sh: ./..." is very strange, the separators are missing. The original consol log is the same? Perhaps it comes from a Windows-Linux separator conflict.
I'm trying to reproduce the errorneous bevior. Is SIP Test Port enough?

BR
Jeno
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717155 is a reply to message #1717140] Thu, 10 December 2015 10:45 Go to previous messageGo to next message
Yannick LH is currently offline Yannick LHFriend
Messages: 5
Registered: November 2015
Junior Member
Hi Jeno,

1st, thanks for ur help.

I think it could be what you wrote me : "Perhaps it comes from a Windows-Linux separator conflict." . It seems i have a bad "path" but as I 'm still beginner with Titan, I think i have a bad configuration .

What do you exactly mean by sip test port? The testcase ?

To precise: the error on the console log occurs when i do right click on the Main Controller and then i click "automatic execution" then testcase "port_teszt" or any others . Am I wrong in the use of the testcase ?

Br,

Yannick
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717165 is a reply to message #1717155] Thu, 10 December 2015 11:50 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
HI Yannick,

I think Jeno was asking if the SIP test port is sufficient to reproduce the problem.

- a few things that are not immediately useful, but may come handy later:

- I have updated the SIP test port revision , so you may want to download the new one
-there's no config file in /demo ( I will add one soon) so either you add initial values in SIPexample.ttcn and SIPeaxmpleTemplates.ttcn (both of them),

for instance


  modulepar charstring      PX_ETS_LOCAL_USER2:="user2";
  modulepar charstring                 PX_ETS_IPADDR2:="127.0.0.1";
  modulepar integer                      PX_ETS_PORT2:=6667;
  modulepar charstring                 PX_ETS_LOCAL_USER:="user1";
  modulepar charstring                 PX_ETS_IPADDR:="127.0.0.1";
  modulepar integer                      PX_ETS_PORT:=6666;



or add your own config file containing some values for these module parameters.


Jeno will continue with the Eclipse setting issue.


BR Elemer
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717172 is a reply to message #1717165] Thu, 10 December 2015 12:31 Go to previous messageGo to next message
Jeno Attila Balasko is currently offline Jeno Attila BalaskoFriend
Messages: 80
Registered: September 2013
Location: Budapest, Hungary
Member

No Message Body
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717175 is a reply to message #1717172] Thu, 10 December 2015 12:47 Go to previous messageGo to next message
Jeno Attila Balasko is currently offline Jeno Attila BalaskoFriend
Messages: 80
Registered: September 2013
Location: Budapest, Hungary
Member

Hi,
Elemer's extension will be really useful!
About the windows and UNIX separators: Do you start eclipse from cygwin terminal or from native windows (from icon or from Windows PowerShell) ?
I would suggest to avoid starting eclipse from cygwin.
BR Jeno
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717177 is a reply to message #1717175] Thu, 10 December 2015 13:24 Go to previous messageGo to next message
Jeno Attila Balasko is currently offline Jeno Attila BalaskoFriend
Messages: 80
Registered: September 2013
Location: Budapest, Hungary
Member

Hi,
another tipp: On the SIP demo project, on context menu>Run as>Run configurations> select the SIP configurations and remove them.
Then create new build configuration! Sometimes eclipse will be confused, in executor perspective this trick can work.
Br Jeno
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717207 is a reply to message #1717177] Thu, 10 December 2015 18:17 Go to previous messageGo to next message
Yannick LH is currently offline Yannick LHFriend
Messages: 5
Registered: November 2015
Junior Member
Hi Elemer, Jeno,

Thank you for your reply.
I added adress and port to simulate SIP. I still have my problem and yes I start Eclipse via cygwin by the cmd :
$ ./eclipse (I have to try starting Eclipse through Powershell. )

Also, I was wondering about the listening port wich is generated dynamically, where this function is implemented ?

I m still looking for a solution to my error I tried to follow ur advices : "select the SIP configurations and remove" but it doesnt changed the error at the moment.

Br,

yannick
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717208 is a reply to message #1717207] Thu, 10 December 2015 18:23 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Yannick,

OK, than that's the reason of your problems;
we don't recommend using Eclipse from within Cygwin, as it leads to all sorts of weird issues.
Is there any chance you could try running it ( Eclipse and plug-ins) from the Windows host?

Best regards

Elemer




Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717320 is a reply to message #1717208] Fri, 11 December 2015 16:35 Go to previous messageGo to next message
Yannick LH is currently offline Yannick LHFriend
Messages: 5
Registered: November 2015
Junior Member
Hi,

Thanks for your answer previously.

I have 2 questions: one concerning the start under Windows and another concerning an error under TITAN executing notification.

Something is not so clear to me with cygwin usage.
From what i rode in the installation documentation :
"Installing Cygwin is optional and only needed if Eclipse is used for project compilation and test execution. TTCN-3 module editing is supported without Cygwin. "
But if i launch Eclipse from Windows, how can I start the "build " which launch command as "make", i guess I have to configure some path, right ?
It's a bit confusing to me this configuration.

However, I used TITAN through cygwin and the MC component is listening. I sent a SIP message (a basic INVITE ) trough the dynamic port running over TCP , it seems TITAN received something but I can read an error in the "notification" tab about "decoding/coding" :
"Error: Error during encoding/decoding of a message: Text decoder: Negative message length (-9)."
"Error: Maleformed message was received on an unknown connection from FR00115358.ericsson.se [LocalIP]."

I was wondering what could be the problem , if you have any idea ( directly), otherwise I also have the wireshark trace. I can send you through email.

Br,

Yannick


Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717323 is a reply to message #1717320] Fri, 11 December 2015 16:47 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Yannick,

yes, there's some configuration needed so Eclipse can find the Cygwin directories;
maybe this video will help:

https://www.youtube.com/watch?v=6CKxOhZt7Gg

It's not done by us, but a user of open source Titan.

Also, the documentation explains how to install and configure the plug-ins.

I see you use machines on the Ericsson internal network, so please look me up in Outlook and send me the Wireshark trace.

Best regards

Elemer
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1717325 is a reply to message #1717323] Fri, 11 December 2015 16:59 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
And another video I just discovered:

https://www.youtube.com/watch?v=hso34ReEiP8

Best regards

Elemer
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1722904 is a reply to message #1717038] Wed, 10 February 2016 08:55 Go to previous messageGo to next message
Martin vom Hagen is currently offline Martin vom HagenFriend
Messages: 4
Registered: February 2016
Junior Member
Hi,

I just managed to compile the SIPmsg Test Port example. Do you know how to build the ETSI SIP test suite? I had to comment out

      type port SipPort message {
                      inout Request,
                            Response,
                            Raw
                            //TODO Alias port message types
                            //(Pls. do not delete or change the above comment,
                            // it helps to find the place when using Eclipse)
//                            ,REGISTER_Request,
//                            INVITE_Request,
//                            OPTIONS_Request,
//                            BYE_Request,
//                            CANCEL_Request,
//                            ACK_Request,
//				Raw_REGISTER_Request,
//                            Raw_INVITE_Request,
//                            Raw_BYE_Request,
//                            Raw_Response,
//                            Raw_Unknown_Request
     }


in SIP_TypesAndConf.ttcn to get rid of errors Duplicate outgoing message type `@SIP_TypesAndConf.Request', Duplicate incoming message type `@SIP_TypesAndConf.Request' and alike.

But when then generating the Makefile just with the derived files from the test suite the compilation complains of a forward declaration of
class SipPort

The problematic line is in SIP_TypesAndConf.hh:
#include "SipPort.hh"

Am I simply missing something? Perhaps ETSI LibSip or something? The inclusion of the SIPmsg Test Port files is not helping.

Greetings,
Martin
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1722984 is a reply to message #1722904] Wed, 10 February 2016 16:16 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Martin,

there's a slight difference between the ETSI SIP type definitions and ours.
(
basically, for reasons of convenience, we have added a top level union type

 type union PDU_SIP
    {
      PDU_SIP_Request           request,
      PDU_SIP_Response          response,
      PDU_SIP_Raw               raw
    }

to which the encoding/decoding functions refer, e.g.:

 external function f_SIP_encode(in PDU_SIP pdu) return charstring;


)




On top of that , the codec functions are not fully auto-generated as for the majority
of the protocol modules: for reasons of speed , they are partly manually written.

Bottom line is, to be able to run the ETSI SIP suite, we will have to produce an ETSI-compatible version of the SIP test port; good news is , we are already working on it ( there have been others requesting it) , and should be ready in a couple of days.
Once this done, the suite should work with no problems.

(We could probably tweak the declarations so the two sides (the ETSI part and the SIP test port part) meet each other to the degree that the code becomes compileable,
but the encoding-decoding will not work anyhow.)


So please keep an eye on this thread ;as soon as the ETSI port is done, I'll post here.

Best regards

Elemer





Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1723070 is a reply to message #1722984] Thu, 11 February 2016 11:24 Go to previous messageGo to next message
Martin vom Hagen is currently offline Martin vom HagenFriend
Messages: 4
Registered: February 2016
Junior Member
Thanks for your quick response, I am then looking forward to hear from you! Smile
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1723678 is a reply to message #1723070] Wed, 17 February 2016 08:35 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Martin,

there's a bit of a problem around SIP, not technical, but administrative:

there is no one unambiguous ETSI SIP variant:

The SESSION INITIATION PROTOCOL (SIP) TEST SUITE contains
SIP_TypesAndConf dated September 2007

The IP MULTIMEDIA SUBSYSTEM (IMS) TEST SUITES contains
LibSip_SIPTypesAndValues dated 2014-01-31

The Diameter on the Rx interface contains LibSip_SIPTypesAndValues.ttcn dated 2011-12-09

The Diameter on the Cx and Dx interfaces contains LibSip_SIPTypesAndValues.ttcn dated 2014-09-18


and the different variants are not exactly compatible ; we are talking with ETSI to find out which version would be the most comprehensive ( as we don't want to produce several Titan-compatible variants ).

It would also help if we could understand what are you pursuing:
is there any specific test suite you are interested in or your interest is generic?


Best regards
Elemer




Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1723750 is a reply to message #1723678] Wed, 17 February 2016 15:33 Go to previous messageGo to next message
Martin vom Hagen is currently offline Martin vom HagenFriend
Messages: 4
Registered: February 2016
Junior Member
Hi back again!

the intention is to be able to test a product against the ETSI SIP conformance test cases to save the effort in self-implementing these. Additionally on top of that, from those tests other tests shall be written.

Nice to hear that you are investigating in this problem!

Best regards,
Martin
Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1723799 is a reply to message #1723750] Thu, 18 February 2016 07:40 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
HI Martin,

OK, in this case I have the following proposal:

I'll see what it takes to adapt the ETSI code for SIP ( http://www.ttcn-3.org/index.php/downloads/publicts/publicts-etsi/27-publicts-sip)
to our SIP test port (instead of creating a new test port for ETSI).
This means that SIP_TypesAndConf.ttcn will be replaced with our (not very different, but still not the same ) type declarations and this change will propagate through the other files, resulting in some modifications.

I'll come back to you soonest(probably beginning of next week) with the initial results.

BR
Elemer






Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1724207 is a reply to message #1723799] Mon, 22 February 2016 10:01 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Martin,

I have modified the ETSI code downloaded from the above location to compile with the SIPmsg test port.
You can download the code from https://github.com/eclipse/titan.misc

as below:


 git clone https://github.com/eclipse/titan.misc

 cd titan.misc
 git submodule init
 git submodule update
 
 cd SIP_ETSI
 ./install.script
 make


I'll add some details about changes later.
The code should be usable now, although you should add a .cfg file containing all (relevant) module parameters and test port parameters.



Best regards

Elemer

Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1724252 is a reply to message #1724207] Mon, 22 February 2016 14:45 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Martin,

first thing I have done was to remove from SIP_TypesAndConf
all structures already declared in SIPmsg_Types.

I have also added some aliases
//aliases      
type  PDU_SIP_Response  Response;
type PDU_SIP_Request    Request;

type PDU_SIP_Request REGISTER_Request;
type PDU_SIP_Request INVITE_Request;
type PDU_SIP_Request OPTIONS_Request;
type PDU_SIP_Request BYE_Request;
type PDU_SIP_Request CANCEL_Request;
type PDU_SIP_Request ACK_Request;


type PDU_SIP_Raw Raw_Response;
type PDU_SIP_Raw Raw_REGISTER_Request;
type PDU_SIP_Raw Raw_BYE_Request;
type PDU_SIP_Raw Raw_Unknown_Request;
type PDU_SIP_Raw Raw_INVITE_Request;

so I can leave type names in the files untouched.


Most changes are due to two differences in declarations (which of course will propagate through the code):

 A
 SIP_TypesAndConf 
 type record WwwAuthenticate {
          FieldName fieldName(WWW_AUTHENTICATE_E),
          Challenge challenge
        }
        
        
to

SIPmsg_Types
      type record WwwAuthenticate
      {
        FieldName           fieldName (WWW_AUTHENTICATE_E),
        Challenge_list      challenge
      }
        
        
//-----------------------------------------------------------------


B
SIP_TypesAndConf 
        type record Authorization {
          FieldName fieldName(AUTHORIZATION_E),
          //dbo:uses as a charstring
          //Credentials body
          charstring body optional
        }


to

SIPmsg_Types
      type record Authorization
      {
        FieldName           fieldName (AUTHORIZATION_E),
        Credentials         body
      }


     type union Credentials
      {
        CommaParam_List     digestResponse,
        OtherAuth       otherResponse
      }


      type record OtherAuth
      {
        charstring          authScheme,
        CommaParam_List     authParams
      }


     type record GenericParam
      {
        charstring          id,
        charstring          paramValue optional
      }

 
      type set of GenericParam GenericParam_List;

      type GenericParam_List CommaParam_List;
      



Of course all imports from SIPmsg_Types and SIPmsg_PortType had to be added accordingly.

As in the old version Credentials are interpreted as a (structured , with delimiters) character string,
while in the new one is a 'set of' structures, I have modified the function calculateCredentials in SIP_steps to return a structure instead of a character string; I'm not exactly sure about the delimiters used ,
so please check this.

Likewise, as in many place character strings were used, I have implemented a function f_convertCredentials to calculate the equivalent character string from a Credential structure; please check this one too.

Wherever I could I did use external functions from our library( TCCUsefulFunctions); If there was no equivalent I have put in dummies , so those will have to be written:

function getMajorDigit() return integer{ return 1};//FIXME
function getMinorDigit() return integer{ return 2};//FIXME

function calculateDigestResponse(
      charstring vl_nonce,
      charstring cnonce,
      charstring user,
      charstring vl_realm,
      charstring passwd,
      charstring alg,
      charstring nonceCount,
      charstring method,
      charstring qop,
      charstring URI,
      charstring HEntity) return charstring {return "FIXME"}; //FIXME
    
function encodeEscapeDelim(charstring user) return charstring{return "FIXME"}; //FIXME


Finally, for test case selection a weird mechanism is used; so I have created a module parameter:


	
	
type record TestCaseSelection
{
charstring tc_name,
boolean    selection
}

type record of TestCaseSelection TestCaseSelectionArray; 
	
	
modulepar TestCaseSelectionArray par_selection:= {
  {tc_name:="SIP_CC_OE_CE_TI_001", selection:= false},
  {tc_name:="SIP_CC_OE_CE_TI_002", selection:= false},
:
  {tc_name:="SIP_RG_RT_V_012", selection:= false},
  {tc_name:="SIP_RG_RT_V_013", selection:= false}
}



This will have to be added to the config file; when a selection for a certain test case name is set to "true", the test case will be executed.

This should give you a head start. Please let me know if you encounter any problems.


Best regards

Elemer

Re: Testing SIPmsg demo defined in titan.TestPorts.SIPmsg [message #1724657 is a reply to message #1724252] Thu, 25 February 2016 10:25 Go to previous message
Martin vom Hagen is currently offline Martin vom HagenFriend
Messages: 4
Registered: February 2016
Junior Member
Hi Elemer,

you did great work! I followed your instructions and was able to compile and execute. Thank you a lot, now I can go further into testing.

Best regards,

Martin
Previous Topic:DTE: Uninitialized field error. Even though the field is initialized.
Next Topic:Implementation of ports
Goto Forum:
  


Current Time: Thu Apr 25 20:15:15 GMT 2024

Powered by FUDForum. Page generated in 0.04059 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top