HI Michael,

I would say you can get each sip messages (REGISTER,INVITE,ACK,BYE) routed to 
your asterisk server using rewritehostport("<your_ip>:5060");

you can configure proxy as your opensips in sip clients with port 5260.


if(is_method("REGISTER")){
              rewritehostport("<your_ip>:5060");  # This will forward any 
register packet to your asterisk. 

              route(1);  # <-- this route actually send the sip packet to 
asterisk
}


route[1] {

      if (!t_relay()) {
               xlog("L_INFO", "(Rewriting) t_relay 1 - M=$rm RURI=$ru F=$fu 
T=$tu IP=$si ID=$ci\n");
              sl_reply_error();
       }
       t_on_reply("1");
       t_on_failure("1");               
}



Just as above you can route other sip messages as well to your asterisk box.



________________________________
From: Michael <[email protected]>
To: OpenSIPS users mailling list <[email protected]>
Sent: Thursday, July 21, 2011 2:56 PM
Subject: Re: [OpenSIPS-Users] Using OpenSIPS as Proxy to Asterisk


On Thu, Jul 21, 2011 at 12:20 PM, Gareth Blades <[email protected]> 
wrote:

 
>The only documentation I know of is
>http://www.opensips.org/Resources/DocsTutAsterisk
>

In this tutorial, the extensions register to OpenSIPS, while we would like to 
use it only as a Proxy and not as a Registrar, so that a few of the extensions 
would be able to register to Asterisk and make/receive calls to/from it, going 
through OpenSIPS, as a simple relay only. I assume it should be possible.

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to