Redirect call with 3xx response
From Brekeke PBX v3.2, the following setup can be used to redirect calls to a PBX user extension to an external user set in called PBX user extension [Other Forwarding Destinaitons*] field while there is no phone assigned to called PBX user extension or assigned phones are not registered at the time of the call.
Variables:
caller.redirect.pattern caller.redirect.responsecode caller.redirect.target
Syntax:
ARS Patterns – IN, [Custom] field, set:
&caller.redirect.pattern=(<external_number_pattern>),&caller.redirect.target=sip:$1@<destination_IP>,&caller.redirect.responsecode=<response_code>
Default response is 302 if variable caller.redirect.responsecode is not defined.
Such as:
&caller.redirect.pattern=([0-9]{7\,}),&caller.redirect.target=sip:\$1@192.168.200.85,&caller.redirect.responsecode=302
If the external user set at called PBX user extension [Inbound] page [Other Forwarding Destinaitons*] field where the call will be redirected to is a number over 7 digits, and there is no phone registered at this user at the time of call, Brekeke PBX will reply the incoming call with 302 response and set the SIP URL in the variable caller.redirect.targetas the contact in the 302 response.
Here, $1 refers to the number in the parenthese set to variable caller.redirect.pattern.