providing the highest level of communication services

That's funny

I started last year a comparable project - had the same intend like you. Currently i'm completing the callevents - found this site while googling for an problem with divertedEvent.

I'll take a look over it, maybe i can help with code - i use an Alcatel Enterprise switch for my developement. It looks, like you have much more coding done, than me. I'll try to get it run against my Alcatel...

Regards

Mario

Hi, Great post, it really

Hi, Great post, it really helped.

Alcatel & opencsta

Hi Chris & Mario!

I'm starting to implement a csta connector for Wybecom TALK. First, it will be wrote for Alcatel platform compliance.

I will let you know how my work is going.

Kind Regards,
Yohann

ok

wybecom wrote:
Hi Chris & Mario!

I'm starting to implement a csta connector for Wybecom TALK. First, it will be wrote for Alcatel platform compliance.

I will let you know how my work is going.

Kind Regards,
Yohann

Sounds good - i'll try to assist where i can. Mario is the alcatel guy though, so you may need to work closely with him on alcatel specific stuff - providing he's available.

Good luck,

Chers
Chris

Great

I'll be available for this, but first from november - currently in vacation...

Greetings from Utah,
Mario

Hmmmm... all sounds

Hmmmm... all sounds interesting.

In this opencsta project, the ericsson md110 does csta phase I through applink version 4.0 - the siemens does phase III.

Both phase I and phase III have become supported in the client package this year.

If you send some ASN.1 strings for CSTA <---> Alcatel communication, within a week or two I could have support for it to test - could save you some time.

Here are some steps to add alcatel support in opencsta with phase II:

1. Create a package org.opencsta.client.alcatel
2. Create class org.opencsta.client.alcatel.AlcatelCSTA.java
3. Create class org.opencsta.client.alcatel.Client_Layer7.java

For (3) you can just copy the Siemens package Client_Layer7.java

Modify WorkString() in Client_Layer7.java so that each portion of your ASN.1 string can be removed as it is parsed. You'll notice that 0x15 is a CSTA Event for Siemens with Phase III. The ericsson, if you look at org.opencsta.client.ericsson.Client_Layer7.java in WorkString() has a different hex value for a CSTA Event - a) because it's ericsson; and b) because it's phase I (I'm guessing).


...snippet...
if( curInStr.charAt(0) == 0xA2 )//ROSE RESPONSE
curInStr = DeleteChars(curInStr, 2) ;
else if (curInStr.charAt(0) == 0x02 && curInStr.charAt(1) != 0x01){//INTEGER (INVOKE ID)
int length = (int)curInStr.charAt(1) ;
length += 2 ;
curInStr = DeleteChars(curInStr, length) ;
}

else if(curInStr.charAt(0) == 0x30)//SEQUENCE
curInStr = DeleteChars(curInStr, 2) ;

else if(curInStr.charAt(0) == 0x02 && curInStr.charAt(1) == 0x01){//WHICH SERVICE IT IS
if( curInStr.charAt(2) == 0x15 )//CSTA EVENT
CSTAEventReceived(curInStr) ;
else
curInStr = DeleteChars(curInStr, 3);//, "WORKING...SERVICE_ID") ;//IF SERVICE IS 0x15 = CSTA EVENT, process somewhere else

curInStr = new StringBuffer() ;
}

...snippet...

Over the course of 2010, there'll be a bit of refactoring - to add support for XML and to investigate the use of jboss's nio package for TCP communications. You noticed the way I've carved through the ASN.1 strings, and I'll agree with you with the "harder way" of doing it - but it works, and it's easy to add extra PBX support how it currently is.

Another thing you may want to check out is the accompanying nursepaging application which uses the CSTA command SetDisplay. By hooking up a nurse call unit, a text message can be sent to cordless (or corded) handsets. The code for this example project needs some updating to the current CSTA Client implementation (using CSTAMulti) - it's viewable at http://open.nursepaging.com

Hope you find this helpful,
Chris

Took another look over your code

Ok, after looking again over your code:

All the time i thought, phase III is only XML protocol - i currently don't know the difference between phase II & III. But it can't be very big - a few more events, functions, etc.

Most of your transmission is generic - therefore it is a standard :-) .
It can be reused mostly for Alcatel. The big (ok, it isn' really big stuff) difference begins in Layer 5.
Alcatel has a little handshake (only a few bytes), following ACSE login with some little specials.
Every CSTA paket is starting with 2 bytes of packet length, then followed by CSTA/ASN.1 packet.

I attached a trace of my developement output. First part of handshake is missing here.
It's a call from my asterisk (Ext 13) to my Alcatel phone (Ext 710) over QSIG trunk. Off hooked ext 710, hold / retrieve and last hangup.

I'll first set up my public svn, after that i'll look further :-) .

