juniorlm87 / sipml5

Automatically exported from code.google.com/p/sipml5
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Caller ID Name Not Present on Incoming Call to sipML5 #163

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
a) Before posting your issue you MUST answer to the questions otherwise it
will be rejected (invalid status) by us
b) Please check the issue tacker to avoid duplication
c) Please provide network capture (Wireshark) or Javascript console log
if you want quick response

What steps will reproduce the problem?
1. Make a call between a SipML5 endpoint and an Asterisk/Freeswitch peer
2. Observe the following line in the SIP header of the invite:

From: "UserName" <sip:###@10.10.10.10>;tag=1Y6

What is the expected output? What do you see instead?

See that the resulting variable s_display_name is not set

::: the result of callSession.o_session.o_uri_from.s_display_name is : null

We should expect to see:

the result of callSession.o_session.o_uri_from.s_display_name is : UserName

What version of the product are you using? On what operating system?

Most recent release of the library.

Original issue reported on code.google.com by j...@fluentstream.com on 7 Mar 2014 at 8:09

GoogleCodeExporter commented 9 years ago
Hi
I have the issue in Caller id on Sipml5 client side
When calling from sipml5 to and sip phone like zoiper, It shows the caller Id 
calling. But in case of call from any sip phone to Sipml5 client it only shows 
"incomming call from User name" there is no caller id there.
Also same when make call between two sipml5 clients, there is no caller id .

Original comment by mfurqan...@gmail.com on 27 Jan 2015 at 10:13

GoogleCodeExporter commented 9 years ago
Hello guys,

I've formulated a temporary hack that will fix this problem (At least with 
Asterisk), see below on how to apply it. I believe the problem is clone() (in 
tsip_session.prototype.__set) is called with 'false,false' when it should be 
'false,true', but the problem with making the 2nd argument true is 
tsip_uri.prototype.Parse() won't be able to decipher it, so until 
tsip_uri.prototype.Parse is patched to add the ability to parse the name from 
the formatted sip uri (Which would be like: "Display Name"<sip:123@domain.com>) 
the display name will keep being dropped. An alternative to adding display name 
parsing logic is we could give Parse() a second argument that would just be the 
display name (defaults to null), and let it directly carry that over to the new 
URI object.

To fix incoming caller ID (Minified JS):
Find: this.o_uri_from=b.o_hdr_From.o_uri.clone(false,false)
Add after: ;this.o_uri_from.s_display_name=b.o_hdr_From.s_display_name

To fix incoming caller ID (Normal JS @ tinySIP/src/tsip_session.js):
Find: this.o_uri_from = o_message.o_hdr_From.o_uri.clone(false, false);
Add this line after: this.o_uri_from.s_display_name = 
o_message.o_hdr_From.s_display_name;

After this fix you should be able to format a nice caller ID (Tested both 
external and internal calls):
var callerID = e.newSession.o_session.o_uri_from.s_display_name + ' <' + 
e.newSession.o_session.o_uri_from.s_user_name + '>';

Original comment by CraigShe...@gmail.com on 4 Feb 2015 at 5:14