On Thu, Sep 18, 2008 at 1:32 PM, Mark Webster <mark.webster+pjsip at gmail.com<mark.webster%2Bpjsip at gmail.com> > wrote: > Just an update to this issue: If I specify the *a_name* of the bind > address in *pjsip_udp_transport_start*, then the Via: header reflects this > correctly, but the SDP still advertises the IP of first interface for > RTP/RTCP (even though I'm not bound to it). > > The SIP and RTP/media transports are different objects, so you'd need to also configure the media transport so that it advertises the appropriate address. > To clarify, the interfaces are on different subnets and the INVITEd party > can't reach my first interface. > > I'm sure I probably need to be doing something different after creating the > dialog, like *pjsip_dlg_set_transport*, but I can't quite work out how to > do that. When I use *pjsip_dlg_set_transport* to set the transport to the > one returned by *pjmedia_transport_udp_create*, it seems to invalidate the > dialog (although no error is returned). > > What am I missing? > > The pjsip_xxx_set_transport() is indeed the function that you're looking for to force a request/transaction/dialog to use a particular transport. But you're passing a media transport there to pjsip_dlg_set_transport(), while the function is expecting a SIP transport instead. Cheers Benny > > On Thu, Sep 18, 2008 at 2:25 AM, Mark Webster < > mark.webster+pjsip at gmail.com <mark.webster%2Bpjsip at gmail.com>> wrote: > >> Hello again PJSIP people, forgive me if this has already been properly >> discussed or documented elsewhere, but I have searched and not found the >> answer. >> >> My app is running on a linux box with multiple interfaces. I'm not using >> PJSUA, rather just the base PJSIP/MEDIA/etc functions. >> >> What happens is during a SIP dialog, the SDP address and Via: fields are >> always automatically populated with the IP of the first interface. However, >> I am binding to another interface in *pjsip_udp_transport_start*. >> >> Ultimately I will be bridging calls across multiple interfaces, and I need >> a way of directly controlling the IP in the SDP and Via fields for each >> invite dialog. >> >> Could you point me to documentation or a quick example which explains how >> to do this? >> >> Thanks in advance. >> Mark >> > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080922/64c7a41f/attachment.html