--------------------
run:
PBX: 192.168.100.27
SUBS: 710
Handshake ok
[APPLICATION 0] IMPLICIT AARQ SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT BitString '1'
[CONTEXT SPECIFIC 1] EXPLICIT 1.3.12.0.218
[CONTEXT SPECIFIC 7] EXPLICIT Octet String 44 45 43 54 50 43
[CONTEXT SPECIFIC 30] IMPLICIT ACSEuserInfoEXTERNAL SEQUENCE {
[UNIVERSAL 8] IMPLICIT ACSEuserInfo SEQUENCE {
1.3.12.0.218.200
[CONTEXT SPECIFIC 0] EXPLICIT ACSEuserInfoForCSTA SEQUENCE {
BitString '11'
iiCSTAFunctionality SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT BitString '111001111110011111101'
[CONTEXT SPECIFIC 1] IMPLICIT BitString '01111111111111011110001111111111101000'
[CONTEXT SPECIFIC 3] IMPLICIT BitString '01'
[CONTEXT SPECIFIC 4] IMPLICIT BitString '11110'
}
iiCSTAFunctionality SEQUENCE {
[CONTEXT SPECIFIC 3] IMPLICIT BitString '01'
}
}
}
}
}

Sending:
60 4a 80 02 07 80 a1 07 06 05 2b 0c 00 81 5a a7 08 04 06 44 # `J........+...Z....D
45 43 54 50 43 be 31 28 2f 06 07 2b 0c 00 81 5a 81 48 a0 24 # ECTPC.1(/..+...Z.H.$
30 22 03 02 06 c0 30 16 80 04 03 e7 e7 e8 81 06 02 7f fd e3 # 0"....0............
ff a0 83 02 06 40 84 02 03 f0 30 04 83 02 06 40 # .....@....0....@

Sending AARQ
(CHOICE) [APPLICATION 1] IMPLICIT AARE SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT BitString '1'
[CONTEXT SPECIFIC 1] EXPLICIT 1.3.12.0.218
[CONTEXT SPECIFIC 2] EXPLICIT Integer 0
[CONTEXT SPECIFIC 3] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 1] EXPLICIT Integer 1
[CONTEXT SPECIFIC 30] IMPLICIT ACSEuserInfoEXTERNAL SEQUENCE {
[UNIVERSAL 8] IMPLICIT ACSEuserInfo SEQUENCE {
1.3.12.0.218.200
[CONTEXT SPECIFIC 0] EXPLICIT ACSEuserInfoForCSTA SEQUENCE {
BitString '0100'
iiCSTAFunctionality SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT BitString ''
[CONTEXT SPECIFIC 1] IMPLICIT BitString ''
[CONTEXT SPECIFIC 2] IMPLICIT BitString ''
[CONTEXT SPECIFIC 3] IMPLICIT BitString '11'
[CONTEXT SPECIFIC 4] IMPLICIT BitString ''
[CONTEXT SPECIFIC 5] IMPLICIT BitString ''
[CONTEXT SPECIFIC 6] IMPLICIT BitString ''
}
iiCSTAFunctionality SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT BitString '111001111111011111101'
[CONTEXT SPECIFIC 1] IMPLICIT BitString '01111111111111010000001111111110101000'
[CONTEXT SPECIFIC 2] IMPLICIT BitString '00101'
[CONTEXT SPECIFIC 3] IMPLICIT BitString ''
[CONTEXT SPECIFIC 4] IMPLICIT BitString '11110'
[CONTEXT SPECIFIC 5] IMPLICIT BitString '0000000001'
[CONTEXT SPECIFIC 6] IMPLICIT BitString '000010000100'
}
}
}
}
}
Ready

Sending:
a1 10 02 01 01 02 01 47 30 08 80 03 37 31 30 0a 01 01 # .......G0...710...

Received:
a2 2a 02 01 01 30 25 02 01 47 30 20 55 04 0c 29 68 00 30 18 # .*...0%..G0 U..)h.0.
80 03 02 80 00 81 02 00 7f 82 02 02 00 83 02 06 00 85 02 01 # ...................
6e 84 01 00 # n...

Tag: 2
(CHOICE) [CONTEXT SPECIFIC 2] IMPLICIT ROSEopInvokeResult SEQUENCE {
Integer 1
(Open Type) Sequence SEQUENCE {
Integer 71
Sequence SEQUENCE {
[APPLICATION 21] IMPLICIT Octet String 0c 29 68 00
Sequence SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT Octet String 02 80 00
[CONTEXT SPECIFIC 1] IMPLICIT Octet String 00 7f
[CONTEXT SPECIFIC 2] IMPLICIT Octet String 02 00
[CONTEXT SPECIFIC 3] IMPLICIT Octet String 06 00
[CONTEXT SPECIFIC 5] IMPLICIT Octet String 01 6e
[CONTEXT SPECIFIC 4] IMPLICIT Octet String 00
}
}
}
}

