< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] Register multiple To: within the same UA


makeRegistration with a separate UserProfile is exactly what I am doing:
 
-----
resip::SharedPtr<resip::UserProfile> newUserProfile(new resip::UserProfile());
 
// Set the outbound proxy to the new user profile
newUserProfile->setOutboundProxy(url.uri());

resip::SharedPtr<resip::SipMessage> sipMessage = dum.makeRegistration(
  to,
  newUserProfile,
  new ResipAppDialogSet(*this, dum, strUuid.c_str()));


// Modify the Request-Uri header
resip::RequestLine rLine = sipMessage->header(resip::H_RequestLine::sGet());
rLine.uri() = url.uri();
sipMessage->header(resip::H_RequestLine::sGet()) = rLine;

 
// Remove the existing Contact header
sipMessage->header(resip::H_Contacts::sGet()).clear();
  
// Add the Contact header received in parameter
for (size_t i = 0; i < vContact.size(); ++i) {
  sipMessage->header(resip::H_Contacts::sGet()).push_back(vContact[i]);
}

 
dum.send(sipMessage);
-----

When a trace the code I can see that the object DialogSet::mClientRegistration are different for both registrations. But the ClientRegistrationHandle passed to ClientRegistrationHandler::onSuccess(...) is always the same.
 
I validated that the registration messages were good by looking at them with wire shark.
 
Francis


Subject: RE: [reSIProcate-users] Register multiple To: within the same UA
Date: Mon, 19 Nov 2007 12:08:55 -0500
From: slgodin@xxxxxxxxxxxx
To: francis_moreau@xxxxxxxxxxx; resiprocate-users@xxxxxxxxxxxxxxx

You are probably not creating the registrations properly.

 

You should be calling makeRegistration for each user and passing in a separate UserProfile object for each call.

 

Scott

 

From: resiprocate-users-bounces@xxxxxxxxxxxxxxx [mailto:resiprocate-users-bounces@xxxxxxxxxxxxxxx] On Behalf Of Francis Moreau
Sent: Monday, November 19, 2007 11:55 AM
To: resiprocate-users@xxxxxxxxxxxxxxx
Subject: [reSIProcate-users] Register multiple To: within the same UA

 

Hello all,
 
I am using resiprocate with dum to build a UA acting as a parking UA. This means I need to register different To: header with Contact: header pointing on my parking UA:
 
REGISTER sip:registrar:5060
Contact: <sip:user111@parking_ua:5077>
To: <sip:user111@xxxxxxxxxxxxx:5060>
 
REGISTER sip:registrar:5060
Contact: <sip:user222@parking_ua:5077>
To: <sip:user222@xxxxxxxxxxxxx:5060>
 
The problem I have now it's when I received callback from dum on ClientRegistrationHandler::onSuccess(ClientRegistrationHandle h, SipMessage msg) the ClientRegistrationHandle in parameter is the same for both REGISTER messages. This is problematic since I don't know on which binding function as ClientRegistrationHandle.addBinding() is applied to.
 
Is there something I could configure that will create a different ClientRegistrationHandle for each different registration done?
 
Thanks,
Francis
 


R U Ready for Windows Live Messenger Beta 8.5? Try it today!



Express yourself with free Messenger emoticons. Get them today!