fix: session reset after call end, add reject/decline for incoming calls, extract caller ID from SIP headers (P-Asserted-Identity, Remote-Party-ID)

This commit is contained in:
2026-03-17 21:31:53 +05:30
parent 36b3a5d34d
commit aff383cb6d
3 changed files with 76 additions and 14 deletions

View File

@@ -110,6 +110,10 @@ export const useSipPhone = (config?: Partial<SIPConfig>) => {
sipClientRef.current?.answer();
}, []);
const reject = useCallback(() => {
sipClientRef.current?.reject();
}, []);
const hangup = useCallback(() => {
sipClientRef.current?.hangup();
}, []);
@@ -159,6 +163,7 @@ export const useSipPhone = (config?: Partial<SIPConfig>) => {
disconnect,
makeCall,
answer,
reject,
hangup,
toggleMute,
toggleHold,