I’m trying to retrieve SIP Header Information from FreePBX/Asterisk when incoming call with FreePBX/Asterisk ACD/RingAll Call Strategy. The objective is that 3rd party UserApplication(CTI Application) needs to retrieve SIP Header Information when call established through FreePBX/Asterisk.
PSTN User (Phone Number: 81-3-1111-1111 CLI/ANI) -> Cloud PSTN/SIP Gateway with Phone Number (Phone Number: 81-3-8888-8888) -> SIP Trunk -> FreePBX/Asterisk(ACD/RingAll) — > SIP Endpoints
In this scenario, Cloud PSTN/SIP Gateway will send SIP INVITE to Asterisk with CLI/ANI 81-3-8888-8888 overwritten by PSTN/SIP Gateway, instead of User’s Phone Number CLI/ANI 81-3-1111-1111.
Therefore we have added PSTN User’s Information into SIP Header from the Gateway to FreePBX/Asterisk and looking for the way how to retrieve SIP Header information from Asterisk .
I’ve found the following information, but it may not help because this is for dialplan purpose.
Func SIP Header:
Is there any good way to retrieve SIP Header Information by 3rd party UserApplication from FreePBX/Asterisk? AGI might help to do it, but I’m not sure. Any tips, it is appreciated.