Received:
a1 81 9e 02 02 4f d1 02 01 15 30 81 94 55 04 0c 29 68 00 a0 # .....O....0..U..)h..
3a a3 38 30 36 6b 0a 82 02 00 af 83 04 03 58 01 00 63 05 84 # :.806k........X..c..
03 37 31 30 61 04 84 02 31 33 62 05 84 03 37 31 30 64 02 88 # .710a...13b...710d..
00 6b 0a 82 02 00 af 83 04 01 42 01 04 4e 01 02 0a 01 16 7e # .k........B..N.....~
50 a0 0f 17 0d 31 30 30 32 30 37 31 33 34 34 32 36 5a a1 3d # P....100207134426Z.=
30 0b 06 06 2b 0c 89 36 83 78 02 01 01 30 1a 06 06 2b 0c 89 # 0...+..6.x...0...+..
36 84 00 30 10 80 0c 4d 61 72 69 6f 20 47 6f 65 67 65 6c 81 # 6..0...Mario Goegel.
00 30 12 06 06 2b 0c 89 36 84 09 04 08 aa b5 6e 4b af 00 0c # .0...+..6......nK...
00 # .

Tag: 1
(CHOICE) [CONTEXT SPECIFIC 1] IMPLICIT ROSEopInvoke SEQUENCE {
Integer 20433
(CHOICE) Integer 21
(Open Type) EventReportArgument SEQUENCE {
[APPLICATION 21] IMPLICIT Octet String 0c 29 68 00
(CHOICE) [CONTEXT SPECIFIC 0] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 3] EXPLICIT DeliveredEvent SEQUENCE {
[APPLICATION 11] IMPLICIT ConnectionID SEQUENCE {
[CONTEXT SPECIFIC 2] IMPLICIT Octet String 00 af
(CHOICE) [CONTEXT SPECIFIC 3] IMPLICIT Octet String 03 58 01 00
}
[APPLICATION 3] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 4] IMPLICIT IA5String "710"
[APPLICATION 1] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 4] IMPLICIT IA5String "13"
[APPLICATION 2] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 4] IMPLICIT IA5String "710"
[APPLICATION 4] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 8] IMPLICIT NULL
[APPLICATION 11] IMPLICIT ConnectionID SEQUENCE {
[CONTEXT SPECIFIC 2] IMPLICIT Octet String 00 af
(CHOICE) [CONTEXT SPECIFIC 3] IMPLICIT Octet String 01 42 01 04
}
[APPLICATION 14] IMPLICIT Enumerated 2
Octet String
Enumerated 22
}
[APPLICATION 30] IMPLICIT Sequence OPTIONAL SEQUENCE {
}
}
}
Handling Operation 20433
Event received

OPERATION=20433;EVENT
CROSSREFID=204040192
EVENT=3;DELIVERED
CONNID_CALL=175;56099072;DYNAMICID
ANSWERING_NUMBER=710;PRIVATE;UNKNOWN
CALLINGDID_NUMBER=13;PRIVATE;UNKNOWN
CALLEDDID_NUMBER=710;PRIVATE;UNKNOWN
ORIGINATED_NUMBER=UNKNOWN;UNKNOWN;UNKNOWN
CONNID_CALL=175;21102852;DYNAMICID
LOCALCONNSTATE=2;ALERTING
CAUSE=22;NEWCALL
OPERATION_END=20433;EVENT

Sending:
a1 09 02 01 02 02 01 34 0a 01 02 # .......4...

S
Received:
a2 0a 02 01 02 30 05 02 01 34 05 00 # .....0...4..

Tag: 2
(CHOICE) [CONTEXT SPECIFIC 2] IMPLICIT ROSEopInvokeResult SEQUENCE {
Integer 2
(Open Type) Sequence SEQUENCE {
Integer 52
NULL
}
}

Received:
a1 74 02 02 4f d2 02 01 15 30 6b 55 04 0c 29 68 00 a0 3a a5 # .t..O....0kU..)h..:.
38 30 36 6b 0a 82 02 00 af 83 04 03 58 01 00 63 05 84 03 37 # 806k........X..c...7
31 30 61 04 84 02 31 33 62 05 84 03 37 31 30 64 02 88 00 6b # 10a...13b...710d...k
0a 82 02 00 af 83 04 01 42 01 04 4e 01 03 0a 01 16 7e 27 a0 # ........B..N.....~'.
0f 17 0d 31 30 30 32 30 37 31 33 34 34 32 38 5a a1 14 30 12 # ...100207134428Z..0.
06 06 2b 0c 89 36 84 09 04 08 aa b5 6e 4b af 00 0c 00 # ..+..6......nK....

