[OpenSIPS-Users] Interproxy Authentication
Dave Singer
dave.singer at wideideas.com
Thu Feb 17 07:44:46 CET 2011
Juri,
If you are looking to get opensips1 itself to respond to a
proxy_challange of opensips2 your looking at a headache. Any way you
go you'll have to change the way things work to make a special case
for opensips1 on opensips2.
My suggestion would be to, where you are about to do the
proxy_authorize, check if is from opensips1 and if it is skip the
proxy_authorize.
Example:
if ( ! ( $si == "<IP of opensips1>" || proxy_authorize("", "subscriber") ) ) {
proxy_challenge("", "0");
exit;
}
The source IP, $si, will be checked first and if it is a match, it
will short cut and proxy_authorize will not be called.
But if both tests fail a proxy_challenge is sent back.
If opensips1 is not at a static IP then you would probably want to
have opensips1 register, using uac module, with opensips2. On
opensips2 you would then do a db lookup to see if the source IP is the
same as what opensips registered from. That lookup could be cached so
you don't have to do a db call for every call.
If this is your case, search recent threads for cache_fetch for some
ideas of a similar use.
Dave
On Wed, Feb 16, 2011 at 1:36 AM, Juri Nysschen <juri at greydotelecom.com> wrote:
> Hi All,
>
>
>
> I want this scenario:
>
> UA - > Opensips1 -> Opensip2 -> PSTN
>
> Opensips2 has a set of subscribers and verifies authentication against a
> mysql db, keeps cdrs etc.
>
> Opensips1 has a different set of subscribers with db authentication and
> cdrs.
>
>
>
> The UA makes a call and is routed from Opensips1 to Opensips2 and then onto
> the PSTN gateway.
>
>
>
> My question is how do I impersonate the call made by UA as coming from a
> valid subscriber known to Opensips2?
>
>
>
> Currently I use asterisk to perform this role, but would ideally like to
> remove it from the chain:
>
> UA - > Opensips1 -> Asterisk -> Opensips2 -> PSTN
>
>
>
> Regards
>
> Juri Nysschen
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list