< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index | Next in Thread > |
Best regards, Byron Campen
Hi All I've found something in reSIP that confuses me. I have a SIP client using the DialogUsageManager. I am trying to useaddTransport() to specify that it should connect via UDP and/or TCP and Idon't particularly care what port it should connect from (of course, I would prefer an ephemeral port). The prototype forSipStack::addTransport() implies I should be able to omit the port and use a default of 0, however the implementation of this function immediatelyasserts that the port should be greater than 0. From what I have seen, reSIP just calls bind() with a normal sockaddr structure.From this I would assume I can allow it to select a port for me, using aport of 0, although the assertion implies I should not. I would prefer not to select my own ephemeral port so I do not have to handle any collisionswith in-use ports.Am I using the DUM correctly by trying to add the desired transport witha default port of 0? Is there any reason I should NOT specify port 0? The relevant code snippets are below Thanks Brad My client: dum.addTransport(resip::UDP, 12345, resip::V4); // always uses local/client port of 12345 (BAD!) dum.addTransport(resip::UDP, 0, resip::V4); // assertion failure (port > 0) dum.addTransport(resip::UDP); // assertion failure (port > 0) resip/stack/SipStack.hxx: Transport* addTransport( TransportType protocol, int port=0,. IpVersion version=V4, StunSetting stun=StunDisabled, const Data& ipInterface = Data::Empty,.const Data& sipDomainname = Data::Empty, // onlyused// f orTLS// b asedstuff.const Data& privateKeyPassPhrase = Data::Empty,SecurityTypes::SSLType sslType = SecurityTypes::TLSv1); resip/stackSipStack.cxx: SipStack::addTransport( TransportType protocol, int port,. IpVersion version, StunSetting stun, const Data& ipInterface,. const Data& sipDomainname, const Data& privateKeyPassPhrase, SecurityTypes::SSLType sslType) { assert(!mShuttingDown); assert( port > 0 ); ... } _______________________________________________ resiprocate-devel mailing list resiprocate-devel@xxxxxxxxxxxxxxxxxxxx https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
Attachment:
smime.p7s
Description: S/MIME cryptographic signature