libwebphone
libwebphone copied to clipboard
Add getCustomHeaders to lwpCall
I added a method in lwpCall to return the list of custom headers from a call as I needed to implement a logic where calls tagged with a certain header will be answered automatically.
if (currentCall.isInProgress()) {
const customHeaders = currentCall.getCustomHeaders()
if (customHeaders && customHeaders['X-IntegratedCall'] === 'true') {
return currentCall.answer()
}
}