We are working on a project that's using a Twilio SIP trunk that diverts calls from the PSTN to our cluster that is hosting two active-active Kamailio 5.1 instances that redirect traffic to several Asterisk 15.4 instances.
We have integrated with Redis and we are able to correctly store the last value of the diversion reason.
redis_cmd("abn", "SET $fd-div $dir", "r");
It seems that Kamailio only supports access to the last diversion header but since we are receiving traffic from Twilio (it sets the last Diversion header) we are unable to see if the caller was diverted to our SIP trunk. Is there a workaround for this? Any external module that could support this use case?