My SIP provider provides incoming destination/DDI information in a weird way. Instead of providing the DID in the DID value it provides the SIP account username. The DDI data is in the SIP To: part of the header. This is the Asterisk code I use to extract the correct DDI and then pass the call on:
[custom-get-did-from-sip]
exten => _.,1,Noop(Getting DID from SIP header)
exten => _.,n,Set(pseudodid=${SIP_HEADER(To)})
exten => _.,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => _.,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => _.,n,Goto(from-trunk,${pseudodid},1)
Is there a way to manipulate the incoming header to extract this information in FusionPBX? I tried adjusting caller-details in the Dialplan section but it didn't make a difference.
[custom-get-did-from-sip]
exten => _.,1,Noop(Getting DID from SIP header)
exten => _.,n,Set(pseudodid=${SIP_HEADER(To)})
exten => _.,n,Set(pseudodid=${CUT(pseudodid,@,1)})
exten => _.,n,Set(pseudodid=${CUT(pseudodid,:,2)})
exten => _.,n,Goto(from-trunk,${pseudodid},1)
Is there a way to manipulate the incoming header to extract this information in FusionPBX? I tried adjusting caller-details in the Dialplan section but it didn't make a difference.