Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On call action custom X-Headers are not being added #43

Open
igorolhovskiy opened this issue Jun 1, 2023 · 1 comment
Open

On call action custom X-Headers are not being added #43

igorolhovskiy opened this issue Jun 1, 2023 · 1 comment

Comments

@igorolhovskiy
Copy link
Collaborator

When I specify custom headers on call action (via x_header section), they are not being added to initial INVITE.
On register action all working as expected.

P.S: I spent some time on it, but no luck yet.

@igorolhovskiy
Copy link
Collaborator Author

igorolhovskiy commented Jun 1, 2023

For whatever reason method is not working.

For the moment in method added the following after line 208:

	// Adding custom headers
	for (SipHeader sip_header : prm.txOption.headers) {
		LOG(logINFO) <<__FUNCTION__<<": Adding custom header " << sip_header.hName << " = " << sip_header.hValue;

		pjsip_generic_string_hdr x_header;
		pj_str_t hname = str2Pj(sip_header.hName);
		pj_str_t hvalue = str2Pj(sip_header.hValue);
		pjsip_generic_string_hdr_init2(&x_header, &hname, &hvalue);
		pj_list_push_back(&param.msg_data.hdr_list, &x_header);
	}

Will make more tests and let you know, maybe missed something, but tested with all code versions.

P.S.: Code example is taken from here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant