asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb [2013/05/14 13:50] – [Asterisk Database] adminasterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb [2014/04/30 16:35] (current) – [Config File] admin
Line 601: Line 601:
  
 <code sql> <code sql>
-insert into sipusers (name, username, host, sippasswd, fromuser, fromdomain, mailbox)+insert into sipusers (name, defaultuser, host, sippasswd, fromuser, fromdomain, mailbox)
   values ('101', '101', 'dynamic', '101', '101', 'yoursip.com', '101');   values ('101', '101', 'dynamic', '101', '101', 'yoursip.com', '101');
-insert into sipusers (name, username, host, sippasswd, fromuser, fromdomain, mailbox)+insert into sipusers (name, defaultuser, host, sippasswd, fromuser, fromdomain, mailbox)
   values ('102', '102', 'dynamic', '102', '102', 'yoursip.com', '102');   values ('102', '102', 'dynamic', '102', '102', 'yoursip.com', '102');
-insert into sipusers (name, username, host, sippasswd, fromuser, fromdomain, mailbox)+insert into sipusers (name, defaultuser, host, sippasswd, fromuser, fromdomain, mailbox)
   values ('103', '103', 'dynamic', '103', '103', 'yoursip.com', '103');   values ('103', '103', 'dynamic', '103', '103', 'yoursip.com', '103');
  
Line 1024: Line 1024:
  
 #!ifdef WITH_ASTERISK #!ifdef WITH_ASTERISK
-modparam("auth_db", "user_column", "username")+modparam("auth_db", "user_column", "name")
 modparam("auth_db", "password_column", "sippasswd") modparam("auth_db", "password_column", "sippasswd")
 modparam("auth_db", "db_url", DBASTURL) modparam("auth_db", "db_url", DBASTURL)
Line 1389: Line 1389:
 # Authentication route # Authentication route
 route[AUTH] { route[AUTH] {
 +
 + # if caller is not local subscriber, then check if it calls
 + # a local destination, otherwise deny, not an open relay here
 + if (from_uri!=myself && uri!=myself)
 + {
 + sl_send_reply("403","Not relaying");
 + exit;
 + }
 +
 #!ifdef WITH_AUTH #!ifdef WITH_AUTH
  
Line 1420: Line 1429:
  consume_credentials();  consume_credentials();
  }  }
- # if caller is not local subscriber, then check if it calls 
- # a local destination, otherwise deny, not an open relay here 
- if (from_uri!=myself && uri!=myself) 
- { 
- sl_send_reply("403","Not relaying"); 
- exit; 
- } 
- 
 #!endif #!endif
  return;  return;

100%


Copyright 2010-2020 Asipto.com