Re: [reSIProcate-users] problems adding a decorator to change Via Headers for STUN
I remember there was snippet on resiprocate wiki.
But here is another snippet from existing code:
#ifdef MODIFY_VIA_BEHIND_NAT
if (msg.header(resip::h_Vias).size() > 0)
{
resip::Via& via = msg.header(resip::h_Vias).front();
mViaHost = via.sentHost();
mViaPort = via.sentPort();
via.sentHost() = resip::Data(account->mExternalAddress.ip());
via.sentPort() = account->mExternalAddress.port();
}
#endif
On Wed, Jan 11, 2017 at 8:57 PM, Francesco Lamonica
<alienpenguin@xxxxxxxxx> wrote:
> Hello all,
> as per subject i am trying to add a message decorator (as suggested in the
> docs) to the user profile in order to change the Via header of my invite
> message in order to cope with STUN.
> My problem is that i did not understand how to do so,
> when i create the decorator and get the message then in the method
> decorateMessage()
> i get the Via Header with:
> Via v = msg.header(h_Via).front()
>
> however with that class how do i change the host and port values? i can only
> see getters for those members.
>
> best regards
>
> P.S. sorry if question is dumb but i am still new with resiprocate and dum.
>
> thanks
>
> _______________________________________________
> resiprocate-users mailing list
> resiprocate-users@xxxxxxxxxxxxxxx
> List Archive: http://list.resiprocate.org/archive/resiprocate-users/