PJSIP throws PJ_ETOOSMALL on register and Invite - java-native-interface

I trying to build an android app with PJSIP and JNI. And it was working ok before. However now im getting the error "Size is too short (PJ_ETOOSMALL) [status=70019]" in PJSIP stacktraces.
Such as ,
pjsua_acc.c .Failed to register with new account setting in modifying account: Size is too short (PJ_ETOOSMALL) [status=70019]
pjsua_call.c !.Unable to generate Contact header: Size is too short (PJ_ETOOSMALL) [status=70019]
The parameters im passing are neither null nor random but working sip endpoints . Any help is appreciated .
PJSIP implemented android logs : https://pastebin.com/s88PEY2C
All sip uri domain names , addresses and ports have been masked

Related

TLS errors using Chilkat library to access Microsoft Graph APIs

I've been trying to use Chilkat library to play around and learn about using Microsoft Graph APIs but it seems I keeps getting TLS errors (connectFailReason 109) with even the simplest GETs and POSTs. This is what a typical log looks like:
ChilkatLog:
QuickGetSb:
DllDate: May 29 2021
ChilkatVersion: 9.5.0.87
UnlockPrefix: XXXXXXXXXXXXXXXX
Architecture: Little Endian; 32-bit
Language: C++ Builder / clang / 32-bit
VerboseLogging: 0
Component successfully unlocked using purchased unlock code.
url: https://graph.microsoft.com/v1.0/users
httpRequestStr:
a_quickReq:
quickHttpRequest:
httpVerb: GET
url: https://graph.microsoft.com/v1.0/users
openHttpConnection:
Opening connection directly to HTTP server.
httpHostname: graph.microsoft.com
httpPort: 443
tls: True
socket2Connect:
connect2:
connectImplicitSsl:
clientHandshake:
clientHandshake2:
ProcessHelloRetryRequest:
readHandshakeMessages:
WindowsError: An existing connection was forcibly closed by the remote host.
WindowsErrorCode: 0x2746
maxToReceive: 5
Failed to receive data on the TCP socket
Failed to read beginning of SSL/TLS record.
b: 0
dbSize: 0
nReadNBytes: 0
idleTimeoutMs: 60000
--readHandshakeMessages
--ProcessHelloRetryRequest
--clientHandshake2
--clientHandshake
Client handshake failed. (3)
--connectImplicitSsl
connectFailReason: 109
ConnectFailReason: 109
--connect2
--socket2Connect
connect: Socket fatal error.
--openHttpConnection
--quickHttpRequest
--a_quickReq
--httpRequestStr
Failed.
--QuickGetSb
--ChilkatLog
The library is not the very latest version but it isn't TOO old (about a year and a half - version 9.5.0.86). I didn't want to upgrade just yet because I have some "live" projects using this dev box (and this is just a "learning journey") so I was wondering if anyone can tell me whether the library version is the most likely issue or whether, perhaps, I'm missing some simple settings in the CkHttp object - the only thing I really do with it is set the auth token (which seems to have been retrieved correctly judging from the logs I output.
The actual API calls are pretty straightforward - mostly simple (slightly modified) examples from Chilkat website. But even the simplest http.quickGetStr("https://graph.microsoft.com/v1.0/me"); fails with a log similar to the above.
So, if anyone can suggest any properties to set to ckHttp to solve this issue (or confirm that library needs to be upgraded to access graph.microsoft.com - if, indeed, that is the case) - I would greatly appreaciate it.
Marko
This problem is already fixed. Contact support#chilkatsoft.com to get a pre-release build for v9.5.0.92.

Connect to sricam IP cameras using openCV

