Are there existing libraries and frameworks which allow VOIP to be built into a bespoke application without reinventing the wheel? A customer is interested by the possibility for a C++ desktop application and while it's not hugely useful (they could just use skype), it is quite cool.
I believe some technologies like DirectX may have some functionality built in for in-game chat, is that right? What else is there in the form of free/paid 3rd-party libraries?
Well, since Asterisk is open source, that's a good place to start.
Check out Astxx
"The goal of Astxx is to provide a fully functional and easy to use C++ wrapper for Asterisk enabling developers to write Asterisk related software using the full range of what C++ has to offer. This includes AGI scripts and accessing the Manager API."
Also IAXClient
"A lightweight cross platform IP telephony client using the IAX protocol, designed for use with the asterisk open source PBX. "
And Asterisk Sockets
"Asterisk Manage API and FAGI C++ Framework. Implemented with high efficient OS independent Sockets wrapper (ACE). Provide C++ API wrappers for Asterisk Manager API and FAGI."
There's also a .NET library
"The Asterisk .NET library consists of a set of C# classes that allow you to easily build applications that interact with an Asterisk PBX Server (1.0/1.2/1.4 version). Both FastAGI and Manager API supported. .NET/Mono compatible."