Let me describe my scenario:

SipUser1 -------register request------------> kamailio (SIP Proxy) ------- forwarded register request-----------> Asterisk

  1. In the above scenario, when I register to Asterisk through Kamailio, it works fine when I give the "record-route()" function in the cfg file. Further, using this, I can also call to another extension 602 which is also registered to Asterisk but 602 cannot call to 601 which is registered via kamailio.
  2. However, If I remove the "record-route()" function without unregistering 601 and restarting the server, 602 can call to 601 . 
route {
 if ($fU=="601"&&is_method("INVITE"))
      record_route();
  rewritehost("10.0.10.111"); //asterisk host
         route(1);
}
route[1] {
        # send it out now; use stateful forwarding as it works reliably
        # even for UDP2TCP
        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
}

should i add anything in script further...



--
Toqeer Ali Syed

Red Hat Certified Engineer
mob:     +92 321 9059916