[Serusers] ser to asterisk

"Sebastian Kühner" SebastianKuehner at gmx.de
Mon May 2 17:15:54 CEST 2005


Hello,

I want to make a call from ser to asterisk but it doesn't work.

My asterisk-Server is running on 192.168.1.222 and my ser-Server on
192.168.1.223. If I want to make a call to sip:12 at 192.168.1.222 there
appears the message: "Proxy Authentication Required".


For routing to asterisk I use the following code:

  if (!(uri==myself)) {
    route(2);
    break;
  };

route[2] {

  # outbound requests are allowed only for registered BigU users

  if (!(src_ip==192.168.1.223) &
    !(proxy_authorize("192.168.1.223", "subscriber"))) {

    # ACK and CANCEL have no security mechanisms so they are just
    # noted
    /*if (method=="ACK" | method=="BYE") {
      log(1, "LOG: failed outbound authentication for ACK granted\n");
    } else if (method=="CANCEL") {
      log(1, "LOG: failed outbound authentication for CANCEL granted\n");
     }else {*/
      



      proxy_challenge("192.168.1.223", "0");
      break;






     #};
  };

  # to maintain credibility of our proxy, we check From in INVITEs
  if (!src_ip==192.168.1.223 & method=="INVITE" & !check_from()) {
    log(1, "LOG: Spoofed from attempt\n");
    sl_send_reply("403", "Use From=id next time");
    break;
  };

  append_hf("P-hint: OUTBOUND ON INTERNET\r\n");
  if (!t_relay()) {
    sl_reply_error();
    break;
  };

}


Thanks!

-- 
+++ Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS +++
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail




More information about the sr-users mailing list