3forges / poc-ipbx-switchboard

And how about we try and...
0 stars 0 forks source link

First notes #1

Open Jean-Baptiste-Lasselle opened 11 months ago

Jean-Baptiste-Lasselle commented 11 months ago
Jean-Baptiste-Lasselle commented 11 months ago
Jean-Baptiste-Lasselle commented 11 months ago

According https://guillaume.nibert.fr/voip-asterisk-rpi-ipphone-project/ :

image

/ Create our JsSIP instance and run it:

var socket = new JsSIP.WebSocketInterface('wss:/sip.myhost.com');
var configuration = {
  sockets  : [ socket ],
  uri      : 'sip:alice@example.com',
  password : 'superpassword'
};

var ua = new JsSIP.UA(configuration); // A user agent reference available in th react context

ua.start(); // this would be in a partytown daemon worker

/**
 * and the code below is to call a 
 * phone via the ip pbx, providing 
 * the destination phone number 
 * - 
 * This code would be outside the 
 * webworker, and will get a ref on 
 * the user agent ( "ua", below ), from 
 * the React context
 **/
/ Register callbacks to desired call events
var eventHandlers = {
  'progress': function(e) {
    console.log('call is in progress');
  },
  'failed': function(e) {
    console.log('call failed with cause: '+ e.data.cause);
  },
  'ended': function(e) {
    console.log('call ended with cause: '+ e.data.cause);
  },
  'confirmed': function(e) {
    console.log('call confirmed');
  }
};

var options = {
  'eventHandlers'    : eventHandlers,
  'mediaConstraints' : { 'audio': true, 'video': true }
};

var session = ua.call('sip:bob@example.com', options);
Jean-Baptiste-Lasselle commented 11 months ago

image

Jean-Baptiste-Lasselle commented 11 months ago

https://www.youtube.com/watch?v=erICfPV8-Lg

Jean-Baptiste-Lasselle commented 11 months ago

image

image

Below, screenshotof the utube video showing the details of the infos conveyed by SIP protocol: image

image

Jean-Baptiste-Lasselle commented 11 months ago
Jean-Baptiste-Lasselle commented 11 months ago

image

https://www.youtube.com/watch?v=TuHNtz1x8bM

Jean-Baptiste-Lasselle commented 11 months ago

Adding SIP Client Extension in Asterisk installation

Omy, look at the configuration below :

Question: how do I transfer calls?

Jean-Baptiste-Lasselle commented 11 months ago

Re design of Asterisk Container image

Implement the exact asterisk installation instructions at https://guillaume.nibert.fr/voip-asterisk-rpi-ipphone-project/

It will be a multi-stage build, because the installation procedure involves building from source

Jean-Baptiste-Lasselle commented 11 months ago

Concept of SIP Server exists

So it's a client server, not a peer-to-peer, model, (or both options are possible by configuration ? )

image

image

et donc on Asterisk pourra appeler un quelconque des numéros de téléphones de l'infrastructure routr nous appartenant:

image

About the RTP protocol (I think ASterisk does use RTP) :

image

Jean-Baptiste-Lasselle commented 11 months ago

https://docs.asterisk.org/Getting-Started/Beginning-Asterisk/

Jean-Baptiste-Lasselle commented 11 months ago

https://informunity.us/blog/asterisk-calls-transfer/

Jean-Baptiste-Lasselle commented 11 months ago

https://pedrosanders.medium.com/tutorial-getting-started-with-routr-sip-server-f66c5216690a