shakirmengrani / sipml5

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

Presence PUBLISH call do not store user name (fixed) #122

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

Hi guys !

I found an issue and will provide a fix here

When I push "GO ONLINE" button in SIPML5 client that publish
IM presence to presence server, function do not behave as expected.
User name was not stored in kamailio cache, so any subscribers cant see 
presence status.

Console trace shows that sip PUBLISH call have user_name not set.

Here is a fix for that
File SIPml-api.js

add after line
tsip_transac_nict.prototype.start=function(a)

fix code
if(a.line.request.s_method=="PUBLISH"){a.line.request.o_uri.s_user_name = 
a.o_hdr_From.s_display_name;}

Please test before apply.

Original issue reported on code.google.com by majaibas...@gmail.com on 26 Aug 2013 at 6:03