Re: [reSIProcate-users] b2bua library
I'm still meaning to provide a clean sample for running the b2bua one
day - for now, I'll throw in a few code snippets
Basically, a real B2BUA built on this lib just needs to
- extend the B2BUA class (sample below)
- set up a lot of the other objects (e.g. the RtpProxyUtil stuff, the
client and server auth managers)
- provide a concrete instance of the B2BCallManager class to perform the
routing logic (e.g. it could look up a routing table for each call,
apply prepaid rules, etc)
Here is a cut and paste of some of the initialisation code from a
working project:
MyResiproB2BUA::MyResiproB2BUA(... various args ...) : B2BUA(NULL,
cdrHandler), myB2BUAManager(localIp, authServer) {
RtpProxyUtil::setSocket(rtpProxySocket);
RtpProxyUtil::setTimeoutSocket(rtpProxyTimeoutSocket);
RtpProxyUtil::init();
uasMasterProfile.get()->setFixedTransportInterface(localIp);
uasMasterProfile.get()->setFixedTransportPort(sipPort);
setAuthorizationManager( whatever );
dialogUsageManager->addDomain(challengeDomain);
dialogUsageManager->addDomain(localIp);
auto_ptr<ClientAuthManager> clientAuth(new ClientAuthManager);
dialogUsageManager->setClientAuthManager(clientAuth);
SharedPtr<ServerAuthManager> serverAuth(new
MyServerAuthManager(*dialogUsageManager));
dialogUsageManager->setServerAuthManager(serverAuth);
SERNonceHelper *nonceHelper = new SERNonceHelper(300);
nonceHelper->setPrivateKey("xxxxxxx");
Helper::setNonceHelper(nonceHelper);
// Specify the transport we would like to use
dialogUsageManager->addTransport(UDP, sipPort, V4, localIp);
MediaManager::setProxyAddress(localIp);
// For compatibility with Cisco and Nextone
Uri::setUriUserEncoding('#', false);
RtpProxyUtil::init();
taskManager->addRecurringTask(new RtpProxyRecurringTask());
On 02/08/10 16:23, Scott Godin wrote:
> The B2BUA project was contributed to the resiprocate repository by an
> individual that I haven't seen around in a while. The only documentation
> that exists is the readme.txt file in the project folder of the SVN
> repository... it's not much.
>
> Scott
>
> 2010/8/2 Carlos José Mazieri <cmazieri@xxxxxxxxxxxxxx>
>
>>
>> Hello guys,
>>
>> I downloaded reciprocate 1.6 and compiled it on a Ubuntu Linux.
>>
>> There is module b2bua which generates the library libb2bua.so, regarding
>> this library, I have questions:
>>
>> 1. Is there any documentation about that? (I mean how to use it)
>>
>> 2. Is there any application that tests it?
>>
>>
>> Best Regards,
>> Carlos
>>
>> _______________________________________________
>> resiprocate-users mailing list
>> resiprocate-users@xxxxxxxxxxxxxxx
>> List Archive: http://list.resiprocate.org/archive/resiprocate-users/
>>
>
>
>
> _______________________________________________
> resiprocate-users mailing list
> resiprocate-users@xxxxxxxxxxxxxxx
> List Archive: http://list.resiprocate.org/archive/resiprocate-users/