sipml5
sipml5 copied to clipboard
How can I update displayName in sip session just before the call?
currentnly I'm registering display_name in oConfigCall just before initiating the call. But still it's not working, can someone help me?
call = phoneNo => { if (!this.isRegistered()) return; this.oConfigCall.display_name = '54321'; if (this.oSipStack && !this.oSipSessionCall) { this.oSipSessionCall = this.oSipStack.newSession('call-audio', this.oConfigCall); if (this.oSipSessionCall.call(phoneNo) !== 0) { this.oSipSessionCall = null; } } else if (this.oSipSessionCall) { this.oSipSessionCall.accept(this.oConfigCall); } };
Same question, Found any solutions for this?
Hi @shreyshahh , Yes I found the solution.
call = (phoneNo, callerId) => { if (!this.isRegistered()) return; if (this.oSipStack && !this.oSipSessionCall) { _.set(this.oSipStack, ['o_stack', 'identity', 'o_uri_impu', 's_display_name'], callerId); this.oSipSessionCall = this.oSipStack.newSession('call-audio', this.oConfigCall); } }
You can console your this.oSipStack object and you can find 's_display_name' attribute
@jayanthbondi Hi, I've updated s_display_name in sip stack object but it does not reflect that display name on call, it still shows the display name we have added while creating new SIPML stack object. It does not update even if we update s_display_name.
For eg. While creating new sip stack I am giving 'test' as display name
this.oSipStack = new SIPml.Stak({
display_name: 'test'
})
Just before call I am updating it,
this.oSipStack.o_stack.identity.s_display_name = 'xyz';
So I need 'xyz' to be displayed, but instead it displays 'test' only