This Question is Answered

1 "correct" answer available (5 pts) 2 "helpful" answers available (1 pts)
48 Replies Last post: Jul 23, 2009 3:37 AM by isaacx   1 2 3 4 Previous Next
Click to view oliverkazaam41's profile   84 posts since
Jan 31, 2009

Jan 31, 2009 10:10 AM

OpenSBC as registrar for Asterisk


Hi I am new to using OpenSBC. I want to implement this kind of setup. I want to ask if it is possible. If it is possible will anyone with a kind heart give me a headstart on how to set it up. Here is my kind of setup

SIP Clients-------Internet


OpenSBC
Asterisk---- PSTN

My Sip extensions are configured in my asterisk box. I want to hide Asterisk from the outside world so I want my SIP Clients to register in OpenSBC with the accounts configured in Asterisk. Can OpenSBC do this? Do I have to add local domain users in OpenSBC? or Can OpenSBC do the registration for Asterisk.

I hope someone would be able to help me with this I have search google for any information about this setup but to no avail.

Thank you very much in advance..

Guest
1. Jan 31, 2009 10:37 AM in response to: oliverkazaam41
Re: [OpenSBC] OpenSBC as registrar for Asterisk

That configuration is actually quite simple. Set OpenSBC to
B2BUAUpperReg mode
along with the Always Proxy Media selection and set up routes to point
any connection from OpenSBC to Asterisk.
You can create as complex or simple routing rules as you want (look at
the examples in the docs on your routes). The most simple is to add a
wildcard route to point everything received to the upstream
node(Asterisk). Or you can create simple domains in the config to then
route clients to whichever asterisk instance you want (if there are
multiple Asterisk boxes). Remember, if you create a domain structure in
OpenSBC, you will have to include that information in the SIP client so
OpenSBC knows where to send the traffic.
By routing everything from the Border Controller to Asterisk the clients
will actually register with Asterisk and you can then access the PSTN
from there. I'd start with wild card entries and route everything at
first till you get the hang of it.

Regards,

Whit


OpenSBC Forum wrote:

Hi I am new to using OpenSBC. I want to implement this kind of setup. I want to ask if it is possible. If it is possible will anyone with a kind heart give me a headstart on how to set it up. Here is my kind of setup

SIP Clients-------Internet


OpenSBC
Asterisk---- PSTN

My Sip extensions are configured in my asterisk box. I want to hide Asterisk from the outside world so I want my SIP Clients to register in OpenSBC with the accounts configured in Asterisk. Can OpenSBC do this? Do I have to add local domain users in OpenSBC? or Can OpenSBC do the registration for Asterisk.

I hope someone would be able to help me with this I have search google for any information about this setup but to no avail.

Thank you very much in advance..


This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Opensipstack-osbcdevel mailing list
Opensipstack-osbcdevel at lists dot sourceforge dot net
https://lists.sourceforge.net/lists/listinfo/opensipstack-osbcdevel


Guest
3. Feb 1, 2009 10:39 AM in response to: oliverkazaam41
Re: [OpenSBC] OpenSBC as registrar for Asterisk

Once you create a routing rule in OpenSBC, it will forward the register
the request to Asterisk so the SIP client will be registered there. In
this case the registration is handled by asterisk, so no client accounts
need to be setup in OpenSBC. In this setup, OpenSBC is acting as a
router, forwarding all packets to asterisk. Then you can utilize
whatever trunks to the PSTN you have in Asterisk.

So essentially its like having asterisk exposed on its own external IP
address, but in this case OpenSBC is hiding the internal workings of
your network.

Hope that makes it more clear. The easiest thing to do is configure a
route everything to asterisk rule and try it out.. you can create more
complex routes once you get the hang of it..

Whit

OpenSBC Forum wrote:
Thank you for your quick response. I just want to clear something do I have to create routes in the B2BUA-routes? With this setup my SIP clients will register to the IP address of my SBC box? and automatically SBC will forward all sip registration request to asterisk even if I don't create any local domain users. How about if I have IAX trunks in asterisk will my sip clients be able to use that trunk if they have registered in my SBC Box? Sorry for the many questions I am really really confused with this setup. Thank you again.

This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Opensipstack-osbcdevel mailing list
Opensipstack-osbcdevel at lists dot sourceforge dot net
https://lists.sourceforge.net/lists/listinfo/opensipstack-osbcdevel


Guest
5. Feb 4, 2009 4:21 AM in response to: oliverkazaam41
Re: [OpenSBC] OpenSBC as registrar for Asterisk

Hi again, Sorry for my ignorance but I already followed what you said in
the previous post. I get a 403 forbidden error in my xlite. I pointed the
xlite to the external IP of SBC. I added a b2bua route using this
Forbidden for what request REGISTER or INVITE? If it's INVITE you might
want to put a check on Accept-All-Calls in Trusted-Domains. If it's a
REGISTER, then OpenSBC is trying to authenticate your REGISTER locally.
Make sure you have upper-reg configured correctly. The trick for upper-reg
is to make sure that your set the ip-address of your outbound proxy to the
ip address of opensbc and registrar/domain to the ip address or domain of
your asterisk box. If done correctly, upper-reg would work out of the box
without setting any configuration.

[sip:*] sip:asteriskip(xxx.xxx.xxx.xxx). Whats wrong with this? Also how
to do I restart SBC? because it says that when you change SBC modes you
need to restart. What I do is kill the process and start it again. I hope
you still answer my question.

