[Serusers] breaking down ser.cfg

Jan Janak jan at iptel.org
Mon Jun 27 23:11:14 CEST 2005


In general you can use any text (pre-) processor to assemble your
configuration file from smaller pieces. I have been using m4 for this,
for example you can specify the list IP addresses of all gateways at the
beginning of the file and it will generate proper regular expressions
and maching conditions which you can then use in the config file.

There is a small example in sip_router/etc/rules.m4 and
sip_router/etc/ser.cfg.m4

  Jan.

On 27-06-2005 00:06, Iqbal wrote:
> 
> Hi
> 
> My ser config seems to be growing, in fact its getting way too big, and I
> am beginning to wonder if there is a better way of creating the config.
> 
> I have got the basic per METHOD routes
> Then I have got dialing plans covering alot of prefixes, which means
> there alot of checks be MESSAGE
> 
> Then I have flags being set based on user type and what group he is in
> Add to this the authentication checks in each message dialogue, and
> slowly its getting out of control.
> Then we have natting to deal with also,
> Oh add voicemail also, and a few more customer types which need to be
> routed elsewhere.
> 
> Everytime I change a route, or want to alter things, I have got to step
> through alot of the config, just to make sure I havent broken a route,
> or allowed someone to call they shouldn't.
> 
> Has anyone come up with a cool way of doing this..or should I say a
> cleaner way.
> 
> I was wondering if we could breal ser.cfg into lots of smaller files, eg
> one which die the auth, and then one per message type
> 
> all of them could be included with each other, i.e I would include the
> auth file as a header to each of the METHOD (eg INVITE, REGISTER) files
> 
> the I could have routing files, , which could also be included and have
> routes per pacjage type, or user type (i.e have as many as I want, each
> for its own cause). So the main ser.cfg would be like
> 
> ser.cfg
> --------
> include=>general.cfg
> include=>invite.cfg
> etc
> etc
> 
> and invite.cfg would be
> 
> invite.cfg
> -----------
> include =>auth.cfg
> 
> I just think then adding things like voicemail, and other features might
> be easier
> 
> If anyone has done this, or works, would like to hv feedback. Or if
> anyone has a file in excess of 1600lines again setup layout ideas would
> be good
> 
> Iqbal
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list