tSIP: shared contact notes

Example setup for shared phonebook (contacts) and contact notes.
Required tSIP version: 0.1.71.1+.

Here is script adding short description line to note when call is confirmed. It is intented to be assigned to both "on call state" and "on contact note open" events:


local callState = GetCallState()
if callState == 6 then -- call confirmed
	print("Call confirmed -> appending note text\n")
	local text = "\r\n ****************************** \r\n"
	text = text .. os.date() .. " "
	if IsCallIncoming() ~= 0 then
		text = text .. "Incoming from " .. GetCallPeer() .. " to " .. GetUserName()
	else
		text = text .. "Outgoing to " .. GetCallPeer() .. " from " .. GetUserName()
	end
	text = text .. "\r\n"
	AppendContactNoteText(text)
end

Back to howto list.