I am new to asterisk and I am trying to redirect calls from PSTN to a VoIP provider through IAX. I have read some articles from voip-info.org but still not clear to me(some of the commands). Would someone explain the third line of below config.
The idea is to put a number, to where the user wants to redirect his phone, in AstDB database, that is a part of Asterisk. So this way the number to where the redirection is made is saved in permanent storage. You can retrieve this information when you are writing the Asterisk DialPlan that takes care of incoming calls to an extension.
Thank you for your idea. I get your point in putting the number to the AstDB. In my case I am forwarding it to a provider on IAX Trunk, would that mean I will store the Channel Name(iax.conf) of that trunk to the asterisk Database? Is it possible to retrieve the Channel Name(in iax.conf) to be used in extension.conf? I am still trying to gather the right pieces of info right now.
Any suggestion/clarification is very highly appreciated. Thank you.
Strip the first 4 digits off the extension number and store the rest of the extension in astdb entry CFIM/xxxxx where xxxxx is the value of the variable CALLERIDNUM. I don’t know how CALLERIDNUM gets set as there is a function that would return the caller ID number, so I wouldn’t expect there to be a standard variable of that name. I can’t tell you how the stored information is used, without seeing the rest of the dialplan, although my guess is that it is for the reason already explained.
In particular note that this code seems to be about providing a means to change the forwarded to number, not about the forwarding. You will not need to use AstDB if you always forward to the same number.
Also note that, when people start repeating questions, essentially unchanged, after getting a valid answer, it generally means that they don’t understand enough of how Asterisk works to benefit from asking the question in the first place.