< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate-users] Help - Facing problem to send sip message towards proxy


Hi,

 

I'm new to resiprocate. I'm trying to send an INVITE request from my linux machine. I'm able to generate a SIP message. But unable to forward to my proxy with the details filled in Route header. My requirement is to use resip but not dum as our application will handle session.

 

Here i'm attaching my code and output. Not sure whether i missed something.

 

Could someone please help probably with some sample references or examples.

 

We are using resiprocate-1.9.10.

 

Thanks & Regards,

LavanyaKumar S

 

INFO | 20170628-130827.595 | B2BServer | RESIP:DNS | 139900311959520 | 
DnsUtil.cxx:170 | local hostname does not contain a domain part 
vAsterisk-QA-01.hyd.sonetel.com
INFO | 20170628-130827.595 | B2BServer | RESIP:DNS | 139900311959520 | 
dns/AresDns.cxx:369 | DNS initialization: found  1 name servers
INFO | 20170628-130827.595 | B2BServer | RESIP:DNS | 139900311959520 | 
dns/AresDns.cxx:380 |  name server: 8.8.8.8
DEBUG | 20170628-130827.595 | B2BServer | RESIP | 139900311959520 | 
Compression.cxx:44 | COMPRESSION SUPPORT NOT COMPILED IN
DEBUG | 20170628-130827.595 | B2BServer | RESIP | 139900311959520 | 
Compression.cxx:47 | Compression configuration object created; algorithm = 0
DEBUG | 20170628-130827.595 | B2BServer | RESIP:TRANSPORT | 139900311959520 | 
TransportSelector.cxx:99 | No compression library available
DEBUG | 20170628-130827.596 | B2BServer | RESIP:TRANSPORT | 139900311959520 | 
InternalTransport.cxx:115 | Creating fd=24 V4/UDP
DEBUG | 20170628-130827.596 | B2BServer | RESIP:TRANSPORT | 139900311959520 | 
InternalTransport.cxx:123 | Binding to 0.0.0.0
INFO | 20170628-130827.596 | B2BServer | RESIP:TRANSPORT | 139900311959520 | 
UdpTransport.cxx:54 | Creating UDP transport host= port=5080 ipv4=1
DEBUG | 20170628-130827.596 | B2BServer | RESIP:TRANSPORT | 139900311959520 | 
UdpTransport.cxx:68 | No compression library available: Transport: [ V4 
0.0.0.0:5080 UDP target domain=unspecified mFlowKey=24 ]
DEBUG | 20170628-130827.596 | B2BServer | RESIP:DNS | 139900311959520 | 
DnsUtil.cxx:540 | Considering: lo -> 127.0.0.1 flags=0x49
DEBUG | 20170628-130827.596 | B2BServer | RESIP:DNS | 139900311959520 | 
DnsUtil.cxx:550 |   ignore because: interface is loopback
DEBUG | 20170628-130827.596 | B2BServer | RESIP:DNS | 139900311959520 | 
DnsUtil.cxx:540 | Considering: eth0 -> 10.10.30.111 flags=0x1043
DEBUG | 20170628-130827.596 | B2BServer | RESIP:DNS | 139900311959520 | 
DnsUtil.cxx:573 |   using this
DEBUG | 20170628-130827.596 | B2BServer | RESIP:DNS | 139900311959520 | 
DnsUtil.cxx:540 | Considering: eth1 -> 192.168.2.106 flags=0x1043
DEBUG | 20170628-130827.596 | B2BServer | RESIP:DNS | 139900311959520 | 
DnsUtil.cxx:573 |   using this
DEBUG | 20170628-130827.596 | B2BServer | RESIP | 139900311959520 | 
SipStack.cxx:479 | Adding domain alias: 127.0.0.1:5080
DEBUG | 20170628-130827.596 | B2BServer | RESIP | 139900311959520 | 
SipStack.cxx:479 | Adding domain alias: 192.168.2.106:5080
DEBUG | 20170628-130827.596 | B2BServer | RESIP | 139900311959520 | 
SipStack.cxx:479 | Adding domain alias: 10.10.30.111:5080
DEBUG | 20170628-130827.596 | B2BServer | RESIP:TRANSPORT | 139900311959520 | 
TransportSelector.cxx:238 | Adding transport: [ V4 0.0.0.0:5080 UDP target 
domain=unspecified mFlowKey=0 ]
DEBUG | 20170628-130827.596 | B2BServer | RESIP | 139900311959520 | 
SipStack.cxx:594 | SEND: SipReq:  INVITE 1.1.5695103.en-fe@192.168.2.106:5060 
tid=552be703184c4676 cseq=1 INVITE contact=fluffy@192.168.2.106:5060 / 1 
from(tu)
sent message
DEBUG | 20170628-130829.596 | B2BServer | RESIP:TRANSACTION | 139900311959520 | 
TimerQueue.cxx:50 | Adding timer: Timer B tid=552be703184c4676 ms=32000
DEBUG | 20170628-130829.596 | B2BServer | RESIP:TRANSPORT | 139900311959520 | 
TransportSelector.cxx:463 | Looking up dns entries (from route) for 
sip:10.10.30.113:30029
DEBUG | 20170628-130829.596 | B2BServer | RESIP:DNS | 139900311959520 | 
DnsResult.cxx:249 | DnsResult::lookup sip:10.10.30.113:30029
DEBUG | 20170628-130829.596 | B2BServer | RESIP:DNS | 139900311959520 | 
DnsResult.cxx:471 | Numeric result so return immediately: [ V4 
10.10.30.113:30029 UDP target domain=10.10.30.113 mFlowKey=0 ]
DEBUG | 20170628-130829.596 | B2BServer | RESIP:TRANSACTION | 139900311959520 | 
TimerQueue.cxx:50 | Adding timer: Timer A tid=552be703184c4676 ms=500
DEBUG | 20170628-130829.596 | B2BServer | RESIP:TRANSPORT | 139900311959520 | 
InternalTransport.cxx:115 | Creating fd=25 V4/UDP
DEBUG | 20170628-130829.596 | B2BServer | RESIP:TRANSPORT | 139900311959520 | 
TransportSelector.cxx:767 | Looked up source for destination: [ V4 
10.10.30.113:30029 UDP target domain=10.10.30.113 mFlowKey=0 ] -> [ V4 
10.10.30.111:0 UDP target domain=10.10.30.113 mFlowKey=0 ] sent-by= sent-port=0
DEBUG | 20170628-130829.596 | B2BServer | RESIP:TRANSPORT | 139900311959520 | 
TransportSelector.cxx:1178 | Transmitting to [ V4 10.10.30.113:30029 UDP target 
domain=10.10.30.113 mFlowKey=0 ] tlsDomain= via [ V4 10.10.30.111:5080 UDP 
target domain=10.10.30.113 mFlowKey=0 ]

