0

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?

1 Answers1

0

You can save any info into avpairs, or htable, or db(including redis).

After that restore it anywhere in dialplan by callid as key.

arheops
  • 15,544
  • 1
  • 21
  • 27
  • How can I retrieve all the diversion headers? So far I have been able to access the last diversion header sent as per the documentation, it is limited to the first occurrence https://github.com/kamailio/kamailio/blob/48de203fda213749ac1e6fdb081c22dd701f85c4/src/core/parser/parse_diversion.c – Joan Salvatella Nov 01 '18 at 10:21
  • You should program it yourself or hire developed which know c/c++ or kamailio. – arheops Nov 01 '18 at 15:41