tommyjlong / app_rtsp_sip Goto Github PK
View Code? Open in Web Editor NEWAsterisk Application - Two-way audio with your Camera using RTSP and SIP to an Asterisk Channel
Asterisk Application - Two-way audio with your Camera using RTSP and SIP to an Asterisk Channel
Hello, when I try to compile Asterisk 18.14 with your module I get the following errors:
[CC] app_rtsp_sip.c -> app_rtsp_sip.o
In file included from /home/openhabian/Downloads/asterisk-18.14.0/include/pj/types.h:33,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsip/sip_config.h:27,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsip/sip_types.h:34,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsip.h:24,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsua-lib/pjsua.h:30,
from app_rtsp_sip.c:88:
/home/openhabian/Downloads/asterisk-18.14.0/include/pj/config.h:264:6: error: #error Endianness must be declared for this processor
# error Endianness must be declared for this processor
^~~~~
In file included from /home/openhabian/Downloads/asterisk-18.14.0/include/pj/types.h:33,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsip/sip_config.h:27,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsip/sip_types.h:34,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsip.h:24,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsua-lib/pjsua.h:30,
from app_rtsp_sip.c:88:
/home/openhabian/Downloads/asterisk-18.14.0/include/pj/config.h:1377:4: error: #error "PJ_IS_LITTLE_ENDIAN is not defined!"
# error "PJ_IS_LITTLE_ENDIAN is not defined!"
^~~~~
/home/openhabian/Downloads/asterisk-18.14.0/include/pj/config.h:1381:4: error: #error "PJ_IS_BIG_ENDIAN is not defined!"
# error "PJ_IS_BIG_ENDIAN is not defined!"
^~~~~
In file included from /home/openhabian/Downloads/asterisk-18.14.0/include/pj/limits.h:28,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pj/types.h:34,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsip/sip_config.h:27,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsip/sip_types.h:34,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsip.h:24,
from /home/openhabian/Downloads/asterisk-18.14.0/include/pjsua-lib/pjsua.h:30,
from app_rtsp_sip.c:88:
/home/openhabian/Downloads/asterisk-18.14.0/include/pj/compat/limits.h:39:4: warning: #warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " "will be defined by the library in pj/compats/limits.h and " "overridable in config_site.h" [-Wcpp]
# warning "limits.h is not found or not supported. LONG_MIN and LONG_MAX " \
^~~~~~~
In file included from app_rtsp_sip.c:82:
/home/openhabian/Downloads/asterisk-18.14.0/include/asterisk/module.h:565:22: fatal error: opening dependency file .app_rtsp_sip.o.d: Permission denied
static const struct ast_module_info *ast_module_info = &__mod_info
^~~~~~~~~~~~~~~
app_rtsp_sip.c:4224:1: note: in expansion of macro ‘AST_MODULE_INFO’
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RTSP-SIP Application",
^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/home/openhabian/Downloads/asterisk-18.14.0/Makefile.rules:165: app_rtsp_sip.o] Error 1
make: *** [Makefile:396: apps] Error 2
How to solve this problem?
Thank you
Hey @tommyjlong
I have succeeded now adding an RTSP stream to the call, leys say you have a SIP doorbell (6000) without any video capabilities
With dialplan below, when 6000 calls 666 (conference) , 6001 , 6002 , 6003, ... are called too to join the conference
When 6001 or 6002 or 6003 picksup, those users will see the RTSP stream as video , because 6000 doesnt have video ... , and "doorbell" already joined the conference..
exten => 666,1,NoOp()
same => n,Progress()
same => n,Originate(Local/doorbell@default,exten,default,888,1,,aC(ulaw,alaw,h264)c(6000)n(Doorbell))
same => n,Originate(PJSIP/6001,exten,default,777,1,,aC(ulaw,alaw,h264)c(6000)n(Doorbell))
same => n,ConfBridge(1,myconferenceroom,default_user)
same => n,Hangup()
exten => 777,1,NoOp()
same => n,ConfBridge(1,myconferenceroom,admin_user)
exten => 888,1,NoOp()
same => n,ConfBridge(1,myconferenceroom,default_user)
exten => doorbell,1,Answer()
same => n,RTSP-SIP(rtsp://admin:[email protected]:554/Streaming/Channels/102,0,Hikvision,5060)
Above is wotking 'ok' ...
But i want to have more features... is below possible?
Above is based on confernce, it has some disadvantages offcourse, leys say i dont want to use conference
When 6000 calls => 6001, is it possible to inject that RTSP stream as video in the SDP/RTP session? maybe also as early media 183 session, maybe with some customizing with ffmpeg and rtp/sdp ? maybe with modifiyn the dial app.c ? or some easier way ?
if above is not possible, and i do need to use conference, can i use the RTSP/h264 video in an early media stage, when i do an originate to 6001 , maybe with customizing the originate.c app ? Changing the SDP/RTP (ffmpeg) and save the rtsp to a file that will be used?
Above conference is wotking verry good with my softphone (6001), i tried a few (linphone desktop/zoiper/acrobit) i always see the RTSP video ... BUT, when i use Linphone on android, seems i have a black screen instead of the video ... and actually i want to use Linphone as a client, and seems that one is the one bugging me?? Do you have any idea? is it maybe because a framerate/resolution that you used in your app ? Have you tried linphone (android) too? Any idea where i can look at ? i have tried several options in linphone, like codec / video size / fps ... but no help
Is there something i can try/change in your app/code ?
thnx , much appreciated!!
Hey @tommyjlong ,
Can you give me a quick help, i was testing your app, i was able to compile it succesfull, the .so loads....
But it gives me error:
[Apr 27 16:28:41] ERROR[630][C-00000001]: app_rtsp_sip.c:2748 main_loop: -No Authenticate header found
I think the .sh script doesnt work, in your .sh file all the files listed there, i dont see them when i extract asterisk
Actually the complete "source" dir is missing there?
What am i missing?
I'm using this Asterisk-Addon for HA, in dockerfile there is also:
./configure \
--with-pjproject-bundled \
https://github.com/TECH7Fox/asterisk-hass-addons/blob/main/asterisk/Dockerfile
I'm testing my own local version , if it works, we will merge this new app of yours, added this to dockerfile:
## Install app_rtsp_sip
WORKDIR /usr/src/asterisk
COPY patches/rtsp_sip_links.sh /usr/src/asterisk
RUN ./rtsp_sip_links.sh
COPY patches/app_rtsp_sip.c /usr/src/asterisk/apps
thnx, appreciated!!
Hi @tommyjlong
Back testing your app...
Can you tell me more about these warnings below?
[Aug 6 13:42:36] NOTICE[445][C-00000006]: app_rtsp_sip.c:2432 main_loop: >rtsp-sip main loop [Aug 6 13:42:36] WARNING[445][C-00000006]: app_rtsp_sip.c:1882 CreateSDP: peer rtp port is not provided [Aug 6 13:42:57] ERROR[445][C-00000006]: app_rtsp_sip.c:2582 main_loop: ast_read() failed. Bail out!
Thnx
Hi, question...
I'm looking for an intercom solutiion... my doorstation sends early media in 183 session, so if i call to a softphone, i can see video before i pickup... thats good , but early media (video) doesnt work on ringgroups
So including an RTSP stream is a good alternative... But what Android softphones do support RTSP streams?
thnx in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.