Re:[reSIProcate] handling an INVITE with no/incorrect port in the
> From: "Justin Matthews" <jmatthewsr@xxxxxxxxx>
> To: <resiprocate-devel@xxxxxxxxxxxxxxxxxxx>
> Date: Wed, 14 Dec 2005 20:35:21 -0500
> Subject: [reSIProcate] handling an INVITE with no/incorrect port in the
> request-uri
> Hello,
> I am looking for some advice on handling the following situation:
> my resip/dum app is set to listen on some port other than 5060 and receives
> an INVITE with a request-uri that does not designate the port (ie user@host
> instead of user@host:port), yet the packet is sent to the proper port.
> Because the packet is sent to the proper port the message propagates
> successfully through resip/dum. The local contact in the dialog is set to
> the request-uri (with no port), so when I send back a 200, the contact does
> not contain the port and the ACK is sent to 5060 instead of my listening
> port.
>
> Is there any other way, for example to set the contact using AppDialog, to
> fix it outright?
In onNewSession you can call pSIS->getAppDialog()->getContact(), which
gives you a reference to what the stack is going to use as the contact
for the session. From the comments I believe you're allowed to modify
it to taste in onNewSession. I've done so (in slightly different
circumstances) and it seems to work fine.
- Alan