sipml5 icon indicating copy to clipboard operation
sipml5 copied to clipboard

How can I update displayName in sip session just before the call?

Open jayanthbondi opened this issue 4 years ago • 4 comments

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); } };

jayanthbondi avatar Dec 04 '20 11:12 jayanthbondi

Same question, Found any solutions for this?

shreyshahh avatar Feb 10 '21 05:02 shreyshahh

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); } }

jayanthbondi avatar Feb 10 '21 05:02 jayanthbondi

You can console your this.oSipStack object and you can find 's_display_name' attribute

jayanthbondi avatar Feb 10 '21 05:02 jayanthbondi

@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

shreyshahh avatar Apr 29 '21 05:04 shreyshahh