[asterisk-users] extconfig, realtime, and SIP

Ishfaq Malik ish at pack-net.co.uk
Tue Jan 25 03:12:39 CST 2011


On Mon, 2011-01-24 at 18:46 -0500, Richard Kenner wrote:
> I'm confused about a few things relating to realtime, SIP and config in
> general.
> 
> As I understand it, with the exception of extensions.conf, I can either
> have a config file completely in text or completely in a database.  Is
> that correct?  I can't find documentation for exactly what "switch =>" does
> but is that only in the dialplan and a way to have it partly from a file
> and partly from a database?
You will need a text config file which, for each context in your
database, will have a line like
[<context-name>]
switch => Realtime/@

This basically lets asterisk know that the context called <context-name>
is stored in the db table as defined in extconfig.conf

You may also want to have macros in your text config file
> 
> For SIP, do I understand it correctly that I can have sip tables both via
> realtime AND in sip.conf?  For the LDAP realtime, how can I implement
> "setvar"?
again, you will need both a text file and a db table. The text file will
need the various general setting configures, especially
rtcachefriends=yes

You can also create peers in the text file such as defining your main
outbound path with a carrier, if you have one.

Other peers, such as SIP extensions can be defined in your db table.
Please not that if you make any changes to existing peers in your db
table you will need to prune the peer by using the following command in
the CLI
sip prune realtime <peer-name>

I have no experience using LDAP realtime, nor have I played with setvar
so I can't help you there I'm afraid.

Ish

-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062




More information about the asterisk-users mailing list