Coder Social home page Coder Social logo

Add custom headers about sipnagios HOT 4 OPEN

gmaruzz avatar gmaruzz commented on May 30, 2024
Add custom headers

from sipnagios.

Comments (4)

gmaruzz avatar gmaruzz commented on May 30, 2024

yes, definitely a good idea!
I looked (superficially) into how to add headers and I was not able to find that in pjsip documentation.
So, probably there is not a "ready made" function for that in sipjs, and instead it needs some lower level programming
I'm not sure when I'll have time to look again into that, but patches are very welcome!

from sipnagios.

xaled1 avatar xaled1 commented on May 30, 2024

Hi,

I got it working adding following code in sipnagios.c
It's just a hack and it would be good if you could integrate it using some kind of parameters to the app.

static pj_status_t make_call(const pj_str_t *dst_uri)
{
...
status = pjsip_inv_invite(call->inv, &tdata);
PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);

pj_str_t hname = pj_str("P-Asserted-Identity");
pj_str_t hvalue = pj_str("sip:[email protected]");
pjsip_generic_string_hdr *gheader;

gheader = pjsip_generic_string_hdr_create(tdata->pool, &hname, &hvalue);
pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *) gheader);

from sipnagios.

gmaruzz avatar gmaruzz commented on May 30, 2024

would you please attach (as an attachment) the git diff ?

thanks a lot!!!

from sipnagios.

xaled1 avatar xaled1 commented on May 30, 2024

Here
sipnagios.txt

from sipnagios.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.