// This is a log from the "TAPI for Asterisk" driver.

// Situation: 
// The extension 030200038720 calls the extension 030200038722.


0021:497:   Event: Newchannel
Privilege: call,all
Timestamp: 1494924696.619816
Channel: SIP/030200038720-885f5048
State: Down
CallerIDNum: 030200038720
CallerIDName: 20
Uniqueid: 1494924696.1069632
Server: 92.60.208.102



2017-05-16 10:51:32: 0000:000:    NumCalls=1, NumFreeCalls=2, maxActiveCalls=2, new pCall=0x0000000000CF8FD0

0000:047:   Event: Newstate
Privilege: call,all
Timestamp: 1494924696.619879
Channel: SIP/030200038720-885f5048
State: Ring
CallerID: 030200038720
CallerIDName: 20
Uniqueid: 1494924696.1069632
Server: 92.60.208.102


0000:296:   Event: Newchannel
Privilege: call,all
Timestamp: 1494924696.927368
Channel: SIP/030200038722-0a942908
State: Down
CallerIDNum: <unknown>
CallerIDName: <unknown>
Uniqueid: 1494924696.1069633
Server: 92.60.208.102



2017-05-16 10:51:32: 0000:000:    NumCalls=2, NumFreeCalls=2, maxActiveCalls=2, new pCall=0x0000000000D00030

0000:032:   Event: Dial
Privilege: call,all
Timestamp: 1494924696.927711
Source: SIP/030200038720-885f5048
Destination: SIP/030200038722-0a942908
CallerID: 030200038720
CallerIDName: 20
SrcUniqueID: 1494924696.1069632
DestUniqueID: 1494924696.1069633
CallerIDout: 030200038722
Server: 92.60.208.102


0000:327:   Event: Newstate
Privilege: call,all
Timestamp: 1494924697.288703
Channel: SIP/030200038722-0a942908
State: Ringing
CallerID: 030200038722
CallerIDName: <unknown>
Uniqueid: 1494924696.1069633
Server: 92.60.208.102


2017-05-16 10:51:32: 0000:000:    > LINE_CALLSTATE:      OFFERING for pCall=0x0000000000D00030, SIP/030200038722-0a942908 <-> 030200038720, dwCallFeatures=0x00020084(DR,AN,RE,) 

// The extension "SIP/030200038722" is now ringing.



// The TAPI-Application executes lineAnswer() command.
// The TAPI-Driver sends a special "Action: Redirect" to the Asterisk-PBX with "Variable: CtiAction=AnswerCall":
// The PBX has to generate a special NOTIFY event to the Telephone/SoftPhone with parameter "Event: CtiAnswer".


0004:431:   ILineAnswer(hCall=0x0000000000D00030)
0000:000:    SIP/030200038722: ILineAnswer(0xd00030)

0000:000:   Action: Redirect
Channel: SIP/030200038720-885f5048
Context: CTI_AUTO_ANSWER
Exten: 030200038722
Priority: 1
ActionID: 52-srv00000000019748BD
Variable: AUTO_ANSWER_MODE=11
Variable: SIPADDHEADER01=Call-Info: <sip:92.60.208.93>\;answer-after=0
PhoneType: 11:CTI-Client SoftPhone
Variable: CtiAction=AnswerCall


0000:249:   Response: Follows
Privilege: Command
ActionID: 52-srv00000000019748BD
Sending NOTIFY of type 'phonesuite-talk' to '030200038722'
--END COMMAND--
Server: 92.60.208.102


// Because the special NOTIFY event with "Event: CtiAnswer" is no SIP-Standard,
// the SIP-SoftPhone or a VoIP-HardPhone would need a very special modification in the software/firmware.
// If the SIP-SoftPhone or a VoIP-HardPhone has this very special modification,
// then it would process the SIP-NOTIFY with "Event: CtiAnswer" and would answer the call. 

0000:203:   Event: Newstate
Privilege: call,all
Timestamp: 1494924702.451124
Channel: SIP/030200038722-0a942908
State: Up
CallerID: 030200038722
CallerIDName: <unknown>
Uniqueid: 1494924696.1069633
Server: 92.60.208.102


0000:016:   Event: Newstate
Privilege: call,all
Timestamp: 1494924702.456440
Channel: SIP/030200038720-885f5048
State: Up
CallerID: 030200038720
CallerIDName: 20
Uniqueid: 1494924696.1069632
Server: 92.60.208.102


0000:000:   Event: Link
Privilege: call,all
Timestamp: 1494924702.456574
Channel1: SIP/030200038720-885f5048
Channel2: SIP/030200038722-0a942908
Uniqueid1: 1494924696.1069632
Uniqueid2: 1494924696.1069633
CallerID1: 030200038720
CallerID2: 030200038722
Server: 92.60.208.102



2017-05-16 10:51:38: 0000:000:    > LINE_CALLSTATE:     CONNECTED for pCall=0x0000000000CF8FD0, SIP/030200038720-885f5048 <-> 030200038722, dwCallFeatures=0x02000a88(DR,ST,BT,HO,) 

