import React from 'react';
import { SipProvider } from 'react-sip';

export default ({ config, children }) => {
  if (config) {
    return (
      <SipProvider key={config && JSON.stringify(config)} autoRegister={false} {...config}>
        {children}
      </SipProvider>
    );
  }
  return children;
};

import React from 'react';
import { SipProvider } from 'react-sip';

export default ({ config, children }) => (
  <SipProvider
    host="dev.callthem.online"
    port="7443"
    user="1007"
    password="31337"
    iceServers={[
      {
        urls: 'turn:free.nikulin.website:5349?transport=tcp',
        username: 'free',
        credential: 'denis',
      },
    ]}
    autoRegister={false}
    extraHeaders={config && config.extraHeaders}
  >
    {children}
  </SipProvider>
);

Fix passing dynamic extraHeaders to react-sip by temporary hardcoding other params
Fix passing dynamic extraHeaders to react-sip by temporary hardcoding other params
