< Previous by Date | Date Index | Next by Date > |
< Previous in Thread | Thread Index | Next in Thread > |
Hi Scott,
The trace at STACK level is in the enclosed file
"TCP_INVITE_Log".
The section of the code is :
const char *SIP_TRANSPORT = "tcp";
SipStack* g_sipStack;
g_sipStack = new
SipStack();
g_sipStack->addTransport(TCP, g_sipPort); g_sipStack->addTransport(UDP, g_sipPort); NameAddr dest; dest.uri().scheme() = "sip"; dest.uri().user() = pData->dnis; dest.uri().host() = pData->toHost; dest.uri().port() = pData->toPort; dest.param(p_transport) = SIP_TRANSPORT; NameAddr contact;
contact.uri().scheme() = "sip"; contact.uri().user() = pData->ani; contact.uri().host() = g_IPAddress; contact.uri().port() = g_sipPort; contact.param(p_transport) = SIP_TRANSPORT; NameAddr from =
dest;
from.uri().port() = g_sipPort; from.uri().user() = pData->ani; from.uri().host() = g_IPAddress; from.param(p_transport) = SIP_TRANSPORT;
SharedPtr<SipMessage> message(Helper::makeInvite( dest, from,
contact));
Mehul.
From: Scott Godin [mailto:slgodin@xxxxxxxxxxxx] Sent: Friday, October 21, 2005 6:01 AM To: Mehul Jain; resiprocate-devel@xxxxxxxxxxxxxxxxxxx Subject: RE: [reSIProcate] Sending INVITE over TCP This should work.
Can you provide a code sample and a trace at STACK
level? From:
resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Mehul Jain I am trying to use the
resiprocate stack to send INVITE's over TCP. The transport type is
determined on the basis of the value set in the Request-URI. The
default transport is scheme dependent. For sip:, it is UDP. For sips:, it is
TCP. Im using sip, so need to explicitly set transport=TCP in the
request-uri. The steps Ive followed
are : a.
Add TCP transport to the stack.
g_sipStack->addTransport(TCP, g_sipPort); b.
Use TCP as the transport type in the required headers (To, From,
Contact) c. I
ve used Helper::makeInvite to build the
INVITE.
Helper::makeInvite( dest, from, contact) The stack still tries
to send the message via UDP. Debugging --------------- *
Helper::MakeInvite uses Helper::MakeRequest in which the RequestLine is
determined using the target.uri. *
When I send the message, the TransportSelector calls "mDns.lookup(result,
msg->header(h_RequestLine).uri());" that further calls "DnsResult::lookup"
which returns UDP since the condition "if (uri.exists(p_transport))" in that
member function evaluates to false and it therefore uses the default type of
UDP. I can send the sample
code as well. Any pointers as to what Im
missing. The log output is as
follows : DEBUG | 20051020-143206.511
| UAC | RESIP:TRANSPORT | 6124 | ConnectionBase.cxx:29 |
ConnectionBase::ConnectionBase, no params: 00FD7E08 Thanks, Mehul. |
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Courier New;}} {\*\generator Msftedit 5.41.21.2500;}\viewkind4\uc1\pard\lang1033\f0\fs20\par DEBUG | 20051021-095246.386 | UAC | RESIP:TRANSPORT | 4360 | ConnectionBase.cxx:29 | ConnectionBase::ConnectionBase, no params: 00FC8420\par \b DEBUG | 20051021-095246.402 | UAC | RESIP:TRANSPORT | 4360 | InternalTransport.cxx:85 | Creating fd=1760 V4/TCP\par \b0 DEBUG | 20051021-095246.402 | UAC | RESIP:TRANSPORT | 4360 | InternalTransport.cxx:93 | Binding to 0.0.0.0\par \b INFO | 20051021-095246.465 | UAC | RESIP:TRANSPORT | 4360 | TcpTransport.cxx:27 | Creating TCP transport host= port=5060 ipv4=1\par \b0 INFO | 20051021-095246.465 | UAC | RESIP:TRANSPORT | 4360 | UdpTransport.cxx:30 | Creating UDP transport host= port=5060 ipv4=1\par DEBUG | 20051021-095246.480 | UAC | RESIP:TRANSPORT | 4360 | InternalTransport.cxx:85 | Creating fd=1740 V4/UDP\par DEBUG | 20051021-095246.480 | UAC | RESIP:TRANSPORT | 4360 | InternalTransport.cxx:93 | Binding to 0.0.0.0\par DEBUG | 20051021-095257.386 | UAC | RESIP | 5144 | SipStack.cxx:267 | SEND: SipReq: INVITE 8665722037@xxxxxxxxxx:5060 tid=9260a5398c508c25 cseq=INVITE contact=0@xxxxxxxxxxx:5060 / 1 from(tu)\par STACK | 20051021-095257.418 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:191 | No matching transaction for SipReq: INVITE 8665722037@xxxxxxxxxx:5060 tid=9260a5398c508c25 cseq=INVITE contact=0@xxxxxxxxxxx:5060 / 1 from(tu)\par STACK | 20051021-095257.433 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:45 | Creating new TransactionState: tid=9260a5398c508c25 [ ClientInvite/Calling reliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]]\par STACK | 20051021-095257.449 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:571 | TransactionState::processClientInvite: SipReq: INVITE 8665722037@xxxxxxxxxx:5060 tid=9260a5398c508c25 cseq=INVITE contact=0@xxxxxxxxxxx:5060 / 1 from(tu) tid=9260a5398c508c25 [ ClientInvite/Calling reliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]]\par DEBUG | 20051021-095257.465 | UAC | RESIP:TRANSACTION | 4360 | TimerQueue.cxx:85 | Adding timer: Timer B tid=9260a5398c508c25 ms=32000\par STACK | 20051021-095257.465 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:1483 | sendToWire with no dns result: tid=9260a5398c508c25 [ ClientInvite/Calling reliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]]\par \b DEBUG | 20051021-095257.480 | UAC | RESIP:TRANSPORT | 4360 | TransportSelector.cxx:243 | Looking up dns entries for sip:8665722037@xxxxxxxxxx:5060\par DEBUG | 20051021-095257.480 | UAC | RESIP:DNS | 4360 | DnsResult.cxx:183 | DnsResult::lookup sip:8665722037@xxxxxxxxxx:5060\par DEBUG | 20051021-095257.480 | UAC | RESIP:DNS | 4360 | DnsResult.cxx:291 | Numeric result so return immediately: [ V4 10.10.1.14:5060 UDP connectionId=0 ]\par \b0 STACK | 20051021-095257.496 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:1322 | tid=9260a5398c508c25 [ ClientInvite/Calling reliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]] got DNS result: 10.10.1.14 --> [[ V4 10.10.1.14:5060 UDP connectionId=0 ]]\par STACK | 20051021-095257.496 | UAC | RESIP:DNS | 4360 | DnsResult.cxx:140 | Returning next dns entry: [ V4 10.10.1.14:5060 UDP connectionId=0 ]\par STACK | 20051021-095257.511 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:1365 | Unreliable transport: tid=9260a5398c508c25 [ ClientInvite/Calling unreliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]]\par DEBUG | 20051021-095257.511 | UAC | RESIP:TRANSACTION | 4360 | TimerQueue.cxx:85 | Adding timer: Timer A tid=9260a5398c508c25 ms=500\par DEBUG | 20051021-095257.527 | UAC | RESIP:TRANSPORT | 4360 | TransportSelector.cxx:479 | Looked up source for destination: [ V4 10.10.1.14:5060 UDP connectionId=0 ] -> [ V4 10.10.1.151:5060 UDP connectionId=0 ] sent-by= sent-port=5060\par DEBUG | 20051021-095257.527 | UAC | RESIP:TRANSPORT | 4360 | TransportSelector.cxx:701 | findTransport([ V4 10.10.1.151:5060 UDP connectionId=0 ])\par DEBUG | 20051021-095257.543 | UAC | RESIP:TRANSPORT | 4360 | TransportSelector.cxx:720 | findTransport (any interface) => Transport: [ V4 0.0.0.0:5060 UDP connectionId=0 ]\par DEBUG | 20051021-095257.543 | UAC | RESIP:TRANSPORT | 4360 | TransportSelector.cxx:619 | Transmitting to [ V4 10.10.1.14:5060 UDP received on: Transport: [ V4 0.0.0.0:5060 UDP connectionId=0 ] connectionId=0 ] via [ V4 10.10.1.151:5060 UDP connectionId=0 ]INVITE sip:8665722037@xxxxxxxxxx:5060 SIP/2.0\par Via: SIP/2.0/tcp 10.10.1.151:5060;branch=z9hG4bK-d87543-9260a5398c508c25-1--d87543-;rport\par Max-Forwards: 70\par Contact: <sip:0@xxxxxxxxxxx:5060>;transport=tcp\par To: <sip:8665722037@xxxxxxxxxx:5060>;transport=tcp\par From: <sip:0@xxxxxxxxxxx:5060>;transport=tcp;tag=81727346\par Call-ID: 0576d66f4400e120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\par CSeq: 1 INVITE\par Content-Type: application/sdp\par Content-Length: 185\par \par v=0\par o=- 0 0 IN IP4 10.10.1.151\par s=B2BUA\par c=IN IP4 10.10.1.151\par t=0 0\par m=audio 5110 RTP/AVP 0 101\par a=fmtp:101 0-15\par a=rtpmap:0 pcmu/8000\par a=rtpmap:101 telephone-event/8000\par a=sendrecv\par \par DEBUG | 20051021-095257.590 | UAC | RESIP:TRANSPORT | 4360 | Transport.cxx:161 | Adding message to tx buffer to: [ V4 10.10.1.14:5060 UDP received on: Transport: [ V4 0.0.0.0:5060 UDP connectionId=0 ] connectionId=0 ]\par STACK | 20051021-095257.590 | UAC | RESIP:DNS | 4360 | DnsResult.cxx:369 | Priming []\par INFO | 20051021-095257.605 | UAC | RESIP:TRANSPORT | 4360 | Transport.cxx:133 | Connection reset\par STACK | 20051021-095258.027 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:156 | Found matching transaction for Timer: Timer A 500 -> tid=9260a5398c508c25 [ ClientInvite/Calling unreliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]]\par STACK | 20051021-095258.058 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:571 | TransactionState::processClientInvite: Timer: Timer A 500 tid=9260a5398c508c25 [ ClientInvite/Calling unreliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]]\par STACK | 20051021-095258.074 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:714 | timer fired: TimerMessage TransactionId[9260a5398c508c25] Type[Timer A] duration[500]\par DEBUG | 20051021-095258.090 | UAC | RESIP:TRANSACTION | 4360 | TimerQueue.cxx:85 | Adding timer: Timer A tid=9260a5398c508c25 ms=1000\par INFO | 20051021-095258.105 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:725 | Retransmitting INVITE: SipReq: INVITE 8665722037@xxxxxxxxxx:5060 tid=9260a5398c508c25 cseq=INVITE contact=0@xxxxxxxxxxx:5060 / 1 from(tu)\par DEBUG | 20051021-095258.121 | UAC | RESIP:TRANSPORT | 4360 | Transport.cxx:161 | Adding message to tx buffer to: [ V4 10.10.1.14:5060 UDP received on: Transport: [ V4 0.0.0.0:5060 UDP connectionId=0 ] connectionId=0 ]\par INFO | 20051021-095258.136 | UAC | RESIP:TRANSPORT | 4360 | Transport.cxx:133 | Connection reset\par STACK | 20051021-095259.090 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:156 | Found matching transaction for Timer: Timer A 1000 -> tid=9260a5398c508c25 [ ClientInvite/Calling unreliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]]\par STACK | 20051021-095259.105 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:571 | TransactionState::processClientInvite: Timer: Timer A 1000 tid=9260a5398c508c25 [ ClientInvite/Calling unreliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]]\par STACK | 20051021-095259.136 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:714 | timer fired: TimerMessage TransactionId[9260a5398c508c25] Type[Timer A] duration[1000]\par DEBUG | 20051021-095259.152 | UAC | RESIP:TRANSACTION | 4360 | TimerQueue.cxx:85 | Adding timer: Timer A tid=9260a5398c508c25 ms=2000\par INFO | 20051021-095259.168 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:725 | Retransmitting INVITE: SipReq: INVITE 8665722037@xxxxxxxxxx:5060 tid=9260a5398c508c25 cseq=INVITE contact=0@xxxxxxxxxxx:5060 / 1 from(tu)\par DEBUG | 20051021-095259.183 | UAC | RESIP:TRANSPORT | 4360 | Transport.cxx:161 | Adding message to tx buffer to: [ V4 10.10.1.14:5060 UDP received on: Transport: [ V4 0.0.0.0:5060 UDP connectionId=0 ] connectionId=0 ]\par INFO | 20051021-095259.199 | UAC | RESIP:TRANSPORT | 4360 | Transport.cxx:133 | Connection reset\par STACK | 20051021-095301.168 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:156 | Found matching transaction for Timer: Timer A 2000 -> tid=9260a5398c508c25 [ ClientInvite/Calling unreliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]]\par STACK | 20051021-095301.183 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:571 | TransactionState::processClientInvite: Timer: Timer A 2000 tid=9260a5398c508c25 [ ClientInvite/Calling unreliable target=[ V4 0.0.0.0:0 UNKNOWN_TRANSPORT connectionId=0 ]]\par STACK | 20051021-095301.199 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:714 | timer fired: TimerMessage TransactionId[9260a5398c508c25] Type[Timer A] duration[2000]\par DEBUG | 20051021-095301.215 | UAC | RESIP:TRANSACTION | 4360 | TimerQueue.cxx:85 | Adding timer: Timer A tid=9260a5398c508c25 ms=4000\par INFO | 20051021-095301.230 | UAC | RESIP:TRANSACTION | 4360 | TransactionState.cxx:725 | Retransmitting INVITE: SipReq: INVITE 8665722037@xxxxxxxxxx:5060 tid=9260a5398c508c25 cseq=INVITE contact=0@xxxxxxxxxxx:5060 / 1 from(tu)\par DEBUG | 20051021-095301.246 | UAC | RESIP:TRANSPORT | 4360 | Transport.cxx:161 | Adding message to tx buffer to: [ V4 10.10.1.14:5060 UDP received on: Transport: [ V4 0.0.0.0:5060 UDP connectionId=0 ] connectionId=0 ]\par INFO | 20051021-095301.277 | UAC | RESIP:TRANSPORT | 4360 | Transport.cxx:133 | Connection reset\par S\par }