At 12:18 PM 10/17/2002 -0300, Guillermo Schimmel wrote:
Chris Parker wrote:The problem with that is that I have several cities, and the numbers can contain each other, like:At 11:41 AM 10/17/2002 -0300, Guillermo Schimmel wrote:Hi list:
I have to proxy some request to another's company radius, based on called-station-id.
I am doing it with this line:
DEFAULT Called-Station-Id == "40004009", Proxy-To-Realm := "prima"
Now, the problem is that the PSTN switch that we use, (Ericsson AXE) is a piece of s..., and we receive things like:
40004009
1140004009 (11 is the area code)
12240004009 (122 is our telco code)
1221140004009 (both)
And so on....
There is a regular expression operator that would allow you to do something like: DEFAULT Called-Station-Id =~ "*40004009$", Proxy-To-Realm := "prima"
City 1: 400040
City 2: 40400040
So I would have to play with the order in with the expresion are evaluated, and I don't like it :)
Yes, proper parsing order will be needed. :)
This doesn't work. There is something on "processing_users_file" that says:How can I rewrite the Called-Station-Id AND Proxy-To-Realm?You could try using the ":=" operator on the second Called-Station-Id attribute.
If an attribute is already present in the check pairlist of the request it will not be changed (see files.c:movepair).
Right, so that won't work for you.
It is in the latest CVS version. See the file 'preproxy_users' for moreSo I think that this could be what I need. What can I read about this? How new is that? It is on 0.7? Or on CVS?Also, there is currently a new feature added to the server for 'pre-proxy' under which you could rewrite the attributes before proxying to the remote server. This is a new feature so it's not widely documented yet, but it does exist and should allow you to do what you need.
information. It is very basic at the moment, but it does allow you to
rewrite attributes prior to proxying.
-Chris
--
\\\|||/// \ StarNet Inc. \ Chris Parker
\ ~ ~ / \ WX *is* Wireless! \ Director, Engineering
| @ @ | \ http://www.starnetwx.net \ (847) 963-0116
oOo---(_)---oOo--\------------------------------------------------------
\ Wholesale Internet Services - http://www.megapop.net
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html