Skip to content

base janus-gateway sip plugin app demo(Janus-gateway + OpenSIPS + FreeSWITCH)

Notifications You must be signed in to change notification settings

NFhook/SipAppDemo

Repository files navigation

SipAppDemo

sip demo

base janus-gateway sip demo and angular 16

$ ng new sipApp
$ npm install janus-gateway

demo

$ git clone https://github.com/NFhook/SipAppDemo.git
$ cd SipAppDemo
$ npm install
$ npm run dev

TODO:

  • 1. Auto Answer;
  • 2. Incomingcall;
  • 3. Helper auto inc / dec(support multistream call);
  • 4. Call Timer;
  • 5. Dialpad and DTMF;

register

image-20230814000503342

incomingcall

image-20230814000632767

outbound

outbound

QA:

  1. compile failed(reference issue list)

    node_module/janus-gateway/janus.d.ts

    type GetScreenCallback = (error?, sourceId?) => void
    //change
    type GetScreenCallback = (error?:any, sourceId?:any) => void
  2. about register:

direct register:

register to freeswitch:

Server: sip:10.10.22.10:5070
Username: sip:[email protected]:5070
Authuser: 1001
Password: 1001
Displayname: 1001

request:

{
    "janus": "message",
    "body": {
        "request": "register",
        "username": "sip:[email protected]:5070",
        "authuser": "1001",
        "display_name": "1001",
        "secret": "1001",
        "proxy": "sip:10.10.22.10:5070",
        "outbound_proxy": "sip:10.10.22.10:5070"
    },
    "transaction": "dmdjgUPft598",
    "apisecret": "janusrocks",
    "session_id": 826270005010382,
    "handle_id": 7504801142837563
}

status:

freeswitch@NFhook> sofia status profile internal reg
Registrations:
=================================================================================================
Call-ID:    	2fe1ebf5-c4d3-123d-c382-000c29501dac
User:       	[email protected]
Contact:    	"1001" <sip:1001@10.10.22.10:49705;transport=udp>
Agent:      	RTC
Status:     	Registered(UDP)(unknown) EXP(2024-07-25 11:49:17) EXPSECS(3641)
Ping-Status:	Reachable
Ping-Time:	0.00
Host:       	NFhook
IP:         	10.10.22.10
Port:       	49705
Auth-User:  	1001
Auth-Realm: 	10.10.22.10
MWI-Account:	[email protected]

Total items returned: 1
=================================================================================================

direct_register

proxy register:

register to opensips:

Server: sip:10.10.22.10:5060
Username: sip:[email protected]
Authuser: 8008
Password: 8008
Displayname: 8008

request:

{
    "janus": "message",
    "body": {
        "request": "register",
        "username": "sip:[email protected]",
        "authuser": "8008",
        "display_name": "8008",
        "secret": "8008",
        "proxy": "sip:10.10.22.10:5060",
        "outbound_proxy": "sip:10.10.22.10:5060"
    },
    "transaction": "piqdu51Fwtec",
    "apisecret": "janusrocks",
    "session_id": 1539282642826541,
    "handle_id": 7250372459212115
}

status:

# opensips-cli -x mi ul_dump
{
    "Domains": [
        {
            "name": "location",
            "hash_size": 512,
            "AORs": [
                {
                    "AOR": "[email protected]",
                    "Contacts": [
                        {
                            "Contact": "sip:[email protected]:52224;transport=udp",
                            "ContactID": "4559217660687155477",
                            "Expires": 253,
                            "Q": "",
                            "Callid": "65eac609-c4d3-123d-c382-000c29501dac",
                            "Cseq": 86384107,
                            "User-agent": "RTC",
                            "State": "CS_SYNC",
                            "Flags": 0,
                            "Cflags": "",
                            "Socket": "udp:10.10.22.10:5060",
                            "Methods": 5439
                        }
                    ]
                }
            ]
        }
    ]
}

proxy_register

About

base janus-gateway sip plugin app demo(Janus-gateway + OpenSIPS + FreeSWITCH)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published