Menu

Use opensips as a carrier

2011-11-08
2013-05-09
  • Diego Gonzalez

    Diego Gonzalez - 2011-11-08

    Hello !!!

    I am very very new to open sip and probably this is a silly question for all of  you, but I need I hand with this..

    I have two server… lets said A  and B

    I need to redirect the calls that are coming to A to server B. I know it can be done using opensips but I do not know how to start or which modules or function can help me to achive this….

    I have already used the   rewritehost("B"); function and it works,, but what I need is to send the whole packet to server B without changing the server A ip' address..

    Any help will be appreciated

     
  • Bogdan-Andrei Iancu

    Hi,

    If you want to force a request to go to another address than per RURI, you have to use the destination URI (this is an outbound proxy to be used for that request).
    So, simply set the destination URI to B (this will not change the RURI of the mesage) :  $du = "sip:B_IP:B_port" ;
    and send the request out.

    Regards,
    Bogdan

     
  • Diego Gonzalez

    Diego Gonzalez - 2011-11-08

    Hi Bogdan..

    When you said "send the request out" you mean use the forward(); function. don't you ?

     
  • Bogdan-Andrei Iancu

    either "forward()" (stateless) , either "t_relay()"  (stateful)