Maybe you can have a look at the sip logs of you are actually calling?
How do I do that?
Also I am getting the following two errors
They are only related to the sip card all other Lovelace cards donāt give that error
If you are using companion app, it doesnāt work, then you need to upload a valid SSL firstā¦ I m going to buy a domain also for this
Also have a look at asterisk forum, you can find a lot there if you want to know things about asterisk ā¦ Also for troubleshooting
@TECHFox Thanks for the work that youāre doing on integrating SIP into Home Assistant!! Iāve got the card up and running and talking to my FreePBX system. If I call the extension (600) that is setup with the SIP card from a regular SIP phone, the client is ringing. It cannot establish a connection because Iām running my Home Assistant without SSL (https). The SIP client card obviously needs to be able to make a secure connection over HTTPS with the FreePBX server.
If I read through the thread, I suspect that more people canāt place phonecalls from the card because they might have missed this requirement.
Is there a way to set this up without having to run HA with SSL turned on? I was thinking of using NGINX Proxy Manager Addon to encrypt the connection in my local network. Iāve been tryiung this out, but Iām not able to figure out how to set this up properly. Does anybody else have a similar setup to help me configure this in the right way? Thanks!!
Well, i use nabucase, from browser it works, when you first accept the certificateā¦ But not from companion app, because you canāt accept anything thenā¦
Gonna buy me a cheap google domain, then use letās encrypt based on dns (no port 80 needed)
Then use that certificate on the add-on , no issue anymore thenā¦
I also need it for other cards too that use https urls, like the Plex cardā¦ 12$ a year , that should be it
I have manual SSL setup already with letās encrypt but I still get this error.
I donāt use nubucasa
Do I need separate SSL for the pbx, I donāt really want to expose it to the internet if I donāt have too
you need valid ssl certficate, if you want to use ith with companion app when used with nabucasa or external https link, because you cant get the āacceptā message that displays first time
maybe there is a workaround later, but not nowā¦ he told us before, that maybe the add-on itselt will do the registration instead of the cardā¦ then it shouldnt be an usse anymore
But its in alpha stage all, needs to be improved
iām already happy with the stuff we can do now
I see the issue
My wall tablet doesnāt use the app due to clashes with fully kiosk.
I will test with browsers only. Hopefully the app works down the road, it would be most helpful when using sip doorbells.
Iām more than happy to assist with testing as this is so new. I really need it to work for me so anything needed that I can help with Iām willing.
Good luck, I will watch this thread with both eyes for progress.
HA itself does not have to be https. I tested this with just a plain html file (included in github repo).
Could you show me your Asterisk log when you are trying to call?
You can add your sip doorbell by configuring it in sip.conf. (/config/asterisk/sip.conf)
Just to clarify, the Asterisk add-on cannot make calls yet. I still need to make a working dialplan, so next update. When it is fully working and tested I will put it into beta.
HI
Great work again
my log just has the following two entries over and over again
[19:59:37] INFO: Name/username Host Dyn Forcerport Comedia ACL Port Status Description 101/mcacomputing (Unspecified) D Auto (No) No 0 Unmonitored 102/kiosk (Unspecified) D Auto (No) No 0 Unmonitored 103/pwcutajar (Unspecified) D Auto (No) No 0 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 3 offline]
[19:59:42] INFO: HTTP Server Status: Prefix: Server: Asterisk/18.2.2 Server Enabled and Bound to 0.0.0.0:8088 HTTPS Server Enabled and Bound to 0.0.0.0:8089 Enabled URIās: /httpstatus => Asterisk HTTP General Status /phoneprov/ā¦ => Asterisk HTTP Phone Provisioning Tool /ari/ā¦ => Asterisk RESTful API /ws => Asterisk HTTP WebSocket Enabled Redirects: None.
Could you post an example? my sip.conf file has a lot in it should the we add to the bottom?
I found the asterisk instructions but they werenāt clear to me at all
Hi Jordy,
Below is my Asterisk log when calling HA from my SIP phone.
3402 [2021-10-31 21:04:34] VERBOSE[29606][C-00000036] app_while.c: Jumping to priority 13
3403 [2021-10-31 21:04:34] VERBOSE[29606][C-00000036] pbx.c: Executing [s@func-apply-sipheaders:14] Return("SIP/600-00000018", "") in new stack
3404 [2021-10-31 21:04:34] VERBOSE[29606][C-00000036] app_stack.c: Spawn extension (from-internal, 600, 1) exited non-zero on 'SIP/600-00000018'
3405 [2021-10-31 21:04:34] VERBOSE[29606][C-00000036] app_stack.c: SIP/600-00000018 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
3406 [2021-10-31 21:04:34] VERBOSE[29606][C-00000036] app_dial.c: Called SIP/600
3407 [2021-10-31 21:04:34] VERBOSE[29606][C-00000036] app_dial.c: SIP/600-00000018 is ringing
3408 [2021-10-31 21:04:57] ERROR[29676] iostream.c: Problem setting up ssl connection: error:00000001:lib(0):func(0):reason(1), Internal SSL error
3409 [2021-10-31 21:04:57] ERROR[29676] tcptls.c: Unable to set up ssl connection with peer '192.168.30.14:55626'
3410 [2021-10-31 21:04:57] ERROR[29676] iostream.c: SSL_shutdown() failed: error:00000001:lib(0):func(0):reason(1), Internal SSL error
3411 [2021-10-31 21:04:57] VERBOSE[29677] res_http_websocket.c: WebSocket connection from '192.168.30.14:55628' for protocol 'sip' accepted using version '13'
3412 [2021-10-31 21:04:57] VERBOSE[29677] chan_sip.c: Registered SIP '600' at 192.168.30.14:55628
3413 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] app_macro.c: Spawn extension (macro-dial-one, s, 56) exited non-zero on 'PJSIP/200-00000020' in macro 'dial-one'
3414 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] app_macro.c: Spawn extension (macro-exten-vm, s, 30) exited non-zero on 'PJSIP/200-00000020' in macro 'exten-vm'
3415 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] pbx.c: Spawn extension (ext-local, 600, 3) exited non-zero on 'PJSIP/200-00000020'
3416 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] pbx.c: Executing [h@ext-local:1] Macro("PJSIP/200-00000020", "hangupcall,") in new stack
3417 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("PJSIP/200-00000020", "1?theend") in new stack
3418 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] pbx_builtins.c: Goto (macro-hangupcall,s,3)
3419 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("PJSIP/200-00000020", "0?Set(CDR(recordingfile)=)") in new stack
3420 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] pbx.c: Executing [s@macro-hangupcall:4] NoOp("PJSIP/200-00000020", "SIP/600-00000018 montior file= ") in new stack
3421 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] pbx.c: Executing [s@macro-hangupcall:5] GotoIf("PJSIP/200-00000020", "1?skipagi") in new stack
3422 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] pbx_builtins.c: Goto (macro-hangupcall,s,7)
3423 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] pbx.c: Executing [s@macro-hangupcall:7] Hangup("PJSIP/200-00000020", "") in new stack
3424 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] app_macro.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on 'PJSIP/200-00000020' in macro 'hangupcall'
3425 [2021-10-31 21:05:09] VERBOSE[29606][C-00000036] pbx.c: Spawn extension (ext-local, h, 1) exited non-zero on 'PJSIP/200-00000020'
3426 [2021-10-31 21:06:54] VERBOSE[27733] chan_sip.c: Registered SIP '600' at 192.168.30.14:53787
Yes you need to add it to the bottom.
The Asterisk instructions on the github repo are only for adding the card. For adding a standard SIP device, you need different settings. I dont know the specific settings for your device, but here is a basic example.
[201]
username=201
type=friend
context=default
host=dynamic
secret=1234
Super will see if I can get it to work.
Hi Roland,
Is that SSL error when you are trying to accept the call?
It does connect and register it seems. I never seen this problem.
Can you maybe show some more of the card logs?
Upcoming week I am very busy with exams, so progress will be slower. I will continue with this end of next week.
Thanks everyone here for supporting this project and testing the card and add-on!
And special thanks to @pergola.fabio for your support and actively helping here!
Yes, I got the error when trying to accept the call. Iāve tried it the other way around, that is call my SIP phone (extension 200) from the HA SIP client card. Below is what I see in the debug window.
Could this be related to what I got when I did the final step of configuring FreePBX? (" 7. In your clients browser, go to https://<ip_adress_of_pbxserver>:8089/ws
to accept the certificate.")
On a forum about Asterisk I found that I could import the certificate into my Keychain and thatās what I did. In the dialog you can see that the certificate from my FreePBX is trusted.
I managed to finally get the card to work. It took me about 2 days but it was worth it.
Most of the problems I had were related to freepbx and not the card. Also, I could have probably saved myself a lot of trouble if I just rtfm.
Iām going to test calls from outside my network as soon as I have some time to setup the ssl properly.
Thanks for making this @TECHFox