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

B2B module ignores compact contact-type header (c) #403

Closed
bbuitenhuis opened this issue Jan 15, 2015 · 8 comments
Closed

B2B module ignores compact contact-type header (c) #403

bbuitenhuis opened this issue Jan 15, 2015 · 8 comments
Assignees
Labels
Milestone

Comments

@bbuitenhuis
Copy link
Contributor

the b2b modules adds an new header:
Content-Type: application/sdp

without deleting/updating the existing (compact) header:
c: application/sdp

@ionutrazvanionita
Copy link
Contributor

Try applying this patch https://gist.github.com/ionutrazvanionita/688a4c832049997ca62e. Hope it solves your problem!

@bogdan-iancu bogdan-iancu added this to the 1.11 milestone Jan 21, 2015
@bogdan-iancu
Copy link
Member

@ionutrazvanionita , the best approach is to actually parse ehdrs in a SIP-wise manner :
/* use SIP parser to look at what is in the FIFO request */
memset( &tmp_msg, 0, sizeof(struct sip_msg));
tmp_msg.len = hdrs->len;
tmp_msg.buf = tmp_msg.unparsed = hdrs->s;
if (parse_headers( &tmp_msg, HDR_EOH_F, 0) == -1 )
return init_mi_tree( 400, "Bad headers", 11);

(see modules/tm/tm.c +473 )

@bbuitenhuis
Copy link
Contributor Author

I believe the bug only occurs in the b2b module. Or is the root cause in tm?

@bbuitenhuis bbuitenhuis changed the title rtpproxy module ignores compact contact-type header (c) B2B module ignores compact contact-type header (c) Jan 21, 2015
@ionutrazvanionita
Copy link
Contributor

@bbuitenhuis It has nothing to do with the tm module, it was only a hint about how to approach the problem!

@bbuitenhuis
Copy link
Contributor Author

I see! Needed coffee ;-)
Thanks!

@ionutrazvanionita
Copy link
Contributor

Try this new patch https://gist.github.com/ionutrazvanionita/5b3e722deaeca775acf7, which parses the headers SIP-wisely, which should solve any problem concerning Content-Type parsing.

@bbuitenhuis
Copy link
Contributor Author

@ionutrazvanionita I've patched the patch, but didn't resolve the issue.
In the message still both c: and content-type: headers are present.

I've make sure the patch really patched.
Any thoughts?

@ionutrazvanionita
Copy link
Contributor

@bbuitenhuis sorry did a little mistake when searching for the Content-Type header. Try this one https://gist.github.com/ionutrazvanionita/1857e3b27d5c1e4906c1.

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

No branches or pull requests

3 participants