Before I go any further with this project I was wondering:
Is it possible to do 2 way video calls with doorpi?
Thanks,
DM123
Before I go any further with this project I was wondering:
Is it possible to do 2 way video calls with doorpi?
Thanks,
DM123
thanks ill give it aa shot
2016-07-23 23:08:15,927 [INFO] [doorpi.sipphone.from_linphone] channel [0x1095780]: received [336] new bytes from [UDP://192.168.1.113:5060]:
SIP/2.0 405 Method not allowed
Via: SIP/2.0/UDP 192.168.1.113:5060;branch=z9hG4bK.AH7qtroQl;rport
From: "DoorPi" <sip:Daveyman123@192.168.1.113>;tag=KCGd7Dg5D
To: "DoorPi" <sip:Daveyman123@192.168.1.113>;tag=-GQ2Z
Call-ID: BroP1ju1Jc
CSeq: 21 REGISTER
Allow: INVITE, CANCEL, ACK, BYE, SUBSCRIBE, NOTIFY, MESSAGE, OPTIONS, INFO
here is my output from doorpi_cli --trace
hello pah,
I do not necessarily want the number hardcoded
right now I am concerned with making a call at all.
What should be the format of the numbers? "0624"? "0624@default"? "sip.daveyman@linphone.org"??
I am using asterisk and can make a call using that CLI, however,
I cannot make a call with DoorPi
the script I run returns nothing and I cannot see any logs or errors
Thank you for the suggestion and I will continue searching for the format,
Daveyman123
what is the format to enter a number to make a call?
I use this script but it does nothing.. how do i log errors?
GNU nano 2.2.6 File: call2.py GNU nano 2.2.6 File: call2.py
import logging import logging
logger = logging.getLogger (__ name__) logger = logging.getLogger (__ name__)
logger.debug ( "% s loaded", __name__) logger.debug ( "% s loaded", __name__)
from doorpi.action.base import Single Action from doorpi.action.base import Single Action
import doorpi import doorpi
GNU nano 2.2.6 File: call2.py GNU nano 2.2.6 File: call2.py
import logging import logging
logger = logging.getLogger (__ name__) logger = logging.getLogger (__ name__)
logger.debug ( "% s loaded", __name__) logger.debug ( "% s loaded", __name__)
from doorpi.action.base import Single Action from doorpi.action.base import Single Action
import doorpi import doorpi
#number = "sip: daveyman123@sip.linphone.org" #number = "sip: daveyman123@sip.linphone.org"
def call (number): def call (number):
doorpi.DoorPi (). doorpi.DoorPi (). sipphone.call (number) sipphone.call (number)
def get (parameters): def get (parameters):
parameter_list = parameters.split ( ',') parameter_list = parameters.split ( ',')
if len (parameter_list) is not 1: return None if len (parameter_list) is not 1: return None
number = 0624 number = 0624
#number = 13145265687 #number = 13145265687
return CallAction (call, number = number) return CallAction (call, number = number)
class CallAction (Single Action): class CallAction (Single Action):
passport passport
Alles anzeigen
[DoorPi]
base_path = /usr/local/etc/DoorPi
eventlog = !BASEPATH!/conf/eventlog.db
is_alive_led =
last_snapshot =
[DoorPiWeb]
indexfile = index.html
ip =
loginfile = login.html
online_fallback = http://motom001.github.io/DoorPiWeb
port = 80
public = AREA_public
www = !BASEPATH!/../DoorPiWeb
[EVENT_OnStartup]
10 = sleep:1
[SIP-Phone]
firewallpolicy = PolicyNoFirewall
audio_codecs = PCMA,PCMU
call_timeout = 40
playback_device = C-Media USB Headphone Set Sound Device
capture_device = ALSA: USB PnP Sound Device
dialtone = !BASEPATH!/media/ShortDialTone.wav
dialtone_renew_every_start = False
dialtone_volume = 35
echo_cancellation_enabled = False
identity = DoorPi
local_port = 5062
max_call_time = 120
playback_device = ALSA: default device
record_while_dialing = False
records = !BASEPATH!/records/%Y-%m-%d_%H-%M-%S.wav
sipphonetyp = Media5-fone
sipserver_password = dJGTT901
sipserver_realm = asterisk
sipserver_server = 192.168.1.113
sipserver_username = Daveyman123
stun_server =
ua.max_calls = 2
video_codecs = VP8
video_device = V4L2: /dev/video0
video_display_enabled = False
video_size = vga
[keyboards]
dummy = dummy
Alles anzeigen
i can make a call using asterisk but i cannot make a call with this script:
GNU nano 2.2.6 File: call2.py
import logging
logger = logging.getLogger (__ name__)
logger.debug ( "% s loaded", __name__)
from doorpi.action.base import Single Action
import doorpi
GNU nano 2.2.6 File: call2.py
import logging
logger = logging.getLogger (__ name__)
logger.debug ( "% s loaded", __name__)
from doorpi.action.base import Single Action
import doorpi
#number = "sip: daveyman123@sip.linphone.org"
def call (number):
doorpi.DoorPi (). sipphone.call (number)
def get (parameters):
parameter_list = parameters.split ( ',')
if len (parameter_list) is not 1: return None
number = 0624
#number = 13145265687
return CallAction (call, number = number)
class CallAction (Single Action):
passport
^ G Get Help ^ O ^ R WriteOut ReadFile ^ Y ^ Prev Page K Cut text ^ C Cur Pos
^ X ^ Exit J Justify ^ W Where Is ^ V Next Page ^ U UnCut Southwestern ^ T To Spell
Alles anzeigen
here is my doorpi.ini
[DoorPi]
base_path = /usr/local/etc/DoorPi
eventlog = !BASEPATH!/conf/eventlog.db
is_alive_led =
last_snapshot =
[DoorPiWeb]
indexfile = index.html
ip =
loginfile = login.html
online_fallback = http://motom001.github.io/DoorPiWeb
port = 80
public = AREA_public
www = !BASEPATH!/../DoorPiWeb
[EVENT_OnStartup]
10 = sleep:1
[SIP-Phone]
firewallpolicy = PolicyNoFirewall
audio_codecs = PCMA,PCMU
call_timeout = 40
playback_device = C-Media USB Headphone Set Sound Device
capture_device = ALSA: USB PnP Sound Device
dialtone = !BASEPATH!/media/ShortDialTone.wav
dialtone_renew_every_start = False
dialtone_volume = 35
echo_cancellation_enabled = False
identity = DoorPi
local_port = 5060
max_call_time = 120
playback_device = ALSA: default device
record_while_dialing = False
records = !BASEPATH!/records/%Y-%m-%d_%H-%M-%S.wav
sipphonetyp = linphone
sipserver_password = dJGTT901
sipserver_realm = asterisk
sipserver_server = 192.168.1.113
sipserver_username = Daveyman123
stun_server =
ua.max_calls = 2
video_codecs = VP8
video_device = V4L2: /dev/video0
video_display_enabled = False
video_size = vga
call: [Phone Number]
**0624@asterisk
**0624 at asterisk
0624
0624@default
call:**0624
[AdminNumbers]
**0624 = active
Alles anzeigen
thank you for any help
-daveyman123
GNU nano 2.2.6 File: call2.py Modified
import logging logger = logging.getLogger(__name__)
logger.debug("%s loaded", __name__)
from doorpi.action.base import SingleAction
import doorpi
#number = "sip:daveyman123@sip.linphone.org"
def call(number):
doorpi.DoorPi().sipphone.call(number)
def get(parameters):
parameter_list = parameters.split(',')
if len(parameter_list) is not 1: return None
number = "0624"
#number = 13145265687
return CallAction(call, number = number)
class CallAction(SingleAction):
pass
Alles anzeigen
that is my call.py script and
This is my doorpi.ini file
GNU nano 2.2.6 File: call2.py Modified
GNU nano 2.2.6 File: /usr/local/etc/DoorPi/conf/doorpi.ini
[DoorPi]
base_path = /usr/local/etc/DoorPi
eventlog = !BASEPATH!/conf/eventlog.db
is_alive_led =
last_snapshot =
[DoorPiWeb] indexfile = index.html
ip =
loginfile = login.html
online_fallback = http://motom001.github.io/DoorPiWeb
port = 80
public = AREA_public
www = !BASEPATH!/../DoorPiWeb
[EVENT_OnStartup]
10 = sleep:1
[SIP-Phone]
firewallpolicy = PolicyNoFirewall
audio_codecs = PCMA,PCMU
call_timeout = 40
playback_device = C-Media USB Headphone Set Sound Device
capture_device = ALSA: USB PnP Sound Device dialtone = !BASEPATH!/media/ShortDialTone.wav
dialtone_renew_every_start = False dialtone_volume = 35
echo_cancellation_enabled = False
identity = DoorPi
local_port = 5062
max_call_time = 120
playback_device = ALSA: default device record_while_dialing = False
^G Get Help ^O WriteOut ^R Read File^Y Prev Page^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page^U UnCut Tex^T To Spell
Alles anzeigen
UPDATE:
I got asterisk to make a call.. when i pick up all i hear is a ringtone ringing
Now I just need to get call.py working
love the project, thanks,
DM123
now i cant seem to make a call something to do with sound drivers.
I will work on it more later
raspberrypi*CLI> console dial 1234
[Jul 21 17:19:41] WARNING[918]: chan_oss.c:488 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory
[Jul 21 17:19:41] NOTICE[918]: console_video.c:137 console_video_start: voice only, console video support not present
-- Executing [1234@default:1] playback("Console/dsp", "transfer,skip")
-- Auto fallthrough, channel 'Console/dsp' status is 'UNKNOWN'
<< Hangup on console >>
[Jul 21 17:24:28] NOTICE[678]: chan_sip.c:23561 handle_response_peerpoke: Peer 'David' is now Lagged. (3830ms / 2000ms)
[Jul 21 17:24:28] NOTICE[678]: chan_sip.c:23561 handle_response_peerpoke: Peer 'David' is now Reachable. (7ms / 2000ms)
it seems i have to register my device
i added [default] in the extensions.conf
now i get this error when calling 0624
raspberrypi*CLI> console dial 0624
[Jul 20 22:39:49] WARNING[813]: chan_oss.c:488 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory
[Jul 20 22:39:49] NOTICE[813]: console_video.c:137 console_video_start: voice only, console video support not present
[Jul 20 22:39:49] WARNING[814][C-00000000]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
Thank you Nea for the quick reply
I do not have a router called FrizBox
here is my sip.conf (no copy/paste errors)
[general]
allowguest=no
port = 5060
bindaddr = 192.168.1.81
qualify = no
disable = all
allow = alaw
allow = ulaw
videosupport = yes
dtmfmode = rfc2833
srvlookup = yes
localnet= 192.168.1.1/255.255.255.0
directmedia = no
nat = yes
[0620]
permit=192.168.1.1/255.255.255.0
type=friend
context=phones
host=dynamic
secret=*****
[0623]
permit=192.168.1.1/255.255.255.0
type=friend
context=phones
host=dynamic
secret=*****
[0624]
permit=192.168.1.1/255.255.255.0
type=friend
context=phones
host=dynamic
secret=*****
Alles anzeigen
Im not sure what to enter for secret
I have modified extensions.conf and sip.conf as you said Nea:
the extensions.conf:
and the sip.conf:
[general] [general]
allowguest=no allowguest = no
port = 5060 port = 5065
bindaddr = 192.168.1.81 bindaddr = 192 168 1 81
qualify = no qualify = no
disable = all disable = all
allow = alaw allow = alaw
allow = ulaw allow = ulaw
videosupport = yes video support = yes
dtmfmode = rfc2833 dtmfmode = rfc2833
srvlookup = yes srvlookup = yes
localnet= 192.168.1.1/255.255.255.0 localnet = 192.168.1.1/255.255.255.0
directmedia = no direct media = no
nat = force_rport,comedia nat = force_rport, comedia
[0620] [0620]
permit=192.168.1.1/255.255.255.0 permit = 192.168.1.1 / 255.255.255.0
type=friend type = friend
context=phones context = phones
host=dynamic host = dynamic
secret=1234 secret = 1234
Alles anzeigen
here is my doorpi.ini
identity = DoorPi
local_port = 5060
max_call_time = 120
playback_device = ALSA: default device
record_while_dialing = False
records = !BASEPATH!/records/%Y-%m-%d_%H-%M-%S.wav
sipphonetyp = linphone
sipserver_password = 1234
sipserver_realm = 192.168.1.1
sipserver_server = 192.168.1.81
sipserver_username = 1000
stun_server =
Alles anzeigen
when i try to make a call with asterisk i get the following:
raspberrypi*CLI> console dial
[Jul 20 16:55:02] WARNING[14276]: chan_oss.c:488 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory
[Jul 20 16:55:02] NOTICE[14276]: console_video.c:137 console_video_start: voice only, console video support not present
raspberrypi*CLI> console hangup
raspberrypi*CLI>
when i try to use call.py python script nothing happens
https://www.linode.com/docs/ap…pbx-on-ubuntu-9-10-karmic
is this a good guide to get started with an asterisk server?
I am attempting to install Asterisk on my Ubuntu computer right now
do i put the sipserver on the raspberry pi or elsewhere?
Thank you so much for the prompt reply
I currently dont have any server set up.. i thought linphone was the sip server..
I am very new and could use some direction.
or maybe more research
sqlite3.OperationalError: database is locked
Exception in thread BeforeShutdown from doorpi.doorpi:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/doorpi/action/handler.py", line 251, in fire_event_synchron
if not silent: self.db.insert_event_log(event_fire_id, event_source, event_name, start_time, kwargs)
File "/usr/local/lib/python2.7/dist-packages/doorpi/action/handler.py", line 135, in insert_event_log
self.execute_sql(sql_statement)
File "/usr/local/lib/python2.7/dist-packages/doorpi/action/handler.py", line 121, in execute_sql
return self._db.execute(sql)
OperationalError: database is locked
Alles anzeigen
im getting this error now
I am having troubles.. Here is my configuration file
playback_device = ALSA: default device
record_while_dialing = False
records = !BASEPATH!/records/%Y-%m-%d_%H-%M-%S.wav
sipphonetyp = linphone
sipserver_password = *********
sipserver_realm = 192.168.1.1
sipserver_server = 192.168.1.1
sipserver_username = daveyman123
stun_server =
ua.max_calls = 2
video_codecs = VP8
video_device = V4L2: /dev/video0
video_display_enabled = False
video_size = vga
Alles anzeigen
I get this when i run sudo doorpi_cli --trace
this repeats over and over ever 15 seconds or so
2016-07-18 22:11:43,311 [INFO] [doorpi.sipphone.from_linphone] A timeout related to this channel occured and no message received during last 60 seconds. This channel is suspect, moving to error state
2016-07-18 22:11:43,312 [INFO] [doorpi.sipphone.from_linphone] channel 0xb4d600: state ERROR
2016-07-18 22:11:43,313 [WARNING] [doorpi.sipphone.from_linphone] Transaction [0xb61c30] reporting timeout, reporting to channel.
2016-07-18 22:11:43,364 [INFO] [doorpi.sipphone.from_linphone] transaction [0xb61c30] channel state changed to [ERROR]
2016-07-18 22:11:43,365 [INFO] [doorpi.sipphone.from_linphone] Refresher: scheduling next timer in 60000 ms
2016-07-18 22:11:43,365 [INFO] [doorpi.sipphone.from_linphone] Register refresher [503] reason [io error] for proxy [sip:192.168.1.1]
2016-07-18 22:11:43,366 [INFO] [doorpi.sipphone.from_linphone] Refresher: scheduling next timer in 2000 ms
2016-07-18 22:11:43,367 [INFO] [doorpi.sipphone.from_linphone] Register refresher [408] reason [timeout] for proxy [sip:192.168.1.1]
2016-07-18 22:11:43,367 [INFO] [doorpi.sipphone.from_linphone] Changing [client] [REGISTER] transaction [0xb61c30], from state [TRYING] to [TERMINATED]
2016-07-18 22:11:43,368 [INFO] [doorpi.sipphone.from_linphone] Client internal REGISTER transaction [0xb61c30] terminated
2016-07-18 22:11:45,387 [INFO] [doorpi.sipphone.from_linphone] Channel [0xb4d600] destroyed
2016-07-18 22:11:45,388 [INFO] [doorpi.sipphone.from_linphone] belle_sip_client_transaction_send_request(): waiting channel to be ready
2016-07-18 22:11:45,389 [INFO] [doorpi.sipphone.from_linphone] channel [0xb4d600]: starting resolution of 192.168.1.1
2016-07-18 22:11:45,390 [INFO] [doorpi.sipphone.from_linphone] channel 0xb4d600: state RES_IN_PROGRESS
2016-07-18 22:11:45,390 [INFO] [doorpi.sipphone.from_linphone] transaction [0xb20ef0] channel state changed to [RES_IN_PROGRESS]
2016-07-18 22:11:45,391 [INFO] [doorpi.sipphone.from_linphone] channel 0xb4d600: state RES_DONE
2016-07-18 22:11:45,392 [INFO] [doorpi.sipphone.from_linphone] transaction [0xb20ef0] channel state changed to [RES_DONE]
2016-07-18 22:11:45,392 [INFO] [doorpi.sipphone.from_linphone] channel 0xb4d600: state CONNECTING
2016-07-18 22:11:45,393 [INFO] [doorpi.sipphone.from_linphone] transaction [0xb20ef0] channel state changed to [CONNECTING]
2016-07-18 22:11:45,393 [INFO] [doorpi.sipphone.from_linphone] Trying to connect to [UDP://192.168.1.1:5060]
2016-07-18 22:11:45,394 [INFO] [doorpi.sipphone.from_linphone] belle_sip_get_src_addr_for(): af_inet6=0
2016-07-18 22:11:45,395 [INFO] [doorpi.sipphone.from_linphone] Channel has local address 192.168.1.81:5060
2016-07-18 22:11:45,395 [INFO] [doorpi.sipphone.from_linphone] channel 0xb4d600: state READY
2016-07-18 22:11:45,396 [INFO] [doorpi.sipphone.from_linphone] transaction [0xb20ef0] channel state changed to [READY]
2016-07-18 22:11:45,397 [INFO] [doorpi.sipphone.from_linphone] Changing [client] [REGISTER] transaction [0xb20ef0], from state [INIT] to [TRYING]
2016-07-18 22:11:45,398 [INFO] [doorpi.sipphone.from_linphone] channel [0xb4d600]: message sent to [UDP://192.168.1.1:5060], size: [528] bytes
REGISTER sip:192.168.1.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.81:5060;branch=z9hG4bK.jsQzJoGyj;rport
From: "DoorPi" sip:daveyman123@192.168.1.1;tag=Nqz80XXPg
To: "DoorPi" sip:daveyman123@192.168.1.1
CSeq: 45 REGISTER
Call-ID: DXRpwutU0M
Max-Forwards: 70
Supported: outbound
Accept: application/sdp
Accept: text/plain
Accept: application/vnd.gsma.rcs-ft-http+xml
Contact: sip:daveyman123@192.168.1.81;+sip.instance="urn:uuid:601394d9-9dea-4593-92ba-003aee47dc5d"
Expires: 3600
User-Agent: (belle-sip/1.4.2)
Alles anzeigen