Tag: 1
(CHOICE) [CONTEXT SPECIFIC 1] IMPLICIT ROSEopInvoke SEQUENCE {
Integer 20434
(CHOICE) Integer 21
(Open Type) EventReportArgument SEQUENCE {
[APPLICATION 21] IMPLICIT Octet String 0c 29 68 00
(CHOICE) [CONTEXT SPECIFIC 0] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 5] EXPLICIT EstablishedEvent SEQUENCE {
[APPLICATION 11] IMPLICIT ConnectionID SEQUENCE {
[CONTEXT SPECIFIC 2] IMPLICIT Octet String 00 af
(CHOICE) [CONTEXT SPECIFIC 3] IMPLICIT Octet String 03 58 01 00
}
[APPLICATION 3] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 4] IMPLICIT IA5String "710"
[APPLICATION 1] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 4] IMPLICIT IA5String "13"
[APPLICATION 2] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 4] IMPLICIT IA5String "710"
[APPLICATION 4] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 8] IMPLICIT NULL
[APPLICATION 11] IMPLICIT ConnectionID SEQUENCE {
[CONTEXT SPECIFIC 2] IMPLICIT Octet String 00 af
(CHOICE) [CONTEXT SPECIFIC 3] IMPLICIT Octet String 01 42 01 04
}
[APPLICATION 14] IMPLICIT Enumerated 3
Octet String
Enumerated 22
}
[APPLICATION 30] IMPLICIT Sequence OPTIONAL SEQUENCE {
}
}
}
Handling Operation 20434
Event received

OPERATION=20434;EVENT
CROSSREFID=204040192
EVENT=5;ESTABLISHED
CONNID_CALL=175;56099072;DYNAMICID
ANSWERING_NUMBER=710;PRIVATE;UNKNOWN
CALLINGDID_NUMBER=13;PRIVATE;UNKNOWN
CALLEDDID_NUMBER=710;PRIVATE;UNKNOWN
ORIGINATED_NUMBER=UNKNOWN;UNKNOWN;UNKNOWN
CONNID_CALL=175;21102852;DYNAMICID
LOCALCONNSTATE=3;CONNECT
CAUSE=22;NEWCALL
OPERATION_END=20434;EVENT

Received:
a1 54 02 02 4f d3 02 01 15 30 4b 55 04 0c 29 68 00 a0 1a a7 # .T..O....0KU..)h....
18 30 16 6b 0a 82 02 00 af 83 04 03 58 01 00 63 05 84 03 37 # .0.k........X..c...7
31 30 4e 01 04 7e 27 a0 0f 17 0d 31 30 30 32 30 37 31 33 34 # 10N..~'....100207134
34 33 32 5a a1 14 30 12 06 06 2b 0c 89 36 84 09 04 08 aa b5 # 432Z..0...+..6......
6e 4b af 00 0c 00 # nK....

Tag: 1
(CHOICE) [CONTEXT SPECIFIC 1] IMPLICIT ROSEopInvoke SEQUENCE {
Integer 20435
(CHOICE) Integer 21
(Open Type) EventReportArgument SEQUENCE {
[APPLICATION 21] IMPLICIT Octet String 0c 29 68 00
(CHOICE) [CONTEXT SPECIFIC 0] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 7] EXPLICIT HeldEvent SEQUENCE {
[APPLICATION 11] IMPLICIT ConnectionID SEQUENCE {
[CONTEXT SPECIFIC 2] IMPLICIT Octet String 00 af
(CHOICE) [CONTEXT SPECIFIC 3] IMPLICIT Octet String 03 58 01 00
}
[APPLICATION 3] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 4] IMPLICIT IA5String "710"
[APPLICATION 14] IMPLICIT Enumerated 4
Octet String
Enumerated 0
}
[APPLICATION 30] IMPLICIT Sequence OPTIONAL SEQUENCE {
}
}
}
Handling Operation 20435
Event received

OPERATION=20435;EVENT
CROSSREFID=204040192
EVENT=7;HELD
CONNID_CALL=175;56099072;DYNAMICID
HELD_NUMBER=710;PRIVATE;UNKNOWN
LOCALCONNSTATE=4;HOLD
CAUSE=0;NOT AVAILABLE
OPERATION_END=20435;EVENT

Received:
a1 50 02 02 4f d4 02 01 15 30 47 55 04 0c 29 68 00 a0 16 ac # .P..O....0GU..)h....
14 30 12 6b 0a 82 02 00 b0 83 04 03 58 01 00 4e 01 01 0a 01 # .0.k........X..N....
16 7e 27 a0 0f 17 0d 31 30 30 32 30 37 31 33 34 34 33 32 5a # .~'....100207134432Z
a1 14 30 12 06 06 2b 0c 89 36 84 09 04 08 b0 b5 6e 4b b0 00 # ..0...+..6......nK..
0c 00 # ..

Tag: 1
(CHOICE) [CONTEXT SPECIFIC 1] IMPLICIT ROSEopInvoke SEQUENCE {
Integer 20436
(CHOICE) Integer 21
(Open Type) EventReportArgument SEQUENCE {
[APPLICATION 21] IMPLICIT Octet String 0c 29 68 00
(CHOICE) [CONTEXT SPECIFIC 0] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 12] EXPLICIT ServiceInitiatedEvent SEQUENCE {
[APPLICATION 11] IMPLICIT ConnectionID SEQUENCE {
[CONTEXT SPECIFIC 2] IMPLICIT Octet String 00 b0
(CHOICE) [CONTEXT SPECIFIC 3] IMPLICIT Octet String 03 58 01 00
}
[APPLICATION 14] IMPLICIT Enumerated 1
Enumerated 22
}
[APPLICATION 30] IMPLICIT Sequence OPTIONAL SEQUENCE {
}
}
}
Handling Operation 20436
Event received

