Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,007 changes: 968 additions & 39 deletions dist/jssip.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jssip.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ gulp.task('test', function()
'test/test-parser.js',
'test/test-properties.js',
'test/test-UA-no-WebRTC.js',
'test/test-digestAuthentication.js'
'test/test-digestAuthentication.js',
'test/test-UA-subscriber-notifier.js'
];

return gulp.src(src)
Expand Down
2 changes: 1 addition & 1 deletion lib/Constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export declare enum DTMF_TRANSPORT {
}

export const REASON_PHRASE: Record<number, string>
export const ALLOWED_METHODS = 'INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY'
export const ALLOWED_METHODS = 'INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY,SUBSCRIBE'
export const ACCEPTED_BODY_TYPES = 'application/sdp, application/dtmf-relay'
export const MAX_FORWARDS = 69
export const SESSION_EXPIRES = 90
Expand Down
2 changes: 1 addition & 1 deletion lib/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ module.exports = {
606 : 'Not Acceptable'
},

ALLOWED_METHODS : 'INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY',
ALLOWED_METHODS : 'INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY,SUBSCRIBE',
ACCEPTED_BODY_TYPES : 'application/sdp, application/dtmf-relay',
MAX_FORWARDS : 69,
SESSION_EXPIRES : 90,
Expand Down
24 changes: 24 additions & 0 deletions lib/Notifier.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import {EventEmitter} from 'events'
import {SUBSCRIBE, NOTIFY} from './Constants'
import * as Utils from './Utils'

declare enum NotifierTerminatedCode {
NOTIFY_RESPONSE_TIMEOUT = 0,
NOTIFY_TRANSPORT_ERROR = 1,
NOTIFY_NON_OK_RESPONSE = 2,
NOTIFY_FAILED_AUTHENTICATION = 3,
SEND_FINAL_NOTIFY = 4,
RECEIVE_UNSUBSCRIBE = 5,
SUBSCRIPTION_EXPIRED = 6
}

export class Notifier extends EventEmitter {
start(): void;
setActiveState(): void;
notify(body?: string): void;
terminate(body?: string, reason?: string): void;
get state(): string;
get id(): string;
static get C(): typeof NotifierTerminatedCode;
get C(): typeof NotifierTerminatedCode;
}
Loading