darkjonter / sipml5

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

Uncaught ReferenceError: tsip_header_get_name is not defined #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt a call with SIP headers
2. Get error about unknown function.

What is the expected output? What do you see instead?
Things should work as expected. Instead can't because tsip_header_get_name is 
an unknown function

What version of the product are you using? On what operating system?
mac chrome 23, using v1.0.0 download of SIPml-api.js

Uncaught ReferenceError: tsip_header_get_name is not defined SIPml-api.js:3
tsip_header.IndexOfByName SIPml-api.js:3
tsip_stack.__set SIPml-api.js:3
tsip_stack.set SIPml-api.js:3
(anonymous function) SIPml-api.js:3
SIPml.Stack.setConfiguration SIPml-api.js:3
SIPml.Stack SIPml-api.js:3
uberconf.WebRtc.Class.postInit webrtc.js:43
i.extend.$owner mootools-core.js:141
(anonymous function) mootools-core.js:88
(anonymous function)

Original issue reported on code.google.com by n...@firespotter.com on 17 Dec 2012 at 11:43

GoogleCodeExporter commented 9 years ago
Looks like changing 

tsip_header_get_name(ao_headers[i])

to ao_headers[i].name

seems to be a fix.

Original comment by n...@firespotter.com on 18 Dec 2012 at 12:17

GoogleCodeExporter commented 9 years ago
Looks like you're trying to add a header without value -> will remove the 
header.
The right to use is: "ao_headers[i].get_name();" instead of "ao_headers[i].name"

Original comment by boss...@yahoo.fr on 18 Dec 2012 at 12:47

GoogleCodeExporter commented 9 years ago
All my headers have values, however I am adding a new header that is not in the 
large list of known headers above. Could that be it? I tried to remove that and 
had the same issue. Will switch to the get_name().

Original comment by n...@firespotter.com on 18 Dec 2012 at 12:50

GoogleCodeExporter commented 9 years ago
Should be fixed in SVN r147.
To generate the API: 
http://code.google.com/p/sipml5/wiki/FAQ#How_to_reduce_the_size_of_the_scripts_b
efore_deploying
How are you adding the header (I mean code)?

Original comment by boss...@yahoo.fr on 18 Dec 2012 at 12:51

GoogleCodeExporter commented 9 years ago
sip_headers: [{name: 'User-Agent', value: this.userAgent},
                       {name: 'Organization', value: this.orginization},
                       {name: 'X-UC-USER', value: this.identity_}]});

Original comment by n...@firespotter.com on 18 Dec 2012 at 1:06

GoogleCodeExporter commented 9 years ago
This is strange because we're using the same code at 
http://code.google.com/p/sipml5/source/browse/trunk/call.htm?r=144#361
Do you see your headers in the outgoing requests?

Original comment by boss...@yahoo.fr on 19 Dec 2012 at 5:38

GoogleCodeExporter commented 9 years ago
I do after I changed the code to call that function that doesn't exist.

Original comment by n...@firespotter.com on 19 Dec 2012 at 6:52

GoogleCodeExporter commented 9 years ago
Fixed in API v1.1.0 (SVN r148)
http://code.google.com/p/sipml5/wiki/Downloads

Original comment by boss...@yahoo.fr on 20 Dec 2012 at 7:15