I wrote:
Would it be a proper solution to just lookup in the aliases- and location-table, and, if not found there, just forward it to the PSTN gateway? The PSTN gateway should then route it back to my SER if it's a number assigned to me, and I'd get a loop, which should be detected by the mf_process_maxfwd_header() function.
Sounds like a ugly hack, and I'm really not shure if this would work, so how would be the standard solution for such a task? (beside using a PSTN prefix)
Hmm... another idea: putting all of my users into a group "internal" and process the lookup("location") based on the group:
if (is_user_in("To", "internal")) { # this one goes to my voip net ... } else { if(is_user_in("From", "internal")) { # internal users are allowed to go to GW t_relay_to_tcp("GW-IP", "GW-Port"); # or something like that break; } else { # no relaying via my GW ... # (error processing) } }
What about this approach?
Andy