Skip to content

Commit

Permalink
Fix telephone-event on answer
Browse files Browse the repository at this point in the history
  • Loading branch information
nstratford committed May 15, 2012
1 parent adcdff7 commit e7c19a7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion modules/phono-js/src/main/js/phono.phone.js 100644 → 100755
Expand Up @@ -153,7 +153,7 @@
call.state = CallState.RINGING;
Phono.events.trigger(call, "ring");
});

};

Call.prototype.answer = function() {
Expand Down Expand Up @@ -182,6 +182,16 @@
clockrate: call.codec.rate
}).up();

$.each(call.audioLayer.codecs(), function() {
if (this.name == "telephone-event") {
partial = partial.c('payload-type', {
id: this.id,
name: this.name,
clockrate: this.rate
}).up();
}
});

this.transport.buildTransport("answer", partial.up(), function(){
call.connection.sendIQ(jingleIq, function (iq) {
call.state = CallState.CONNECTED;
Expand Down

0 comments on commit e7c19a7

Please sign in to comment.