Skip to content
Snippets Groups Projects
Commit 01304ca4 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#4066] Parse "allowed" header from requests

parent 595cbe61
No related branches found
No related tags found
No related merge requests found
...@@ -3118,6 +3118,23 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e) ...@@ -3118,6 +3118,23 @@ void call_on_state_changed (pjsip_inv_session *inv, pjsip_event *e)
return; return;
} }
pjsip_hdr *allow_header = NULL;
std::string *allowed_options = NULL;
char header_buffer[500];
if (e->body.tsx_state.src.rdata->msg_info.msg)
allow_header = (pjsip_hdr *) pjsip_msg_find_hdr (e->body.tsx_state.src.rdata->msg_info.msg, PJSIP_H_ALLOW, NULL);
if (allow_header) {
allowed_options = new std::string (allow_header->name.ptr, allow_header->name.slen);
allow_header->vptr->print_on (allow_header, header_buffer, 5000);
std::string theHeader (header_buffer);
}
if (allowed_options)
delete allowed_options;
// If this is an outgoing INVITE that was created because of // If this is an outgoing INVITE that was created because of
// REFER/transfer, send NOTIFY to transferer. // REFER/transfer, send NOTIFY to transferer.
if (call->getXferSub() && e->type==PJSIP_EVENT_TSX_STATE) { if (call->getXferSub() && e->type==PJSIP_EVENT_TSX_STATE) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment