// This SIP-log was taken from the own CTI Client SoftPhone.
// The own CTI Client SoftPhone has a special adaption to process NOTIFY messages
// with (non-standard) parameter "Event: CtiAnswer".


// General: The SIP-SoftPhone or a VoIP-HardPhone reveices an incoming call:


2017-05-16 10:51:32: 0049:280:   

 >>>  
0000:016:   INVITE sip:030200038722@84.180.5.180:5061 SIP/2.0
Via: SIP/2.0/UDP 92.60.208.102:5060;branch=z9hG4bK25a9e6ea;rport
From: "20" <sip:030200038720@92.60.208.102>;tag=as78b978c7
To: <sip:030200038722@84.180.5.180:5061>
Contact: <sip:030200038720@92.60.208.102>
Call-ID: 159d35c2023cff851c42f0e710cd701a@92.60.208.102
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Tue, 16 May 2017 08:51:36 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 240

v=0
o=root 6197 6197 IN IP4 92.60.208.102
s=session
c=IN IP4 92.60.208.102
t=0 0
m=audio 10616 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

0000:000:   



2017-05-16 10:51:32: 0000:000:   
sync...
 <<< 
0000:016:   SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 92.60.208.102:5060;branch=z9hG4bK25a9e6ea;rport
From: <sip:030200038720@92.60.208.102>;tag=as78b978c7
To: <sip:030200038722@84.180.5.180:5061>;tag=c1bb2a
Contact: "T22" <sip:030200038722@84.180.5.180:5061>
Call-ID: 159d35c2023cff851c42f0e710cd701a@92.60.208.102
CSeq: 102 INVITE
Allow: SUBSCRIBE, INVITE, ACK, CANCEL, BYE, REFER, NOTIFY, UPDATE, OPTIONS, INFO
Content-Length:     0



2017-05-16 10:51:32: 0000:000:    send LINE_CALLSTATE=OFFERING;  call=0x0337BEC8

0000:015:   ProcessInviteReq(call=0337BEC8): m_sipAudioCodecIdx=8 






// The Asterisk PBX has received a special AMI command "Action: Redirect" with "Variable: CtiAction=AnswerCall" from the "TAPI for Asterisk" driver.
// The Asterisk PBX now sends a special NOTIFY event with "Event: CtiAnswer" to the SIP-SoftPhone or VoIP-HardPhone:


2017-05-16 10:51:37: 0004:992:   

 >>>  
0000:000:   NOTIFY sip:030200038722@84.180.5.180:5061 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK0bbe85b5;rport
From: "asterisk" <sip:asterisk@127.0.0.1>;tag=as699c5d9e
To: <sip:030200038722@84.180.5.180:5061>
Contact: <sip:asterisk@127.0.0.1>
Call-ID: 547a52bc1e4c99fb527e3b9c4baa66eb@127.0.0.1
CSeq: 102 NOTIFY
User-Agent: Asterisk PBX
Max-Forwards: 70
Event: CtiAnswer
Content-Length: 0



0000:016:   CUserAgent::ProcessNotifyReq()

2017-05-16 10:51:37: 0000:000:   
sync...
 <<< 
0000:015:   SIP/2.0 200 OK
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK0bbe85b5;rport
From: <sip:asterisk@127.0.0.1>;tag=as699c5d9e
To: <sip:030200038722@84.180.5.180:5061>
Call-ID: 547a52bc1e4c99fb527e3b9c4baa66eb@127.0.0.1
CSeq: 102 NOTIFY
Content-Length:     0


// 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:094:   Answer(0337BEC8): m_sipAudioCodecIdx=8 

2017-05-16 10:51:37: 0000:016:   
sync...
 <<< 
0000:000:   SIP/2.0 200 OK
Via: SIP/2.0/UDP 92.60.208.102:5060;branch=z9hG4bK25a9e6ea;rport
From: <sip:030200038720@92.60.208.102>;tag=as78b978c7
To: <sip:030200038722@84.180.5.180:5061>;tag=c1bb2a
Contact: "T22" <sip:030200038722@84.180.5.180:5061>
Call-ID: 159d35c2023cff851c42f0e710cd701a@92.60.208.102
CSeq: 102 INVITE
Session-Expires: 1800;refresher=uac
Max-Forwards: 70
Allow: SUBSCRIBE, INVITE, ACK, CANCEL, BYE, REFER, NOTIFY, UPDATE, OPTIONS, INFO
Content-Type: application/sdp
Content-Length:   233

v=0
o=root 47379 47380 IN IP4 84.180.5.180
s=call
c=IN IP4 84.180.5.180
t=0 0
m=audio 5062 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv


2017-05-16 10:51:37: 0000:203:   

 >>>  
0000:015:   ACK sip:030200038722@84.180.5.180:5061 SIP/2.0
Via: SIP/2.0/UDP 92.60.208.102:5060;branch=z9hG4bK455099c4;rport
From: "20" <sip:030200038720@92.60.208.102>;tag=as78b978c7
To: <sip:030200038722@84.180.5.180:5061>;tag=c1bb2a
Contact: <sip:030200038720@92.60.208.102>
Call-ID: 159d35c2023cff851c42f0e710cd701a@92.60.208.102
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


0000:000:   


0000:000:   RTPChannel::ConnectToRemoteParty(10616,92.60.208.102)
0000:000:   call->m_rtpChannel.StartRecvThread();

2017-05-16 10:51:38: 0000:047:    send LINE_CALLSTATE=CONNECTED;  call=0x0337BEC8