OPERATION=20436;EVENT
CROSSREFID=204040192
EVENT=12;SERVICEINITIATED
CONNID_CALL=176;56099072;DYNAMICID
LOCALCONNSTATE=1;INITIATE
CAUSE=22;NEWCALL
OPERATION_END=20436;EVENT

Received:
a1 57 02 02 4f d5 02 01 15 30 4e 55 04 0c 29 68 00 a0 1d a2 # .W..O....0NU..)h....
1b 30 19 6b 0a 82 02 00 b0 83 04 03 58 01 00 63 05 84 03 37 # .0.k........X..c...7
31 30 4e 01 00 0a 01 05 7e 27 a0 0f 17 0d 31 30 30 32 30 37 # 10N.....~'....100207
31 33 34 34 33 34 5a a1 14 30 12 06 06 2b 0c 89 36 84 09 04 # 134434Z..0...+..6...
08 b0 b5 6e 4b b0 00 0c 00 # ...nK....

Tag: 1
(CHOICE) [CONTEXT SPECIFIC 1] IMPLICIT ROSEopInvoke SEQUENCE {
Integer 20437
(CHOICE) Integer 21
(Open Type) EventReportArgument SEQUENCE {
[APPLICATION 21] IMPLICIT Octet String 0c 29 68 00
(CHOICE) [CONTEXT SPECIFIC 0] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 2] EXPLICIT ConnectionClearedEvent SEQUENCE {
[APPLICATION 11] IMPLICIT ConnectionID SEQUENCE {
[CONTEXT SPECIFIC 2] IMPLICIT Octet String 00 b0
(CHOICE) [CONTEXT SPECIFIC 3] IMPLICIT Octet String 03 58 01 00
}
[APPLICATION 3] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 4] IMPLICIT IA5String "710"
[APPLICATION 14] IMPLICIT Enumerated 0
Octet String
Enumerated 5
}
[APPLICATION 30] IMPLICIT Sequence OPTIONAL SEQUENCE {
}
}
}
Handling Operation 20437
Event received

OPERATION=20437;EVENT
CROSSREFID=204040192
EVENT=2;CONNECTIONCLEARED
CONNID_CALL=176;56099072;DYNAMICID
RELEASING_NUMBER=710;PRIVATE;UNKNOWN
LOCALCONNSTATE=0;NULL
CAUSE=5;CALLCANCELED
OPERATION_END=20437;EVENT

Received:
a1 54 02 02 4f d6 02 01 15 30 4b 55 04 0c 29 68 00 a0 1a ab # .T..O....0KU..)h....
18 30 16 6b 0a 82 02 00 af 83 04 03 58 01 00 63 05 84 03 37 # .0.k........X..c...7
31 30 4e 01 03 7e 27 a0 0f 17 0d 31 30 30 32 30 37 31 33 34 # 10N..~'....100207134
34 33 34 5a a1 14 30 12 06 06 2b 0c 89 36 84 09 04 08 aa b5 # 434Z..0...+..6......
6e 4b af 00 0c 00 # nK....

Tag: 1
(CHOICE) [CONTEXT SPECIFIC 1] IMPLICIT ROSEopInvoke SEQUENCE {
Integer 20438
(CHOICE) Integer 21
(Open Type) EventReportArgument SEQUENCE {
[APPLICATION 21] IMPLICIT Octet String 0c 29 68 00
(CHOICE) [CONTEXT SPECIFIC 0] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 11] EXPLICIT RetrievedEvent SEQUENCE {
[APPLICATION 11] IMPLICIT ConnectionID SEQUENCE {
[CONTEXT SPECIFIC 2] IMPLICIT Octet String 00 af
(CHOICE) [CONTEXT SPECIFIC 3] IMPLICIT Octet String 03 58 01 00
}
[APPLICATION 3] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 4] IMPLICIT IA5String "710"
[APPLICATION 14] IMPLICIT Enumerated 3
Octet String
Enumerated 0
}
[APPLICATION 30] IMPLICIT Sequence OPTIONAL SEQUENCE {
}
}
}
Handling Operation 20438
Event received

OPERATION=20438;EVENT
CROSSREFID=204040192
EVENT=11;RETRIEVED
CONNID_CALL=175;56099072;DYNAMICID
RETRIEVED_NUMBER=710;PRIVATE;UNKNOWN
LOCALCONNSTATE=3;CONNECT
CAUSE=0;NOT AVAILABLE
OPERATION_END=20438;EVENT

Received:
a1 57 02 02 4f d7 02 01 15 30 4e 55 04 0c 29 68 00 a0 1d a2 # .W..O....0NU..)h....
1b 30 19 6b 0a 82 02 00 af 83 04 03 58 01 00 63 05 84 03 37 # .0.k........X..c...7
31 30 4e 01 00 0a 01 30 7e 27 a0 0f 17 0d 31 30 30 32 30 37 # 10N....0~'....100207
31 33 34 34 33 39 5a a1 14 30 12 06 06 2b 0c 89 36 84 09 04 # 134439Z..0...+..6...
08 aa b5 6e 4b af 00 0c 00 # ...nK....