Update: I am using sricam SP019 IP(Wireless) camera.
I have been able to find the RTSP URL for my camera: "rtsp://IP_ADDRESS:554/onvif1" and also managed to play it in VLC and the onvifer Android app provided.
The app also provided the following info -
- Encoding: H264
- Transport Protocol: RTP/RTSP/TCP
- RTP packets received: some non-zero number
- RTP packets lost: 0
- RTSP port: 554
However, I still keep getting the error shown below.
===========================================
I am currently working on a project that requires me to interface with an IP camera (Company name: sricam) using openCV 3.3.1.
Already tried:
I have posted in the openCV forum (here) but have not received any reply yet. I also tried all options in this but keep getting this error related to the Gstreamer library.-
My question:
It would be extremely helpful if someone can just point me in the right direction as a minimum.
Thanks!
When it comes to camera URL there should be some default value in documentation (but it might be changed on configuration of camera). I guess that it will be best to start looking there.
Did you try looking on this page?
https://www.ispyconnect.com/man.aspx?n=Sricam
Try like this.
It worked to me ( OSX, sricam sp005 )
import os
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "rtsp_transport;udp"
vcap = cv2.VideoCapture("rtsp://[IP_CAM_ADD]", cv2.CAP_FFMPEG)
Hope to be helpful to somebody

Troubles with <termios.h> in a C++ app

I'm trying to interface a C++ program and a serial port and I have a problem receiving data using "termios.h". I'm on Debian, using Eclipse and G++. Everything is ok, except I only receive part of the message (I think).
My port is connected to a Wavecom Modem and I receive SMS transactions I need to analyse. Port, rate and every stuff are ok.
If I connect an external analyzer (CuteCom), the message received is correct for every sms : +CMTI: "SMS", xx
(xx is a sequential number)
If I use another library (C, not C++) "RS232.h", it's also ok : +CMTI: "SMS",xx
If I use "termios.h" I only receive : +CMTI:
no "SMS" and no number. It looks like termios doesn't like the « " » and thinks it's the end of the string.
I unfortunately need to use C++ for the project. Does anyone of you has encounter this trouble before ? Is there someone who would be able to give me some hints to check the termios librairy ?
Thanks.
FZ

Refresh frequency using socket - iOS swift

i'm new to iOS dev, it's only my second application, but i didn't make it this time. So, i need suggestion and tips to see how things really works
i'm trying to developpe an app which uses sharedMemory data of a game and sent it over sockets to an iphone.
I proceed this way :
1- func Initnetwork : Connect to the IP, and port and open input, output streams
2- func SendRequest : Send a message to the server ( running on windows in Cpp )
Notes : I use scheduledTimerWithTimeInterval(timer:0.0166) for sendRequest , to keep getting data from server
3- func Stream : To handle NSTreamEvent : if it hasBytes, it allocate a buffer and proceed to read the inputStream, then parse data with NSJsonSerialization, extracting data from and then refreshing labels in the main_queue
Problem : this kind of app need to refresh at high freq, so when running the app, everything is lagging, and i'm getting a refresh every 1 or 2 seconds later, i tried with timer = 0.1, it didn't work.
I'm asking for help because , i don't really know wich way i have to take to fix this problem ( multi thread, new server , idk ).
On the simulator, app keep the CPU working at his highest level 99, and i don't think it should perform like
here is what kind of app i'm trying to make : https://www.youtube.com/watch?v=33sXgUUgoWI

XMPP File transfert with gloox

I'm currently working with gloox in order to send XMPP messages from my C++ program. I work in local network with my private prosody XMPP server.
Sending text messages between two client works but not files. I tried the gloox examples (ft_rcv & ft_send) but it did not worked neither (obviously I modified the examples to match my configuration), I always have the same error :
<error type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
At the beginning I thought it was due to my prosody server but I added the following lines in the conf files :
Component "proxy.jabberserver.local" "proxy65"
proxy65_address = "proxy.jabberserver.local"
proxy65_ports = { 7777 }
I tried different server and different port but I'm currently in a dead end. If someone have an idea it would be great.
Thank you
f->addStreamHost( JID("proxy.jabberserver.local"), "proxy.jabberserver.local", 7777 ); should do the trick. If no - show full XML log.