GithubHelp home page GithubHelp logo

davehorton / drachtio-b2b-media-proxy Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 5 KB

simple B2BUA that uses rtpengine to proxy media

License: MIT License

JavaScript 100.00%
sip drachtio drachtio-srf rtpengine

drachtio-b2b-media-proxy's People

Contributors

davehorton avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ca4ti ethanbrooks

drachtio-b2b-media-proxy's Issues

Troubleshooting Initial Install

Trying to understand drachtio better through deploying a few of the example apps.  Followed the steps in readme. I've added a simple register function to the example app, otherwise its exact same.  The setup is two SIP endpoints and a MacBook on the same internal subnet.  Drachtio-server and rtpengine load fine with the endpoints registering.

When a call is place, I don't see the outbound INVITE from the containers or any activity on the rtpengine. Did a packet capture and didn't see anything on port 22222. It doesn't look like node is signalling to the rtpengine.

2018-07-09 18:55:21.725894 tport.c:2801 tport_wakeup() tport_wakeup(0x1a2cc50): events IN
2018-07-09 18:55:21.726138 tport.c:2892 tport_recv_event() tport_recv_event(0x1a2cc50)
2018-07-09 18:55:21.726247 tport.c:3233 tport_recv_iovec() tport_recv_iovec(0x1a2cc50) msg 0x1a2e680 from (tcp/172.17.0.1:45538) has 3536 bytes, veclen = 1
2018-07-09 18:55:21.727830 recv 3536 bytes from tcp/[172.17.0.1]:45538 at 18:55:21.726344:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/TCP 192.168.128.157:5060;branch=z9hG4bK4dd89fb5d13d0eb0abafe79e9bb6abbb;rport
Call-ID: 9e880d83decded64c15cb00fd2dfd7ee
CSeq: 100 INVITE
Contact: <sip:[email protected]:5060;transport=tcp>
From: <sip:[email protected]>;tag=af9c14d83739a2e8
To: <sip:[email protected]>
Max-Forwards: 70
Route: <sip:192.168.128.2;lr>
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,INFO,OPTIONS,REFER,NOTIFY
User-Agent: TANDBERG/529 (ce9.4.0.62bc0aa4505) Cisco-SX10
Supported: replaces,100rel,timer,gruu,path,outbound
Session-Expires: 1800
Content-Type: application/sdp
Content-Length: 2900