Tag: 1
(CHOICE) [CONTEXT SPECIFIC 1] IMPLICIT ROSEopInvoke SEQUENCE {
Integer 20439
(CHOICE) Integer 21
(Open Type) EventReportArgument SEQUENCE {
[APPLICATION 21] IMPLICIT Octet String 0c 29 68 00
(CHOICE) [CONTEXT SPECIFIC 0] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 2] EXPLICIT ConnectionClearedEvent SEQUENCE {
[APPLICATION 11] IMPLICIT ConnectionID SEQUENCE {
[CONTEXT SPECIFIC 2] IMPLICIT Octet String 00 af
(CHOICE) [CONTEXT SPECIFIC 3] IMPLICIT Octet String 03 58 01 00
}
[APPLICATION 3] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 4] IMPLICIT IA5String "710"
[APPLICATION 14] IMPLICIT Enumerated 0
Octet String
Enumerated 48
}
[APPLICATION 30] IMPLICIT Sequence OPTIONAL SEQUENCE {
}
}
}
Handling Operation 20439
Event received

OPERATION=20439;EVENT
CROSSREFID=204040192
EVENT=2;CONNECTIONCLEARED
CONNID_CALL=175;56099072;DYNAMICID
RELEASING_NUMBER=710;PRIVATE;UNKNOWN
LOCALCONNSTATE=0;NULL
CAUSE=48;NORMALCLEARING
OPERATION_END=20439;EVENT

Received:
a1 0a 02 02 4f d8 02 01 34 0a 01 02 # ....O...4...

Tag: 1
(CHOICE) [CONTEXT SPECIFIC 1] IMPLICIT ROSEopInvoke SEQUENCE {
Integer 20440
(CHOICE) Integer 52
(Open Type) (CHOICE) Enumerated 2
}
Handling Operation 20440

Sending:
a2 0b 02 02 4f d8 30 05 02 01 34 05 00 # ....O.0...4..

Sequence SEQUENCE {
Integer 20440
Sequence SEQUENCE {
Integer 52
NULL
}
}

Sending:
a1 09 02 01 03 02 01 34 0a 01 02 # .......4...

S
Received:
a2 0a 02 01 03 30 05 02 01 34 05 00 # .....0...4..

Tag: 2
(CHOICE) [CONTEXT SPECIFIC 2] IMPLICIT ROSEopInvokeResult SEQUENCE {
Integer 3
(Open Type) Sequence SEQUENCE {
Integer 52
NULL
}
}

0:
Disconnect!
Thread end

-------------------

Mario

Very interesting! And well

Very interesting! And well received -

You're correct - Phase I, II, III differ slightly and mostly in extra functionality.

For your information:
* CSTA Phase III (ASN.1)- ECMA 269
* CSTA XML Protocol - ECMA 323
* CSTA WSDL - ECMA 348 (this one looks pretty cool - you can even download a sample WSDL file)
* CSTA within SIP - TR/87

And as per your vision, yes a general CTI server is on the cards and do-able. The most recent communication I've had with someone on the subject is Wybecom TALK server. I haven't had a chance to check out the code, but the guy (Johann) was interested in integrating opencsta into it. The TALK server project I think is GPL licensed.

Just to snip the log on string from your previous post and compare it to the Hipath 3000 network log on.


60 4a 80 02 07 80 a1 07 06 05 2b 0c 00 81 5a a7 08 04 06 44 45 43 54 50 43 be 31 28 2f 06 07 2b 0c 00 81 5a 81 48 a0 24 30 22 03 02 06 c0 30 16 80 04 03 e7 e7 e8 81 06 02 7f fd e3 ff a0 83 02 06 40 84 02 03 f0 30 04 83 02 06 40

26 80 33 60 31 a1 7 6 5 2b c 0 81 5a 8a 2 6 80 ac 15 a2 13 a0 11 a0 f 4 6 41 4d 48 4f 53 54 4 5 37 37 37 37 37 be b 28 9 a0 7 a0 5 3 3 0 10 0

It starts similarly then gets into some alternate set of log on parameters.

What does DECTPC mean? I noticed it's included in the log on parameters - is it a username or password to the system?

As for the rest, your events are easily portable into opencsta.

I'll try and take a closer look over the next couple of days.

Thanks for your interest/keenness,
Chris

Ok, the TALK server sounds

Ok, the TALK server sounds interesting.

"DECTPC" is stolen from a trace from communications between alcatel cti products :-) .
It is a little nice license thing... ;-) The needed license is a few bucks cheaper because it uses a interface for alcatel products only. With this license you wouldn't get standard csta clients connected, because it's not documented. I don't need it here really, because i have a CSTA Interface on my pbx...
Standard documented logon is some Object ID. You may see it in my source...

And finally here is it:
svn co svn://goegelshome.de/csta/csta-core/trunk cstacore

