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

cflow.php and Call-IDs #4

Closed
jawaidbazyar opened this issue Jan 1, 2015 · 5 comments
Closed

cflow.php and Call-IDs #4

jawaidbazyar opened this issue Jan 1, 2015 · 5 comments

Comments

@jawaidbazyar
Copy link

In links to call cflow.php to generate SIP call flows, homer embeds the SIP Call-ID in the URL like so:

https://x.x.x.xcflow.php?cid[]=0gQAAC8WAAACBAAALxYAANlMA4OugAeJ2H3q2Gu8ymMgjl+tP2m4mF46Zf3za9fjVQZazRsjYxyIhHskHSKkdg--@68.64.213.1&from_time=14:15:07&to_time=23:15:07&from_date=2014-12-30&to_date=2014-12-31&callid_aleg=0&popuptype=1&unique=0&location[]=1

That is an actual SIP Call-ID from my company's softswitch, a MetaSwitch.

There is a problem with this approach.

First off, SIP Call-ID's are allowed to contain the "+" character. See page 220 of:

https://www.ietf.org/rfc/rfc3261.txt

A SIP Call-ID is defined as word [ @ word ] , and a word is defined as:

word = 1_(alphanum / "-" / "." / "!" / "%" / "" /
"
" / "+" / "`" / "'" / "~" /
"(" / ")" / "<" / ">" /
":" / "" / DQUOTE /
"/" / "[" / "]" / "?" /
"{" / "}" )

While it is clear that many SIP agents do not include "+" characters in Call-ID, my softswitch and/or SBC do (both are products of MetaSwitch).

The impact of a "+" in Call-ID is that PHP urldecodes the query string, and converts a + to a space character, as "+" has a special meaning in URLs.

Call-IDs should be URL-encoded.

@jawaidbazyar
Copy link
Author

I see that I may not have been clear in my explanation of the problem above.

What happens here is that when I click on a Call-ID in a search display, I get a "No Data Found!" error as PHP receives a Call-ID with + transmuted to 'space'. Thus, it cannot find the right records in the sip_capture table.

@lmangani lmangani added the bug label Jan 2, 2015
@adubovikov
Copy link
Member

yes, this is well known bug, need to decode all callid parameters to URL hash or json.

@adubovikov
Copy link
Member

can you please check the last git ?

@lmangani lmangani added the fixed label Jan 7, 2015
@adubovikov
Copy link
Member

ok, looks like it fixed. If not, please reopen the ticket.

@jawaidbazyar
Copy link
Author

Hi, last git does not fix the issue with "+" in the call-id.

I made patches that make it work - In several places I added encoding (and, in one case, double-encoding).

http://tny.cz/3986f276

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

No branches or pull requests

3 participants