v=0
o=tandberg 12 2 IN IP4 192.168.128.157
s=-
c=IN IP4 192.168.128.157
b=AS:3072
t=0 0
a=cisco-mari-rate
a=cisco-mari:v1
m=audio 2348 RTP/AVP 108 114 104 105 9 18 8 0 101 123
b=TIAS:64000
a=rtpmap:108 MP4A-LATM/90000
a=fmtp:108 profile-level-id=24;object=23;bitrate=64000
a=rtpmap:114 opus/48000/2
a=fmtp:114 maxaveragebitrate=48000;stereo=0
a=rtpmap:104 G7221/16000
a=fmtp:104 bitrate=32000
a=rtpmap:105 G7221/16000
a=fmtp:105 bitrate=24000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:123 x-ulpfecuc/8000
a=fmtp:123 multi_ssrc=1;feedback=0;max_esel=1450;m=8;max_n=64;FEC_ORDER=FEC_SRTP;non_seq=1
a=extmap:14 http://protocols.cisco.com/timestamp#100us
a=sendrecv
m=video 2354 RTP/AVP 97 126 96 34 123
b=TIAS:3072000
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=0;profile-level-id=428014;max-br=2500;max-mbps=245000;max-fs=8160;max-smbps=245000;max-fps=3000
a=rtpmap:126 H264/90000
a=fmtp:126 packetization-mode=1;profile-level-id=428014;max-br=2500;max-mbps=245000;max-fs=8160;max-smbps=245000;max-fps=3000
a=rtpmap:96 H263-1998/90000
a=fmtp:96 custom=1280,720,1;custom=1024,768,1;custom=1024,576,1;custom=800,600,1;cif4=1;custom=720,480,1;custom=640,480,1;custom=512,288,1;cif=1;custom=352,240,1;qcif=1;maxbr=30000
a=rtpmap:34 H263/90000
a=fmtp:34 cif4=2;cif=1;qcif=1;maxbr=10000
a=rtpmap:123 x-ulpfecuc/8000
a=fmtp:123 multi_ssrc=1;feedback=0;max_esel=1450;m=8;max_n=64;FEC_ORDER=FEC_SRTP;non_seq=1
a=label:11
a=answer:full
a=extmap:14 http://protocols.cisco.com/timestamp#100us
a=content:main
a=rtcp-fb:* nack pli
a=rtcp-fb:* ccm fir
a=rtcp-fb:* ccm tmmbr
a=sendrecv
m=application 2443 UDP/BFCP *
a=setup:actpass
a=confid:1
a=userid:12
a=bfcpver:2 1
a=floorid:2 mstrm:12
a=floorctrl:c-s
a=connection:new
m=video 2360 RTP/AVP 97 126 96 34 123
b=TIAS:3072000
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=0;profile-level-id=428014;max-br=2500;max-mbps=122400;max-fs=8160;max-smbps=122400;max-fps=3000
a=rtpmap:126 H264/90000
a=fmtp:126 packetization-mode=1;profile-level-id=428014;max-br=2500;max-mbps=122400;max-fs=8160;max-smbps=122400;max-fps=3000
a=rtpmap:96 H263-1998/90000
a=fmtp:96 custom=1280,768,2;custom=1280,720,1;custom=1024,768,1;custom=1024,576,1;custom=800,600,1;cif4=1;custom=720,480,1;custom=640,480,1;custom=512,288,1;cif=1;custom=352,240,1;qcif=1;maxbr=10000
a=rtpmap:34 H263/90000
a=fmtp:34 cif4=2;cif=1;qcif=1;maxbr=10000
a=rtpmap:123 x-ulpfecuc/8000
a=fmtp:123 multi_ssrc=1;feedback=0;max_esel=1450;m=8;max_n=64;FEC_ORDER=FEC_SRTP;non_seq=1
a=label:12
a=extmap:14 http://protocols.cisco.com/timestamp#100us
a=content:slides
a=rtcp-fb:* nack pli
a=rtcp-fb:* ccm fir
a=rtcp-fb:* ccm tmmbr
a=sendrecv
m=application 2422 RTP/AVP 100
a=rtpmap:100 H224/4800
a=sendrecv 
2018-07-09 18:55:21.728074 tport.c:3051 tport_deliver() tport_deliver(0x1a2cc50): msg 0x1a2e680 (3536 bytes) from tcp/172.17.0.1:45538 next=(nil)
2018-07-09 18:55:21.728152 nta.c:2968 agent_recv_request() nta: received INVITE sip:[email protected] SIP/2.0 (CSeq 100)
2018-07-09 18:55:21.728230 nta.c:3263 agent_check_request_via() nta: Via check: received=172.17.0.1
2018-07-09 18:55:21.728333 nta.c:3183 agent_recv_request() nta: INVITE (100) to message callback
2018-07-09 18:55:21.728398 processMessageStatelessly - incoming message with call-id 9e880d83decded64c15cb00fd2dfd7ee does not match an existing call leg, processed in thread 7f2e43e74780
2018-07-09 18:55:21.728554 tport.c:3285 tport_tsend() tport_tsend(0x1a2cc50) tpn = TCP/172.17.0.1:5060
2018-07-09 18:55:21.728816 tport.c:3531 tport_send_msg() tport_vsend returned 304
2018-07-09 18:55:21.729048 send 304 bytes to tcp/[172.17.0.1]:45538 at 18:55:21.728647:
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 192.168.128.157:5060;branch=z9hG4bK4dd89fb5d13d0eb0abafe79e9bb6abbb;rport=45538;received=172.17.0.1
From: <sip:[email protected]>;tag=af9c14d83739a2e8
To: <sip:[email protected]>
Call-ID: 9e880d83decded64c15cb00fd2dfd7ee
CSeq: 100 INVITE
Content-Length: 0
 