Didn't got it working with apache/HTTP - my cms configuration doesn't like it at the moment. I'll change it when i have a little bit more time...

Thanks for your interest too - nice to talk with somebody about this :-)

Mario

Hi Mario, Always nice to know

Hi Mario,

Always nice to know about other projects. Has your project released source code? If so, what's the license?

1. Do you connect to your Alcatel with TCP or Serial connection?
2. Do you use CSTA Phase I or CSTA Phase III
3. Do you connect using XML or ASN.1 (hex) notation?

Post your output here if you'd like. I have the Diverted Event covered for the Siemens Hipath3000 and the Forwarding Event for the Ericsson MD110.

Cheers
Chris

Hi Chris, I want to make an

Hi Chris,

I want to make an open source project, because in my searches along the web, i didn't found something equal (last 2 years). Not only the CSTA part, even a open CTI server, which handles different switches like Asterisk. Next thing is to write a Linux client. I install Alcatel PBX systems and got already some question from my customers about such clients. But on this project i work only at home. So the short answer: it becomes a GPL project...

Your other questions:
1. Alcatel only supports TCP connections, so it is TCP.
2. It's Phase II - Phase III is only supported with external Applications, which Alcatel sells for much money... (but you won't get for less the CSTA license).
3. Phase II still uses ASN.1.

The hardest thing was, to find a matching ASN.1 library for JAVA. I found ca 3, and tested 2 of them. Last i took the free CODEC library from the Technical University of Darmstadt here in Germany. But i had to modify this library for my requirements - CSTA has much more CHOICEs in places, where this library they did not allowed - now it does :-) .

Btw: I solved my problem with my divertedEvent - all doc's told me the same sequence, finally i found i searched the wrong place - i got an privateEvent from my PBX, because it was forwarding the call directly - CSTA manual says, divertEvent is only sent, after the phone has already rung. I did test it with Call Forward Unconditional. Another test confirmed my divertedEvent code :-) . So thanks for your help.

I took a look over your code yesterday - but I have to look more intensive, to find a point, where to start. The way you decode ASN.1 is the harder way, which i didn't really want to go.
So maybe my code is a little bit easier to read (the code, based on the CODEC library - my other code is not well documented yet, because i worked alone on it - until now :-) .
I'll try to set up a SVN server on my hosted server, so you can take a look over my code. Maybe we can find a way to migrate the two projects. I have no CTI server ready yet - i'm still working on the stack.
Give me a few hours, i just got out of my bed. :-)
I'll post then the link here.

Have a nice evening
Mario

Hi Mario, I took a look at

Hi Mario,

I took a look at your csta code for an Alcatel Enterprice.
I'm looking for a way to perform call logging on a Alcatel omni PCX. CSTA seems very promissing to achieve this, but I still need to study the ecma specs to grasp the full picture.
The main question I have for the moment is if it is possible to use CSTA for call logging on a Alcatel omni pcx? Do you know what the pcx supports by default? Do I have to buy additional licenses from my provider?
Is there a forum to discuss your code as well?

Thanks already.

PS: when I run your cstatest application it got stuck on an optional ASN.1 field which I skipped by ignoring it for the moment. Now the trace looks as follows:

PBX: 192.168.1.60
SUBS: 710
Handshake ok
[APPLICATION 0] IMPLICIT AARQ SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT BitString '1'
[CONTEXT SPECIFIC 1] EXPLICIT 1.3.12.0.218
[CONTEXT SPECIFIC 7] EXPLICIT Octet String 44 45 43 54 50 43
[CONTEXT SPECIFIC 30] IMPLICIT ACSEuserInfoEXTERNAL SEQUENCE {
[UNIVERSAL 8] IMPLICIT ACSEuserInfo SEQUENCE {
1.3.12.0.218.200
[CONTEXT SPECIFIC 0] EXPLICIT ACSEuserInfoForCSTA SEQUENCE {
BitString '11'
iiCSTAFunctionality SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT BitString '111001111110011111101'
[CONTEXT SPECIFIC 1] IMPLICIT BitString '01111111111111011110001111111111101000'
[CONTEXT SPECIFIC 3] IMPLICIT BitString '01'
[CONTEXT SPECIFIC 4] IMPLICIT BitString '11110'
}
iiCSTAFunctionality SEQUENCE {
[CONTEXT SPECIFIC 3] IMPLICIT BitString '01'
}
}
}
}
}

Sending:
60 4a 80 02 07 80 a1 07 06 05 2b 0c 00 81 5a a7 08 04 06 44 # `J........+...Z....D
45 43 54 50 43 be 31 28 2f 06 07 2b 0c 00 81 5a 81 48 a0 24 # ECTPC.1(/..+...Z.H.$
30 22 03 02 06 c0 30 16 80 04 03 e7 e7 e8 81 06 02 7f fd e3 # 0"....0............
ff a0 83 02 06 40 84 02 03 f0 30 04 83 02 06 40 # .....@....0....@

