[Freeswitch-users] Freeswitch and Opensips

Miha miha at softnet.si
Tue Apr 24 15:56:10 MSD 2012


Hi,

I have configured Opensips to behave also as registrar. Only invites are 
load_balance to one of the FS boxes. What must I do in FS configuration 
as FS now reply  Originate Failed.  Cause: USER_NOT_REGISTERED.
This is logically to me as users are registering to Opensips and FS 
handles media and etc.

Is there any threat on wiki about this (I did not find)?

p.s.: I have put opensips IP to FS ACL.

Thanks for all your help!

Regards,
MIha

On 4/20/2012 10:14 AM, Miha wrote:
> On 4/17/2012 2:15 PM, Anton Kvashenkin wrote:
>> Good read 
>> http://blog.2600hz.com/post/18096749028/understanding-how-fs-supports-opensips-as-a 
>>
>>
>> 17 ?????? 2012 ?. 13:41 ???????????? Miha <miha at softnet.si 
>> <mailto:miha at softnet.si>> ???????:
>>
>>     Hi to all,
>>
>>     I have configured opensips that works like load_balancer (wiki on
>>     FS page).
>>     So, we have SBC, trunk is made to Opensips, than opensips is
>>     load_balacing to FSs.
>>     When you call from FS, call is going to Opensips, then opensips
>>     redirect the call to SBC, if call must go outside.
>>
>>     My question:
>>
>>     FSs boxes are all the same (same dialplan, directory
>>     configuration, etc.). What happens if call is made to a user,
>>     which is registered on one of the FS box? I guess I must change
>>     dialplan and set that all trafic FS send to opensips (not
>>     internally), because if someone calls to a local user, but user
>>     is registered on other FS box, FS will behave as user is not
>>     registered.
>>
>>     So, will opensips know which user is registered on which FS box
>>     when opensips will be doing load_balacing?
>>
>>     Thanks for explenation.
>>
>>     Regards,
>>     Miha
>>
>>     _________________________________________________________________________
>>     Professional FreeSWITCH Consulting Services:
>>     consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>>     http://www.freeswitchsolutions.com
>>
>>     
>>     
>>
>>     Official FreeSWITCH Sites
>>     http://www.freeswitch.org
>>     http://wiki.freeswitch.org
>>     http://www.cluecon.com
>>
>>     FreeSWITCH-users mailing list
>>     FreeSWITCH-users at lists.freeswitch.org
>>     <mailto:FreeSWITCH-users at lists.freeswitch.org>
>>     http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>     UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>     http://www.freeswitch.org
>>
>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> 
>> 
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://wiki.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
> HI,
>
> thank you all for your answers . So If I would like to do 
> load_balacing with opensips I would need some kind of logic for every 
> registered phone I must know to which FS is registerd, so I would know 
> to which one I must FDW call.
>
> But in this case this script do not work (as is written on FS wiki):
>
>   if (is_method("INVITE")) {
>                  if (!load_balance("1","pstn","1")) {
>                          send_reply("503","Service Unavailable");
>                          exit;
>                  }
>          }
>          else if (is_method("REGISTER")) {
>                  if (!ds_select_dst("1", "0")) {
>                          send_reply("503","Service Unavailable");
>                          exit;
>                  }
>          }
>          else {
>                  send_reply("405","Method Not Allowed");
>                  exit;
>          }
>
>          # route the request
>          if (!t_relay()) {
>                  sl_reply_error();
>          }
>
>
>
>
> Example:. You have three users.A and B user are registered to FS1 and C user to FS2. A and C are talking if B gets a call as Opensips do not know to which box B is registered
> It could FWD it to FS2, which will not work as B is registered to FS1. 
> Am I right?
>
> Rergards,
> Miha
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120424/8836aca1/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list