That's cool. It basically means route everything to asterisk. If you want
you can do a "make distrib" this would create the scripts necessary to
start and stop the process in the distrib folder.

Joegen

Click to view joegen's profile   519 posts since
Apr 28, 2007
7. Feb 4, 2009 10:05 AM in response to: oliverkazaam41
Re: [OpenSBC] OpenSBC as registrar for Asterisk
Ok. Let's try this one more time. What you explained here is actually what is referred to as Upper Registration in OpenSBC Linggo. Let us say you have the following IP address assignments

OpenSBC: 111.111.111.111
Asterisk: 222.222.222

The first thing that you need to set the SBC-Application-Mode to B2BUpperReg Mode. You need to set this in General-Parameters.
Then add a route in B2BUA-Routes that would route all calls to your asterisk box.

/* Route all INVITEs to asterisk */
[sip:*] sip:222.222.222.222

/* Set Accept-All-Calls to TRUE in trusted domains so OpenSBC will not authenticate calls.  Asterisk should be doing this.  */
Accept-All-Calls=true


Grab your SIP Phone config and set the following
Outbound-Proxy:  111.111.111.111  /// Set the address of OpenSBC as outbound proxy for your phone.
Registrar/Domain:  222.222.222.222 /// Set the registrar of your phone to the address of asterisk


When your phone send the register, it would look like this (replace [] with )
REGISTER sip:222.222.222.222 SIP/2.0
From: "Phone" [sip:user@222.222.222.222];tag=tag123
To: "Phone" [sip:user@222.222.222.222]
Contact: [sip:user@10.0.0.1:5060];expires=3600


OpenSBC would automatically relay this REGISTER request to asterisk. You will see the status of upper registrations in the OpenSBC-Registration-Status.
All other phones should be able to reach this extension when they call through asterisk.

{quote:title=oliverkazaam41 wrote:}{quote}

First of all I want to thank all of you guys who answered my post. I somehow was able to integrate OSSBC and asterisk. I can now call extensions registered in my asterisk using extensions registered in OSSBC. I don't if this is possible can extensions registered in asterisk call extensions registered in SBC? Because right now with my current setup I can't. Do I have to modify something in asterisk? I had a temporary solution by creating a trunk and peered it to my SBC. But the problem is I have to add a prefix since extensions registered in OSSBC is configured in my asterisk box. Is there a way for asterisk to call extensions registered in OSBC directly without the sip trunk? I really thought that when somenone registers in OSSBC it will automatically forward it to asterisk and asterisk will treat that extension as registered directly to asterisk. Is this setup possible?

HTH,

Joegen
Guest
9. Feb 4, 2009 8:20 PM in response to: oliverkazaam41
Re: [OpenSBC] OpenSBC as registrar for Asterisk
In short what I am trying to configure is like a proxy server for asterisk

This is exactly what upper registration is. If you replace OpenSBC with
OpenSER, the process will be exactly the same. Anyway, I think I know what
you want so I won't pursue further down that line. What you want is to give
your users just the IP address of OpenSBC and have them configure it as both
their Outbound Proxy and Registrar/Domain. You got lucky. Just two days
ago, I added a new parameter in Upper-Registration called
All-Reg-As-Upper-Reg. Grab the latest code from CVS. The comment below
says it all.

/*
This parameter will indicate to OpenSBC that you want to treat all REGISTER 
requests as upper registration including ones with request-uri bound to an 
SBC local address. Typically, OpenSBC will process REGISTER routed to its 
local address or a domain which resolves to its local address using Local 
Domain Accounts. If this value is checked, all REGISTER will effectively be 
upper registration and make Local Domain Accounts moot. You do have to make 
sure that a corresponding route is set to point the local domain/address to 
an actual upper registrar address in B2BUA-Routes.
*/


Joegen


From: "OpenSBC Forum"
Sent: Thursday, February 05, 2009 2:58 AM
To:
Subject: Re: [OpenSBC] OpenSBC as registrar for Asterisk

Hi Joegen. Thanks for the reply. Yeah but what I want to do is to hide
asterisk from the outside. I locked down asterisk to only accept request
from my SBC box. I did this because I have many mobile employees in the
office. Before, for them to register to asterisk we have to add their IP
from the exception list so that they could register to asterisk. I placed
SBC so that they will just do the registration in the SBC box. In short
what I am trying to configure is like a proxy server for asterisk.

------------------------------------------------------------------------------


Guest
11. Feb 4, 2009 10:02 PM in response to: oliverkazaam41
Re: [OpenSBC] OpenSBC as registrar for Asterisk
Sorry Joegen. Do I have to compile the codes i downloaded from CVS? I
already downloaded it using the cvs-get but I did not see any new option
in Upper Registration.

Yes you have to recompile both OpenSIPStack and OpenSBC. After recompiling,
double check that you have the correct version of the OpenSBC binary using
the -v option

-bash-3.00$ ./opensbc -v
Product Name: OpenSBC
Manufacturer: opensipstack.org
Version     : 1.1.5-74
System      : SunOS 5.10-i86pc Generic_118855-33
Release-Date: Feb  4 2009 06:30:22


You also need to make sure that you use the current oss-application.conf.xml
for the new param to appear in HTTP admin.

Joegen