Hi folks,
 
I have Asterisk as a PSTN termination GW, Openser will handle the user registration.
Openser users has name format 7xxxxxxxx  ( all digistes), which can call each other peer to peer ( it is a basic openser function).
I want to forward the call ( 1xxxxxxxxxx  or 011xxxxxxxxxxxxx ) to Asterisk when openser user try to terminate US or International calls.
I tried to use the setting like this:
 
if(is_method("INVITE") && !has_totag() && uri=~"sip:011[0-9]+@.*") {
                     route(4);
                        exit;
                };
 
 

route[4] {
            strip(3);
            # route to Asterisk Media Server
        rewritehostport("222.222.222.79:5060");
         if (!t_relay()) {
                sl_reply_error();
        };
         exit;
}

 
 
OpenSER keep looking the 011xxxxxxxxx  from location and  got 408 always , it does not forward the call to Asterisk. I read a doc about how to share acc and voice meail with Asterisk, will it have to use  failure_route to accomplish it ? I am new to Openser and dont know much about the routing logic. Anybody could point me to the right way? A sample cfg will really appreciated.
 
 
Steve