I have an Asterisk box between an SBC and another Asterisk.
Incoming calls from the SBC may carry headers with additional infos about the call/caller which need to be forwarded.
I used the dialplan to implement the forwarding of headers in the incoming context of the call and this part works just fine.
The issue I’m facing now is:
Sometimes the additional call/caller infos are not available right away.
In such a case the SBC will issue a re-INVITE once the information is available and set the headers of interest in that re-INVITE.
What I need to do is:
- Catch the re-INVITE (preferrably in the dialplan, but I don’t think this is possible)
- Look for headers of interest
- Forward the headers of interest by sending a re-INVITE on the internal leg
Is there a way to do this via Dialplan (guess not), AMI, ARI
or do I need to write my own module (using SIP session supplements)?
All the best