Thread: [OpenSBC] OpenSBC as registrar for Asterisk
Brought to you by:
joegenbaclor
From: OpenSBC F. <ope...@op...> - 2009-01-31 15:11:03
|
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.. |
From: Whit T. <de...@wh...> - 2009-01-31 15:38:01
|
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 > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensipstack-osbcdevel > > > > |
From: OpenSBC F. <ope...@op...> - 2009-02-01 02:07:22
|
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. |
From: Whit T. <de...@wh...> - 2009-02-01 15:39:15
|
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 > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensipstack-osbcdevel > > > > |
From: OpenSBC F. <ope...@op...> - 2009-02-02 19:39:21
|
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 [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. |
From: Joegen B. <jb...@so...> - 2009-02-04 09:21:18
|
> > 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 |
From: OpenSBC F. <ope...@op...> - 2009-02-04 14:17:23
|
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? |
From: OpenSBC F. <ope...@op...> - 2009-02-04 15:06:04
|
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. {code} /* Route all INVITEs to asterisk */ [sip:*] sip:222.222.222.222 {code} {code} /* Set Accept-All-Calls to TRUE in trusted domains so OpenSBC will not authenticate calls. Asterisk should be doing this. */ Accept-All-Calls=true {code} Grab your SIP Phone config and set the following {code} 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 {code} When your phone send the register, it would look like this (replace [] with <>) {code} 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 {code} 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 |
From: OpenSBC F. <ope...@op...> - 2009-02-04 18:59:15
|
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. |
From: Joegen B. <jb...@so...> - 2009-02-05 01:21:12
|
> 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. {code} /* 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. */ {code} Joegen -------------------------------------------------- From: "OpenSBC Forum" <ope...@op...> Sent: Thursday, February 05, 2009 2:58 AM To: <ope...@li...> 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. > > ------------------------------------------------------------------------------ |
From: OpenSBC F. <ope...@op...> - 2009-02-05 02:55:17
|
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. |
From: Joegen B. <jb...@so...> - 2009-02-05 03:03:06
|
> 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 {code} -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 {code} 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 |
From: OpenSBC F. <ope...@op...> - 2009-02-05 04:23:08
|
Thanks again Joegen. One more thing please correct me if Im wrong in compiliing. What I do is open OpenSBC folder and execute ./configure & make after it is completed I go to OpenSipStack folder and execute again the same command? When I excuted make destrib I get errors. |
From: OpenSBC F. <ope...@op...> - 2009-02-05 06:14:18
|
I really can't register it to my Asterisk I get an 403 forbidden error. Asterisk IP: 6x.1x.1xx.1xx SBC IP: 2xx.1xx.10.1xx based on the logs it is not being forwarded to my asterisk box. I don't see my asterisk ip involve in the registration process. NIST(1156217994) Event(SIPMessage) - REGISTER sip:2xx.1xx.10.1xx SIP/2.0 2009/02/05 01:07:34.638 DBG: [CID=0x0ef7] TRANSACTION: (NIST) REGISTER sip:2xx.1xx.10.1xx SIP/2.0 State: 0 2009/02/05 01:07:34.638 DTL: [CID=0x0ef7] NIST(1156217994) StateIdle->StateTrying 2009/02/05 01:07:34.638 INF: [CID=0x0ef7] *** LOCAL REG *** sip:8233@2xx.1xx.10.1xx 2009/02/05 01:07:34.638 DTL: [CID=0x0ef7] *** LOCAL REG *** Registration being authenticated 2009/02/05 01:07:34.639 DTL: [CID=0x0ef7] *** LOCAL REG *** Registration Rejected 2009/02/05 01:07:34.639 DTL: [CID=0x0ef7] NIST(1156217994) Event(SIPMessage) - SIP/2.0 403 Forbidden 2009/02/05 01:07:34.639 DBG: [CID=0x0ef7] TRANSACTION: (NIST) SIP/2.0 403 Forbidden State: 1 2009/02/05 01:07:34.639 DTL: [CID=0x0ef7] NIST(1156217994)HandleStateTrying->StateCompleted 2009/02/05 01:07:34.640 INF: [CID=0x0ef7] >>> SIP/2.0 403 Forbidden DST: 5x.6x.2xx.2xx:37098:UDP SRC: 2xx.1xx.1x.1xx:5060 enc=0 bytes=337 Here are my Upper Registration Route Enable Stateful-Reg =True Rewrite TO -Domain = True Rewrite FROM -Domain = True Route List = sip*Ip of my asterisk Please help! |
From: OpenSBC F. <ope...@op...> - 2009-02-05 11:16:59
|
Hi Joegen. I was able to solve the problem with the forbidden error. Now my sip client is giving me a request pending error. Do I have to modify something in asterisk? |
From: OpenSBC F. <ope...@op...> - 2009-02-06 10:03:01
|
Hello, I would like to setup OpenSBC as proxy for Asterisk ... I have 403 forbidden error when phones try to register. What have you change to solve this issue ? Regards |
From: OpenSBC F. <ope...@op...> - 2009-02-06 10:35:35
|
Now it seems that OpenSBC forward to Asterisk but Asterisk register the extension and immediatly unregister it. |
From: OpenSBC F. <ope...@op...> - 2009-02-06 12:22:03
|
Hi Scrammate until now I still don't have idea on how to get this working. I am really stuck. My xlite is giving me a response 491 error pending request. Can you post your route list in the upper registration? |
From: OpenSBC F. <ope...@op...> - 2009-02-06 13:02:32
|
I only do this [sip:*] sip:my.asterisk.ip:5060 It's very strange because I can see that register and unregister it immediately ... My SIP Server has a public fixed IP. And my XLite is connected through a NAT. |
From: OpenSBC F. <ope...@op...> - 2009-02-06 13:14:09
|
I think something has to configured in asterisk side. Maybe in sip.conf. I am really not sure. Please keep me posted if you were able to do it. I am currently still experimenting on this. I'll post my config if I ever it works. I hope Joegen who has been very helpful from the start helps us. |
From: OpenSBC F. <ope...@op...> - 2009-02-06 13:32:21
|
I've put in my sip.conf nat=never and now I obtain another error ... [Feb 6 14:28:17] NOTICE[7755]: chan_sip.c:12669 handle_response_peerpoke: Peer '305' is now Reachable. (4ms / 2000ms) -- Got SIP response 489 "Not Processing Unsolicited Notify" back from 77.73.40.16 -- Unregistered SIP '305' |
From: OpenSBC F. <ope...@op...> - 2009-02-06 14:18:41
|
Might be this can help us http://sipx-wiki.calivia.com/index.php/SipXecs-OpenSBC_Setup_Guide_for_Different_Call_Scenario |
From: OpenSBC F. <ope...@op...> - 2009-02-06 14:27:41
|
My kind of setup is not discussed on that site. They use SBC their as outbound proxy. Do you still get the same result? |
From: OpenSBC F. <ope...@op...> - 2009-02-06 14:44:01
|
My Asterisk and OpenSBC have public IP address. I need OpenSBC just for nat outbound proxy. |
From: OpenSBC F. <ope...@op...> - 2009-02-06 16:33:31
|
I've just test with Asterisk 1.6.0.1 and the OpenSNC CVS ! Nothing ! Doesn't works ... What we have missed ... |