[OpenSIPS-Users] IP Based Authentication on Asterisk with OpenSIP

Muhammad Zulqarnain mzulqarnain2002 at yahoo.com
Fri Dec 11 20:31:30 CET 2009


Hello!

This is Zulqarnain and my first post to this mailing list. I just start using OpenSIP and trying to get myself familiar with OpenSIP and it's config files, method etc.

Well, I am trying to achieve following:
Client IP: x.x.x.x
OpenSIP: y.y.y.y
Asterisk: z.z.z.z

1) Client -> OpenSIP (Load_balancer) -> Asterisk1, Asterisk2....
   a) If Client Request is Register -> Relay to Asterisk (It is working fine as peer is defined with user/passwd auth, host=dynamic)
   b) If Client Request is INVITE -> Relay to Asterisk (Asterisk Reject as peer is defined as IP Auth, type=peer, host=x.x.x.x)

"b" scenario failed as Asterisk read OpenSIP IP y.y.y.y and reject the call as Asterisk is expecting Source IP x.x.x.x instead of y.y.y.y

I tried following to fix but no success:

1) 302 Redirect for GW Clients, who can only authenticate by IP and don't support registration with user/passwd. But my DID Provider don't support 302 redirect although i have tested with Eyebeam Client in peer to peer mode and it works. But as it didn't work with my provider so I tried another way:

2) uac_replace_from & uac_replace_to function of uac.so module, I tried to replace from/to field with client IP but still Invite is from OpenSIP IP y.y.y.y and again Asterisk/Voipswitch (another switch) reject call. 

If required I can post my config file as well here or pastebin for your expert reviews. I would like to know if it is possible to achive above scenario with OpenSIP, if Yes then how, any example would appreciated.

Another small problem is that while setting up 302 redirect I wanted to pass $du value to rewritehost("") as $du have the address return by load_balancer of destination IP and rewritehost() only accept string. Looking for suggestion on this as well.

Hopefully to receive positive reply by community.

Thanks
Regards,
Muhammad Zulqarnain
MSN: zulqarnain at globalitvision.com



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20091211/bb4c28c7/attachment.htm 


More information about the Users mailing list