This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
6 Replies Last post: Mar 26, 2008 10:55 PM by Guest  
Click to view brettnem's profile   3 posts since
Mar 26, 2008

Mar 26, 2008 10:23 AM

Programaticaly Adding SIP Trunks and Routes


Hi,

I've got a couple of questions. I've looked all over for answers and I just can't find anything. Basically, I'd like to programatically add sip-trunks and routes. What I mean by this, is I have another web-based application that I'd like to send some sort of api command to OpenSBC to add/delete/update routes in OpenSBC. I've considered simply POSTing to the internal website as if I were manually entering the data, but that seems kinda lame and error prone. Changing opensbc.ini doesn't appear to do anything at all.

Next, of course, I'd like to tell OpenSBC "Reload your configuration and make it active". I for the life of me can't figure this out. Even when I manually change the sip trunk config on the OpenSBC web interface, it doesn't seem to reload things like registration expires timers and password changes.

Lastly, where does OpenSBC store it's persistant data? Sometimes I see this stuff put into opensbc.ini, but surely it isn't using this in real time.


Thanks!
-Brett

Click to view ehernaez's profile   47 posts since
Aug 28, 2007
1. Mar 26, 2008 2:05 PM in response to: brettnem
Re: Programaticaly Adding SIP Trunks and Routes

Hi Brett,

Unfortunately, there is no good way to programatically change the OSBC configurations. At Solegy, we use a proprietary plugin to OSBC that allows dynamic routing from an external application. This allows us to have flexibility without changing configurations in OSBC ever. In the future, there will be a Diameter module available for OSBC, which will allow an external Diameter server to control OSBC operation. For now, the best you can do is to load route files from an external file as described here:

http://www.opensourcesip.org:8080/clearspacex/docs/DOC-1031

This, however, will still require a re-initialization for the new configuration to take effect.

HTH

Click to view ehernaez's profile   47 posts since
Aug 28, 2007
3. Mar 26, 2008 4:19 PM in response to: brettnem
Re: Programaticaly Adding SIP Trunks and Routes

By re-initialization, I meant that the application needs to be restarted. But now that I think about it, I recall that Joegen had planned to support a method to re-load configuration files remotely. I am sure that he will respond about this in more detail.
Click to view ehernaez's profile   47 posts since
Aug 28, 2007
4. Mar 26, 2008 4:20 PM in response to: ehernaez
Re: Programaticaly Adding SIP Trunks and Routes
Also, there is no external file for the sip trunk configs.
Guest
6. Mar 26, 2008 10:55 PM in response to: brettnem
Re: [OpenSBC] Programaticaly Adding SIP Trunks and Routes
As of this current CVS version, there is now a capability to add PHP
pages to OpenSBC. This PHP extension will be allowed to have access to
all features and config parameters of OpenSBC including SIP Trunks. As
fot the initialization, OpenSBC reloads its configuration everytime a
parameter is changed. There are some parameters (like transport
listeners) which would require a restart to take effect, Such
parameters are marked properly as such if you read the comments. As
for SIP trunks, I am sure they are reinitialized after a changed.
However, you can't remove trunks or trunk accounts on the fly. A
restart is needed for this.

If you want to volunteer your time in developing a more robust web
interface for SIP Trunks, let me know.

Joegen

Brett Nemeroff wrote:

It seems like you'd have to have some method of having it re-read the file without restarting the process.. Wouldn't that drop all calls?!

Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Opensipstack-osbcdevel mailing list
Opensipstack-osbcdevel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensipstack-osbcdevel