Chris Parker wrote:

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"
The problem with that is that I have several cities, and the numbers can contain each other, like:

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 :)


Now, the other company is using radiator, and they would like to receive allways "1140004009".

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.

This doesn't work. There is something on "processing_users_file" that says:

If an attribute is already present in the check pairlist of the request it will not be changed (see files.c:movepair).

But there is no movepair on files.c :(



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.
So 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?

Thanks



-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



- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to