2018-07-09 18:55:21.729133 tport.c:2324 tport_set_secondary_timer() tport(0x1a2cc50): reset timer
2018-07-09 18:55:21.729243 ClientController::selectClientForRequestOutsideDialog - there are 2 possible clients, we are starting with offset 1
2018-07-09 18:55:21.729313 ClientController::route_request_outside_dialog - Selected client at offset 1
2018-07-09 18:55:21.732882 PendingRequestController::add - tport: 0x1a2cc50, Call-ID: 9e880d83decded64c15cb00fd2dfd7ee, transactionId 032870b1-dca5-4697-b29d-328f2b7dfcf5
2018-07-09 18:55:21.733002 pending-request: Adding entry to go off in 64000ms
2018-07-09 18:55:21.733091 pending-request: Adding entry to the head (queue was empty), length: 1
2018-07-09 18:55:21.733450 ClientController::addNetTransaction: transactionId 032870b1-dca5-4697-b29d-328f2b7dfcf5; size: 1
2018-07-09 18:55:21.735970 No connected clients found to handle incoming cdr:attempt request
2018-07-09 18:55:21.736111 tport.c:2324 tport_set_secondary_timer() tport(0x1a2cc50): reset timer
2018-07-09 18:55:21.737311 Client::write_handler - wrote 3697 bytes: system:0
2018-07-09 18:55:25.059772 tport.c:2801 tport_wakeup() tport_wakeup(0x1a2cc50): events IN
2018-07-09 18:55:25.059922 tport.c:2892 tport_recv_event() tport_recv_event(0x1a2cc50)
2018-07-09 18:55:25.060020 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a2cc50): received keepalive (total 0)
2018-07-09 18:55:25.060165 tport.c:2324 tport_set_secondary_timer() tport(0x1a2cc50): reset timer

2018-07-09 18:55:42.309858 tport.c:2801 tport_wakeup() tport_wakeup(0x1a22830): events IN
2018-07-09 18:55:42.310212 tport.c:2892 tport_recv_event() tport_recv_event(0x1a22830)
2018-07-09 18:55:42.310338 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a22830): received keepalive (total 2)
2018-07-09 18:55:42.310431 tport.c:2324 tport_set_secondary_timer() tport(0x1a22830): reset timer
2018-07-09 18:55:55.094739 tport.c:2801 tport_wakeup() tport_wakeup(0x1a2cc50): events IN
2018-07-09 18:55:55.094897 tport.c:2892 tport_recv_event() tport_recv_event(0x1a2cc50)
2018-07-09 18:55:55.094988 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a2cc50): received keepalive (total 2)
2018-07-09 18:55:55.095073 tport.c:2324 tport_set_secondary_timer() tport(0x1a2cc50): reset timer
2018-07-09 18:56:03.203791 DrachtioController::processWatchdogTimer

2018-07-09 18:56:12.345222 tport.c:2801 tport_wakeup() tport_wakeup(0x1a22830): events IN
2018-07-09 18:56:12.345364 tport.c:2892 tport_recv_event() tport_recv_event(0x1a22830)
2018-07-09 18:56:12.345453 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a22830): received keepalive (total 0)
2018-07-09 18:56:12.345536 tport.c:2324 tport_set_secondary_timer() tport(0x1a22830): reset timer
2018-07-09 18:56:25.129968 tport.c:2801 tport_wakeup() tport_wakeup(0x1a2cc50): events IN
2018-07-09 18:56:25.131494 tport.c:2892 tport_recv_event() tport_recv_event(0x1a2cc50)
2018-07-09 18:56:25.133407 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a2cc50): received keepalive (total 0)
2018-07-09 18:56:25.135523 tport.c:2324 tport_set_secondary_timer() tport(0x1a2cc50): reset timer
2018-07-09 18:56:25.735856 pending-request: running timer function
2018-07-09 18:56:25.736475 pending-request: timer not set (queue is empty after processing expired timers), length: 0
2018-07-09 18:56:25.737491 PendingRequestController::timeout: giving up on transactionId 032870b1-dca5-4697-b29d-328f2b7dfcf5
2018-07-09 18:56:25.737983 ClientController::removeNetTransaction: transactionId 032870b1-dca5-4697-b29d-328f2b7dfcf5; size: 0