Sending AARQ
(CHOICE) [APPLICATION 1] IMPLICIT AARE SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT BitString '1'
[CONTEXT SPECIFIC 1] EXPLICIT 1.3.12.0.218
[CONTEXT SPECIFIC 2] EXPLICIT Integer 2
[CONTEXT SPECIFIC 3] EXPLICIT (CHOICE) [CONTEXT SPECIFIC 1] EXPLICIT Integer 13
[CONTEXT SPECIFIC 30] IMPLICIT ACSEuserInfoEXTERNAL SEQUENCE {
[UNIVERSAL 8] IMPLICIT ACSEuserInfo SEQUENCE {
0.0
[CONTEXT SPECIFIC 0] EXPLICIT ACSEuserInfoForCSTA SEQUENCE {
BitString ''
iiCSTAFunctionality SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT BitString ''
[CONTEXT SPECIFIC 1] IMPLICIT BitString ''
[CONTEXT SPECIFIC 2] IMPLICIT BitString ''
[CONTEXT SPECIFIC 3] IMPLICIT BitString ''
[CONTEXT SPECIFIC 4] IMPLICIT BitString ''
[CONTEXT SPECIFIC 5] IMPLICIT BitString ''
[CONTEXT SPECIFIC 6] IMPLICIT BitString ''
}
iiCSTAFunctionality SEQUENCE {
[CONTEXT SPECIFIC 0] IMPLICIT BitString ''
[CONTEXT SPECIFIC 1] IMPLICIT BitString ''
[CONTEXT SPECIFIC 2] IMPLICIT BitString ''
[CONTEXT SPECIFIC 3] IMPLICIT BitString ''
[CONTEXT SPECIFIC 4] IMPLICIT BitString ''
[CONTEXT SPECIFIC 5] IMPLICIT BitString ''
[CONTEXT SPECIFIC 6] IMPLICIT BitString ''
}
}
}
}
}
Ready

Sending:
a1 10 02 01 01 02 01 47 30 08 80 03 37 31 30 0a 01 01 # .......G0...710...

Received:
a4 05 05 00 80 01 00 # .......

Nov 13, 2010 2:01:20 PM csta.ROSE handleROSEOP
SEVERE: null
codec.asn1.ASN1Exception: Type mismatch!
at codec.asn1.DERDecoder.readChoice(DERDecoder.java:1010)
at codec.asn1.ASN1Choice.decode(ASN1Choice.java:408)
at csta.ROSE.handleROSEOP(ROSE.java:181)
at cstatest.CSTAVendorAlcatel.handleData(CSTAVendorAlcatel.java:124)
at cstatest.HandleCSTA.run(HandleCSTA.java:38)

About call logging

girardelli wrote:
Hi Mario,

I took a look at your csta code for an Alcatel Enterprice.
I'm looking for a way to perform call logging on a Alcatel omni PCX. CSTA seems very promissing to achieve this, but I still need to study the ecma specs to grasp the full picture.
The main question I have for the moment is if it is possible to use CSTA for call logging on a Alcatel omni pcx? Do you know what the pcx supports by default? Do I have to buy additional licenses from my provider?

Call logging would be possible. This is now my first target, which i want to realize shortly. You'll need CSTA license, but my program is able to use CSTA bypass also (which may be not really be cheaper, because you'll need additional OTUC licenses for the same price).

girardelli wrote:

Is there a forum to discuss your code as well?

not yet, sorry.

girardelli wrote:

Thanks already.

PS: when I run your cstatest application it got stuck on an optional ASN.1 field which I skipped by ignoring it for the moment. Now the trace looks as follows:


...
girardelli wrote:

Sending:
a1 10 02 01 01 02 01 47 30 08 80 03 37 31 30 0a 01 01 # .......G0...710...

Received:
a4 05 05 00 80 01 00 # .......

Nov 13, 2010 2:01:20 PM csta.ROSE handleROSEOP
SEVERE: null
codec.asn1.ASN1Exception: Type mismatch!
at codec.asn1.DERDecoder.readChoice(DERDecoder.java:1010)
at codec.asn1.ASN1Choice.decode(ASN1Choice.java:408)
at csta.ROSE.handleROSEOP(ROSE.java:181)
at cstatest.CSTAVendorAlcatel.handleData(CSTAVendorAlcatel.java:124)
at cstatest.HandleCSTA.run(HandleCSTA.java:38)


Ok, i don't catch ROSE Errors yet - this is one, because by default my app will start a monitor of extension 710 (my developement environement) - which you don't have in your pbx. For quick tests i added an commandline switch (-m ?).

Mario

you may reach me at m.goegel at gmx dot de.

Is this of interest to

Is this of interest to anyone?
http://cgi.ebay.com/Alcatel-CSTA-K02-Key-fof-AM-Board-4220-4200-OfficeE-...

Also, if you want a call logging app, that's one of the jumpstart projects I'm introducing. Perhaps we could agree on an interface so both implementations can plug into it (as well as other, e.g. asterisk/freeswitch)

Cheers
Chris