Asterisk 11.2.1 sip_conf Realtime Configuration

hi, I want to load sip configuration from database (PostgreSQL). I hope some of you help me. How to load sip_conf from database and where is table structure for PostgreSQL