2018-07-09 18:56:42.379925 tport.c:2801 tport_wakeup() tport_wakeup(0x1a22830): events IN
2018-07-09 18:56:42.380072 tport.c:2892 tport_recv_event() tport_recv_event(0x1a22830)
2018-07-09 18:56:42.380161 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a22830): received keepalive (total 2)
2018-07-09 18:56:42.380247 tport.c:2324 tport_set_secondary_timer() tport(0x1a22830): reset timer
2018-07-09 18:56:55.165318 tport.c:2801 tport_wakeup() tport_wakeup(0x1a2cc50): events IN
2018-07-09 18:56:55.165459 tport.c:2892 tport_recv_event() tport_recv_event(0x1a2cc50)
2018-07-09 18:56:55.165549 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a2cc50): received keepalive (total 2)
2018-07-09 18:56:55.165634 tport.c:2324 tport_set_secondary_timer() tport(0x1a2cc50): reset timer
2018-07-09 18:57:12.415019 tport.c:2801 tport_wakeup() tport_wakeup(0x1a22830): events IN
2018-07-09 18:57:12.415176 tport.c:2892 tport_recv_event() tport_recv_event(0x1a22830)
2018-07-09 18:57:12.415296 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a22830): received keepalive (total 0)
2018-07-09 18:57:12.415572 tport.c:2324 tport_set_secondary_timer() tport(0x1a22830): reset timer
2018-07-09 18:57:25.199830 tport.c:2801 tport_wakeup() tport_wakeup(0x1a2cc50): events IN
2018-07-09 18:57:25.199959 tport.c:2892 tport_recv_event() tport_recv_event(0x1a2cc50)
2018-07-09 18:57:25.200025 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a2cc50): received keepalive (total 0)
2018-07-09 18:57:25.200079 tport.c:2324 tport_set_secondary_timer() tport(0x1a2cc50): reset timer

2018-07-09 18:57:42.450670 tport.c:2801 tport_wakeup() tport_wakeup(0x1a22830): events IN
2018-07-09 18:57:42.451077 tport.c:2892 tport_recv_event() tport_recv_event(0x1a22830)
2018-07-09 18:57:42.451286 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a22830): received keepalive (total 2)
2018-07-09 18:57:42.451463 tport.c:2324 tport_set_secondary_timer() tport(0x1a22830): reset timer
2018-07-09 18:57:55.234397 tport.c:2801 tport_wakeup() tport_wakeup(0x1a2cc50): events IN
2018-07-09 18:57:55.234611 tport.c:2892 tport_recv_event() tport_recv_event(0x1a2cc50)
2018-07-09 18:57:55.234743 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a2cc50): received keepalive (total 2)
2018-07-09 18:57:55.235050 tport.c:2324 tport_set_secondary_timer() tport(0x1a2cc50): reset timer

