[ previous ] [ next ] [ threads ]
 To :  yate@v...
 From :  "peter" <pvswie01@i...>
 Subject :  Searching alternative to regexroute [contexts] for setting context
 Date :  Sat, 19 Jun 2010 22:25:10 +0200
Hi All,

I am searching for an alternative to the regexroute.conf [contexts] area
for setting the context variable. The regexroute module documentation
indicates it is possible ('... Note that the preroute stage is skipped
if the message already has a "context" parameter...').

I am interested in this for both my local accounts as defined in
regfile.conf and my SIP provider accounts as defined in accfile.conf

Background:

I intend to set up a yate on an embedded system, low on resources:
everything file
based, no database etc. intending to replace a resource hungry asterisk
that has never been reliable.
I started with yate on a debian distribution trying to get my
configuration to work and it is now more or less working. Very clean and
reliable. 


I have an external SIP provider (for now: my old asterisk box I intend
to replace)
I have a couple of SIP phones (say phone_1, phone_2, etc) defined in
regfile.conf

I have these SIP phones processed in their own sections in
regexfile.conf through:
1) assign each phone to its own context
[contexts]
$phone_1^=PhoneGr_1
$phone_2^=PhoneGr_1
$phone_3^=PhoneGr_2
...
2) process them each in their own group
[PhoneGr_1]
...

[PhoneGr_2]
...

I very much appreciate processing calls from each group (phones and SIP
providers) in their own context: clean and secure. However the approach
described above has some disadvantages (or maybe more, I am not that
experienced with yate yet):
* The contents of accfile.conf, regfile.conf and regexfile.conf have to
be kept in sync.
This is not only prone to errors but also more work then necessary.
* Testing revealed that a call coming in from the SIP provider
(asterisk) with an ID listed in [contexts] (e.g. phone_1) was assigned a
context through the regexfile.conf [contexts] section.
Definitely not the intention!
* Assigning a context from regexfile.conf is runtime activity causing an
unnecessary CPU load.

Therefore my question: what methods other then the [contexts] section in
regexfile.conf are available to assign a context.

Remark: asterisks allows for setting context from the account
definition, maybe yate allows this too. So far my tries to set context
from regfile.conf and accfile.conf did not show succeed, maybe with the
proper syntax...

Kind regards
PvSw
-- 
  peter
  pvswie01@i...

-- 
http://www.fastmail.fm - Does exactly what it says on the tin