I changed lib sipjs to jssip. I have problem on session transfer.
in sipjs this look like this
session_from.refer(session_to);
How i can do this on jssip?
From what I can tell it works very similarly. Instead of referring to the SIP.Session JsSIP has a JsSIP.RTCSession with refer:
http://jssip.net/documentation/2.0.x/api/session/
rtcsession.refer(target, options)
where the options are optional, so you end up with the same exact call.
Related
We connect JsSip to Astersik and long time all worked perfect.
After than unexpectedly voice dissapear without any reason.
We see in astersik log next message
ast_sockaddr_resolve: getaddrinfo("a783543c-1911-44c4-9ba1-52114bbdccb4.local", "(null)", ...): Name or service not known
I read JsSip documetation. In version 1.0 was parameter hack_ip_in_contact
Now instead of it exist parameter contact_uri.
I set contact_uri but nothing changes.
We tried to add a783543c-1911-44c4-9ba1-52114bbdccb4.local in /etc/hosts
It was very strange but it worked until reconnect JsSip. After re conect Jssip this uid changed.
I don't know how fix it in JsSip but we made hack for resolve this problem.
We use dnsmasq and forward all addresses like XXX.local to localhost.
Is it possible to link/connect/ send a signal from JavaScript code into Solidity/Ethereum?
You can use web3.
There is a different syntax for interfacing with contracts. Depending on if the contract is already deployed or you need to do that yourself.
When you have the contract instance you can then call contract methods.
const ChessGame = web3.eth.contract(abiArray);
const contractInstance = ChessGame.at(address);
contractInstance.declareWinner(winner, function (err, res) {
// do something
});
I personally think web3 is a little cumbersome. I recommend checking out Truffle and following some of their tutorials to get up to speed.
You could install the official Go implementation of the Ethereum protocol, geth.
Geth is a tool for running a local node/miner and also allows you to connect to a running blockchain via the console (which then becomes a Javascript console) and input RPC calls natively via the provided web3 package.
Geth also supports connecting to test nets (such as Ropsten or Rinkeby) or even a private blockchain on localhost.
Additionally to a user interacting directly with the console via the command line, geth can be configured from a shell script/batch file to both run or preload javascript files containing scripted commands for testing!
yes just create an ABI of your smart contract and then interact with your smart contracts however you see fit via web3.
I 'm working on esp8266 module these days.
The firmware on this module is nodemcu 0.9.6 and its language is lua.
I use mqtt protocol for my project and it works well.But TLS is necessary.
I don't know how to set tls on this firmware. I 've searched but documents about TLS on nodemcu website is not enough for me.
I know that I should use this instruction at connection time to broker:
m:connect(BROKER, 8883, 1 , function ( connection ) ... end )
and to put the CA file on module i should use something like this:
enter image description here
that 's what i read from nodemcu website --> https://nodemcu.readthedocs.io/en/master/en/modules/net/#netcertverify
but the problem is when i use this on my code the module doesn't understand it and gives error at upload time and runtime.
is this problem because of the version of my firmware? Upgrading will make it? Or I am just doing something wrong on my code?
I haven't seen sample code about putting CA file on module in other project so I guess my work is wrong.
if you have worked on TLS ( on nodemcu firmware ) I would be happy by your helps.
Build a recent firmware with SSL/TLS enabled.
Flash the binary to upgrade. Make sure all flashing parameters are exactly as documented and include the init data binary.
The rest of your code seems fine.
Take a look at this question and read through comments of the answer.
You may have to get esp_init_data_default.bin from latest sdk.
I used esptool.
esptool.py --port <PORT> write_flash -fm dio -fs 32m 0x00000 <BIN_PATH_AND_FILENAME> 0x3fc000 <PATH\>esp_init_data_default.bin
Please do upvote this post if you find it is useful. Thumbs up for #MarcelStör.
I'm trying to get asterisk 11.20.0 running with WebRTC (sip.js 0.72 which I believe is a fork of jssip), but I'm seeing the following (and the called party rings, but when the phone is answered the call gets hung up).
This is my setup:
What I see:
In the CLI:
[2015-11-24 01:01:53] NOTICE[43619][C-00000002]: res_rtp_asterisk.c:4441 ast_rtp_read: Unknown RTP codec 95 received from '(null)'
In Firefox:
InvalidSessionDescriptionError: Invalid description, no ice-ufrag attribute
Attachments:
SIP Dialogue (Asterisk CLI)
Webphone Log
Config Files (httpd.conf, sip.conf, rtp.conf)
Asterisk Compiled with Libuuid & Friends
What I've tried so far:
Changed webRTC implementations (tried chrome and firefox both with SIPML and SIP.JS)
Set the STUN server to null on the client side (stunServers: ['stun:null'])
Configured properly (I hope) my sip.conf and rtp.conf and httpd.conf
Made sure I have libuuid, uuid and their -devel companions and after i've recompiled asterisk.
What I've read:
http://forums.asterisk.org/viewtopic.php?p=201702
https://wiki.asterisk.org/wiki/display/AST/Asterisk+WebRTC+Support
https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5
http://jssip.net/documentation/misc/interoperability/asterisk/
http://sipjs.com/guides/server-configuration/asterisk/
https://kunjans.wordpress.com/2015/01/09/web-sip-client-sipml5-with-asterisk-13-on-centos-6-6/
http://forums.digium.com/viewtopic.php?f=1&t=89798
Please, if you can, give me a hand. I'm about to smash my box with a sledge hammer.
Faced same issue and followed instruction in http://forums.digium.com/viewtopic.php?f=1&t=90167 realise that:
This issue is caused because you asterisk don't have ICE support, you can solve that by installing the uuid/libuuid and uuid-devel/libuuid-devel packages on your system. Then recompile asterisk(be sure to rerun the configure script before the make command).
I did recompile my Astersik 11.16.0 with patch for ECDH support and fallback to prime256v1 https://issues.asterisk.org/jira/browse/ASTERISK-25265 and looks like lost uuid support at that time. Reverting back to non-patched version (with uuid support, use to be compiled before) resolved my issue with "no ice-ufrag attribute" error in Firefox console and calls are going well now from WebRTC client SIPML5 based to asterisk, but not in opposit direction
I want to implement a WebRTC application to be able to make calls over VoIP. My client is running the SIPml5 and in the server side I have installed and confiured the asterisk.
Asterisk was tested with softphone.
Please help??
You will have to configure asterisk with SRTP support.
The below guide will help you
https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5
Also in the function createSipStack(), place the value of realm, impu and websocket_proxy_url matching with the values.
Let me know if you find any difficulty.
Thanks
Anil