2018-07-09 18:58:12.485008 tport.c:2801 tport_wakeup() tport_wakeup(0x1a22830): events IN
2018-07-09 18:58:12.485237 tport.c:2892 tport_recv_event() tport_recv_event(0x1a22830)
2018-07-09 18:58:12.485337 tport_type_tcp.c:302 tport_recv_stream() tport_recv_stream(0x1a22830): received keepalive (total 0)
2018-07-09 18:58:12.485444 tport.c:2324 tport_set_secondary_timer() tport(0x1a22830): reset timer
2018-07-09 18:58:22.005105 tport.c:2801 tport_wakeup() tport_wakeup(0x1a2cc50): events IN
2018-07-09 18:58:22.005284 tport.c:2892 tport_recv_event() tport_recv_event(0x1a2cc50)
2018-07-09 18:58:22.005371 tport.c:3233 tport_recv_iovec() tport_recv_iovec(0x1a2cc50) msg 0x1a2e680 from (tcp/172.17.0.1:45538) has 445 bytes, veclen = 1
2018-07-09 18:58:22.005737 recv 445 bytes from tcp/[172.17.0.1]:45538 at 18:58:22.005456:
CANCEL sip:[email protected] SIP/2.0
Via: SIP/2.0/TCP 192.168.128.157:5060;branch=z9hG4bK4dd89fb5d13d0eb0abafe79e9bb6abbb;rport
Call-ID: 9e880d83decded64c15cb00fd2dfd7ee
CSeq: 100 CANCEL
Contact: <sip:[email protected]:5060;transport=tcp>
From: <sip:[email protected]>;tag=af9c14d83739a2e8
To: <sip:[email protected]>
Route: <sip:192.168.128.2;lr>
User-Agent: TANDBERG/529 (ce9.4.0.62bc0aa4505) Cisco-SX10
Content-Length: 0
 
2018-07-09 18:58:22.005873 tport.c:3051 tport_deliver() tport_deliver(0x1a2cc50): msg 0x1a2e680 (445 bytes) from tcp/172.17.0.1:45538 next=(nil)
2018-07-09 18:58:22.005982 nta.c:2968 agent_recv_request() nta: received CANCEL sip:[email protected] SIP/2.0 (CSeq 100)
2018-07-09 18:58:22.006110 nta.c:3263 agent_check_request_via() nta: Via check: received=172.17.0.1
2018-07-09 18:58:22.006180 nta.c:3183 agent_recv_request() nta: CANCEL (100) to message callback
2018-07-09 18:58:22.006282 processMessageStatelessly - incoming message with call-id 9e880d83decded64c15cb00fd2dfd7ee does not match an existing call leg, processed in thread 7f2e43e74780
2018-07-09 18:58:22.006427 tport.c:3285 tport_tsend() tport_tsend(0x1a2cc50) tpn = TCP/172.17.0.1:5060
2018-07-09 18:58:22.008685 tport.c:3531 tport_send_msg() tport_vsend returned 347
2018-07-09 18:58:22.009043 send 347 bytes to tcp/[172.17.0.1]:45538 at 18:58:22.007492:
SIP/2.0 481 Call/Transaction Does Not Exist
Via: SIP/2.0/TCP 192.168.128.157:5060;branch=z9hG4bK4dd89fb5d13d0eb0abafe79e9bb6abbb;rport=45538;received=172.17.0.1
From: <sip:[email protected]>;tag=af9c14d83739a2e8
To: <sip:[email protected]>;tag=ttUNKKH9e85ee
Call-ID: 9e880d83decded64c15cb00fd2dfd7ee
CSeq: 100 CANCEL
Content-Length: 0
Home:~ root# docker container run -p 22222:22222  davehorton/rtpengine
[1531153959.763753] INFO: Creating metadata directory "/tmp/metadata".
[1531153959.764863] INFO: Creating pcaps directory "/tmp/pcaps".
[1531153959.766691] INFO: Creating tmp directory "/tmp/tmp".
[1531153959.803445] INFO: Generating new DTLS certificate
[1531153959.826806] INFO: Startup complete, version 6.1.0.0+0~mr6.1.0.0 git-master-c17f4fe
Home:drachtio-b2b-media-proxy root# node app.js 
connected to drachtio listening on tcp/127.0.0.1:5060,udp/127.0.0.1:5060,tcp/172.17.0.2:5060,udp/172.17.0.2:5060
got invite, sending to sip:[email protected]

Any suggestions on where to look?

using as a gateway

Is it possible to use this as a gateway? What I need is when there is 2 seperate networks and my server has 2 interface for each network, one interface will communicate to trunk for both signaling(drachtio) and media(rtpengine) and other interface will communicate with sip clients for both signaling and media and it will route traffic between those legs? I tried to do it, I added 2 interfaces, I also configured routes but rtpengine tries to send rtp from the original interface (since there is no routing, it cannot send it).

You can find pcap file attached: log19.zip

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.