INVITE sip:1.1.5695103.en-fe@192.168.2.106:5060 SIP/2.0
Via: SIP/2.0/UDP 
10.10.30.111:5080;branch=z9hG4bK-524287-1---552be703184c4676;rport
Max-Forwards: 70
Route: <sip:10.10.30.113:30029>
Contact: <sip:fluffy@192.168.2.106:5060>
To: "Test"<sip:1.1.5695103.en-fe@192.168.2.106:5060>
From: "Test"<sip:1.1.5695103.en-fe@192.168.2.106:2272>;tag=e1b4ee13
Call-ID: moz4iY_auEeJsX6a3wyj1w..
CSeq: 1 INVITE
Content-Length: 0

sigcomp id=
message processed
#include "rutil/GeneralCongestionManager.hxx"
#include "rutil/DnsUtil.hxx"
#include "rutil/Inserter.hxx"
#include "rutil/Logger.hxx"
#include "resip/stack/DeprecatedDialog.hxx"
#include "resip/stack/Helper.hxx"
#include "resip/stack/SipMessage.hxx"
#include "resip/stack/SipStack.hxx"
#include "resip/stack/StackThread.hxx"
#include "rutil/SelectInterruptor.hxx"
#include "resip/stack/TransportThread.hxx"
#include "resip/stack/InterruptableStackThread.hxx"
#include "resip/stack/EventStackThread.hxx"
#include "resip/stack/Uri.hxx"
#include "resip/stack/UnknownHeaderType.hxx"

#include "resip/stack/Transport.hxx"
#include "rutil/DataStream.hxx"
#include "rutil/Data.hxx"

int main()
{
    NameAddr target;
    target.displayName() = "Test";
    target.uri().user() = "1.1.5695103.en-fe";
    target.uri().host() = "192.168.2.106";
    target.uri().port() = 5060;

    NameAddr contact;
    contact.uri().user() = "fluffy";
    contact.uri().host() = "192.168.2.106";
    contact.uri().port() = 5060;

    NameAddr from = target;
    from.uri().port() = gPort + 1;

    SipMessage* message = NULL;
    message = Helper::makeRequest( target, from, contact, INVITE);

    NameAddr Routes;
    Routes.uri().host() = "10.10.30.113";
    Routes.uri().port() = 30029;

    message->header(h_Routes).push_back(Routes);


    SipStack *mStack = new SipStack();
    mStack->addTransport(UDP, 5080);

    resip::Data::size_type SL_Len = 2048;
    const char pscL_Data[2050]={0};
    Data encoded(pscL_Data, SL_Len);
    DataStream strm(encoded);
    message->encode(strm);
    strm.flush();

    mStack->send(*message);
    printf("sent message\n");

    mStack->buildFdSet(fdset);

    mStack->process(fdset);
    printf("message processed\n");      
}