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:00] – [Asterisk UnixODBC Configuration] adminasterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb [2014/04/30 16:35] (current) – [Config File] admin
Line 504: Line 504:
 </note> </note>
 <note important> <note important>
-**voiceboxes** is used to store voicemail box profiles and has the standard structure required by Asterisk. Storing voice box profiles in database allows to run several instances of Asterisk that can be load balanced or used in fail-over mode to store or listen to voice messages.+**voicemail** is used to store voicemail box profiles and has the standard structure required by Asterisk. Storing voice box profiles in database allows to run several instances of Asterisk that can be load balanced or used in fail-over mode to store or listen to voice messages.
 </note> </note>
 <note important> <note important>
-**voicemessages** is used to store voice messages and has the standard structure required by Asterisk. Storing voice messages in database allows to run several instances of Asterisk that can be load balanced or used in fail-over mode to store or listen to voice messages.+**voicemail_messages** is used to store voice messages and has the standard structure required by Asterisk. Storing voice messages in database allows to run several instances of Asterisk that can be load balanced or used in fail-over mode to store or listen to voice messages.
 </note> </note>
 <note> <note>
 ​If you need to do adjustments to the tables used by Asterisk, check the SQL scripts from Asterisk source tree located in **contrib/​realtime/​mysql**. ​If you need to do adjustments to the tables used by Asterisk, check the SQL scripts from Asterisk source tree located in **contrib/​realtime/​mysql**.
 +</note>
 +<note important>
 +In previous versions of this tutorial, there were different table names for **voicemail** and **voicemail_messages** (respectively **voiceboxes** and **voicemessages**) -- they were changed to match the default name in Asterisk, because they have same structure. **sipusers** and **sipregs** are a bit customized, thus they have different names - **sipusers** maps over **sippeers** and **sipregs** can be actually a view over **sipusers**. The table **voicemail_messages** is used for storing voice messages in database via odbc, you have to set its value inside voicemail.conf file, in the attribute **odbctable**.
 </note> </note>
  
Line 598: 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 609: Line 612:
 insert into sipregs(name) values('103'); insert into sipregs(name) values('103');
  
-insert into voiceboxes(customer_id, context, mailbox, password) values ('101', 'default', '101', '1234'); +insert into voicemail(context, mailbox, password) values ('default', '101', '1234'); 
-insert into voiceboxes(customer_id, context, mailbox, password) values ('101', 'default', '102', '1234'); +insert into voicemail(context, mailbox, password) values ('default', '102', '1234'); 
-insert into voiceboxes(customer_id, context, mailbox, password) values ('101', 'default', '103', '1234');+insert into voicemail(context, mailbox, password) values ('default', '103', '1234');
 </code> </code>
  
Line 1021: 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 1386: 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 1417: 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