Now, we will work with call forwarding on OpenSIPS. There are usually three kinds of call forwards:
Call forward unconditional: The system redirects all the INVITE requests sent to this phone number to the phone stored in the
usr_preferences
table. The SIP server will simply replace the request URI before sending the request ahead.Forward on busy: In this case, we will use the
failure_route
feature to intercept the 486 Busy Here message and create a new leg sending the INVITE request to the final destination.Forward on no answer: If a phone replies to an INVITE request with a 480 Temporarily Unavailable or the SIP proxy generates a timeout with a 408 request Timeout, then OpenSIPS will again use
failure_route
to intercept the message and create a new leg sending the INVITE to the final destination.
To implement any of these services, we need to store data related to the called number. During the authentication process, it is possible to load data from the caller but not...