Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8667345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:56:33+00:00 2026-06-12T17:56:33+00:00

I need to make a SIP proxy implementation in C++ using Resiprocate SIP stack.

  • 0

I need to make a SIP proxy implementation in C++ using Resiprocate SIP stack. The proxy must always sit in between UACs and UAS and simply forward incoming SIP requests and responses bidirectionally.

According to my readings/understanding on SIP protocol, if a SIP proxy wants to sit in between an UAC and an UAS, it has to inject its SIP address into the route field of the SIP messages it is receiving. Can anyone tell me how I can add/manupulate the route field in the incoming SIP messages in my proxy implementation? More precisely what I need to know is to which header files/classes/handle functions I should refer? I am kinda new to SIP and resiprocate and got lost in a way in its source code. Thanks in advance.

P.S: One can wonder why I don’t use resiprocate’s own proxy implementation. This is because I need to develop a lightweight prototype for a special need simply by using the SIP stack API itself. The prototype should simply act as a forwarder in the SIP traffic, nothing more than that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:56:34+00:00Added an answer on June 12, 2026 at 5:56 pm

    Following does the job in the else block.

      void insertRouteField(SipMessage * received)
            {
              ErrLog ( << "***********************************\n");
              NameAddr& to = received->header(h_To);
              ErrLog ( << "To Field: " << to.uri().toString());
    
              NameAddr& from = received->header(h_From);
              ErrLog ( << "From Field: " << from.uri().toString() );
    
              ParserContainer<NameAddr>& rRoutes = received->header(h_RecordRoutes);
              if(!rRoutes.empty())
              {
                  NameAddr& frontRRoute = rRoutes.front();
                  ErrLog ( << "rRoutes: " << frontRRoute.uri().toString());
    
                  ErrLog ( << "***********************************\n");
              }
              else
              {
                  NameAddr route;
                  route.uri().scheme() = "sip";
                  route.uri().user() = "proxy";
                  route.uri().host() = SipStack::getHostname();
                  route.uri().port() = 5070;
                  route.uri().param(p_transport) = Tuple::toData(mTransport);
                  rRoutes.push_front(route);
    
                  NameAddr& frontRRoute = rRoutes.front();
                  ErrLog ( << "rRoute: " << frontRRoute.uri().toString());
                  ErrLog ( << "***********************************");
              } 
    
            }
    

    Header filers you might wanna look at:
    “resip/stack/Helper.hxx”
    “resip/stack/SipMessage.hxx”
    “resip/stack/Uri.hxx”
    “resip/stack/SipStack.hxx”
    “rutil/Logger.hxx”
    “rutil/ThreadIf.hxx”
    “resip/stack/ParserContainer.hxx”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need make layout that must look exactly like below 2 sites. How should
I need make some action (dump statistical data) before the Dart program ends. The
I need make all of my posts update. I use bulk upload for store,
Need to make certain Ruby strings in my program to be immutable. What is
I need to make a administrative GUI with lots of functionality like lists, forms,
I need to make a moderate system like the one in fmylife.com. Basically the
I need to make a point in time branch, when we release a new
I need to make efficient d-dimensional points searching and also make efficient k-NN queries
I need to make a series (1-20) ajax calls and I need to have
I need to make a QT app to run on the startup of an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.