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

RE: [reSIProcate] RE: Multiple Concurrent Dialogs


Looks like mHasOverrideHostPort was defaulted to true for some reason in the
constructor.  I've checked in a fix for that.

Note also that in the SVN head the Profile object has been changed so that
many of the Profile settings have defaults now.  Therefore re-adding any of
the default supported methods/languages/etc is not necessarily.  BasicCall
has been updated to reflect this.  If you want to ensure all of the settings
you want are enabled and not rely on the defaults, then you should use the
clearSupportedxxxx methods before adding.

-----Original Message-----
From: Swavek Skret [mailto:SSkret@xxxxxxxxxxxxxx] 
Sent: Thursday, November 11, 2004 5:11 PM
To: Jason Fischl; resiprocate
Subject: [reSIProcate] RE: Multiple Concurrent Dialogs

Jason,

Here is how I set the profile, following the BasicCall.cxx example:

        Profile uacProfile;
        auto_ptr<ClientAuthManager> uacAuth(new
ClientAuthManager(uacProfile));
        _DumUac->setProfile(&uacProfile);
        _DumUac->setClientAuthManager(uacAuth);

        _DumUac->setInviteSessionHandler(this);
        _DumUac->addOutOfDialogHandler(OPTIONS, this);

        NameAddr uacAor("sip:UAC@xxxxxxxxx:12005");

        _DumUac->getProfile()->setDefaultFrom(uacAor);
        _DumUac->getProfile()->addSupportedLanguage(Token("en"));
        _DumUac->getProfile()->addSupportedMimeType(Mime("application",
"sdp"));
        _DumUac->getProfile()->addSupportedMethod(INVITE);
        _DumUac->getProfile()->addSupportedMethod(ACK);
        _DumUac->getProfile()->addSupportedMethod(CANCEL);
        _DumUac->getProfile()->addSupportedMethod(OPTIONS);
        _DumUac->getProfile()->addSupportedMethod(BYE);


If it comes to override host and port I am not sure what it is either. I
just stumbled into it since I got an access violation there.

Thanks,

Swavek 

-----Original Message-----
From: Jason Fischl [mailto:jason@xxxxxxxxxxxxxx] 
Sent: Thursday, November 11, 2004 2:56 PM
To: Swavek Skret; resiprocate
Subject: Re: Multiple Concurrent Dialogs

Swavek forwarded me this question and said it was ok to post to this
list. Does anybody have any ideas what is going on here?

A few questions:

- Did you set up a profile and set it in the dum object?
- I'm not familiar with this override host and port. What is it?


Swavek Skret wrote:
> Jason,
> 
> I am running into a problem while using DialogUserManager. I want to 
> have a user agent client that has a few different dialogs going on.
> Within a single dialog, I would like to send an invite out, get a 3xx 
> response, and send out another invite. I do not need to send a 
> registration out. Looks simple. Yet, when I run my program, I am 
> getting an error when calling:
> 
> SipMessage msg = _DumUac->makeInviteSession(from, to, req->getSdp());
> 
> Here is the sequence of calls that get executed:
> 
> 1. DialogUserManager::makeInviteSession()
> BaseCreator* bc = new InviteSessionCreator(*this, target, from, 
> initialOffer);
> 
> 2. InviteSessionCreator::InviteSessionCreator()
> makeInitialRequest(target, from, INVITE);
> 
> 3. BaseCreator::makeInitialRequest()
>    ...
>    ...
>       if (mDum.getProfile()->hasOverrideHostAndPort())
>       {
>          contact.uri() = mDum.getProfile()->getOverideHostAndPort();  
> // ACCESS VIOLATION!!!!!
>       }
> 
> 
> It seems to me that I am getting the access violation because the
> hasOverrideHostAndPort() always returns true. Please look at the code.
> However, maybe I should not have fallen into this block of code and 
> should execute the initial if block:
> 
>    if (mDum.getProfile()->hasGruu(target.uri().getAor()))
>    {
>       contact = mDum.getProfile()->getGruu(target.uri().getAor());  //

> MAYBE I SHOULD BE HERE...
>       mLastRequest.header(h_Contacts).push_front(contact);
>    }
>    else
>    {
>       if (mDum.getProfile()->hasOverrideHostAndPort())
>       {
>          contact.uri() = mDum.getProfile()->getOverideHostAndPort();
>       }
>       contact.uri().user() = from.uri().user();      
>       mLastRequest.header(h_Contacts).push_front(contact);
>    }
> 
> which would point into some other problem in my code or the 
> configuration. Could you please comment?
> 



_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxx
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel