SIP client card, as intercom

The addon is already a PBX , if you really need a sip trunk, just google for pjsip auth trunk, lots of examples

anyway, if you want a trunk based on AUTH, use this example, i use it for registering on my hikvision indoor panel

[mytrunk-auth]
type=auth
auth_type=userpass
password=PASSWORD
username=10000000005
 
[mytrunk-aor]
type=aor
contact=sip:192.168.0.71:5060
;qualify_frequency=300

[mytrunk-registration]
type=registration
outbound_auth=mytrunk-auth
server_uri=sip:192.168.0.71:5060
client_uri=sip:[email protected]:5060
retry_interval=10
contact_user=10000000005
expiration=600
 
[mytrunk]
type=endpoint
context=default
disallow=all
allow=ulaw,alaw
allow=h264
outbound_auth=mytrunk-auth
aors=mytrunk-aor
rewrite_contact=yes
from_domain=asterisk.com
 
[mytrunk]
type=identify
endpoint=mytrunk
match=192.168.0.71

I you just want a trunk based on IP auth, no outgoing username/password, then use this example:

[hikvision]
type=aor
contact=sip:[email protected]:5060

[hikvision]
type=endpoint
context=default
disallow=all
allow=ulaw,alaw
allow=h264,vp8
aors=hikvision
direct_media=no

[hikvision]
type=identify
endpoint=hikvision
match=192.168.0.71

Could be because of a cache issue like @sf901 said, or a error from a invalid config. In that case check the browser console (F12).

Edit: now I see @sf901 also said that. Whoops. :sweat_smile:

Good that you got it working. :+1:

Thought that I added that error to the docs. Might also add it to the readme.

Like @pergola.fabio said. ^

1 Like

Thanks a lot for the help! I guess standard SIP, not PJSIP, is not supported in the add-on, maybe this is my problem.

indeed, chan_sip is deprecated , addon is based on pjsip

Yeah, Iā€™m considering bringing back the option to enable the chan_sip module. But you will need to configure it yourself then.

Yes, would be usefull indeed, maybe do not load it by default, need to manually load it with the modules.confā€¦

Alltough , donā€™t think you can run pjsip and sip same time, maybe if you define the correct transport sectionā€¦

Would be nice to have it already in the addon, but not loaded by default, so we can play with it

2 Likes

Thanks for the project.
i have set up the dahua VTO (8000), a Tablet with (102), my Phone with (101) and second Phone (101) and i can call between the device.

But when would add an extension like the guideline for the conference with 777 & 888 the asterisk log tels me:

[Nov 18 17:33:09] WARNING[488][C-00000001]: pjsip/dialplan_functions.c:1018 pjsip_acf_dial_contacts_read: Specified endpoint '777' was not found
[Nov 18 17:33:09]     -- Executing [777@default:1] Dial("PJSIP/100-00000000", "") in new stack
[Nov 18 17:33:09]     -- No devices or endpoints to dial (technology/resource)
[Nov 18 17:33:09]     -- Auto fallthrough, channel 'PJSIP/100-00000000' status is 'CHANUNAVAIL'

it is also for the 888 extension.

If anyone could help me with this please.

thanks

Next version of the add-on should contain a possible fix for this.

Hi, did you find a way to have Fully Kiosk working, at least, with sound? Iā€™m strugglind since 2 daysā€¦thanks!

I finally managed to make it work with @pergola.fabio help and his suggestions.
Incoming call from my PBX via the SIP trunk comes into Asterisk and rings on the extension I have in the card.
But, there is no response when I hit the answer button at all. When I change the cardā€™s config to auto-answer, the card pops, but with state idle and not ringing.
Hang up key is working.
Any ideas?

If it helps, when I press F12, I get these errors in browser when I hit the answer button:

Hi,
similarly to others above, I have a Dahua SIP door communication system which I would like to connect to home assistant. Since I am no running HASS.io, but everything in docker containers, I have installed izPBX (a FreePBX container) and configured it accordingly. Using Zoiper on my phone, I can connect to the Dahua, reiceve calls etc.
For this home assistant, SSL certificates (duckdns + letsencrypt) are installed, and I managed to connect the SIP card to asterisk. However, I have exactly the same problem as @sxbcl:

  • Incoming calls from SIP trunks or extensions in asterisk ring on the extension in the card. The card displays this as ringing. But nothing is happening when I hit answer. The browser error is the very same as @sxbcl has attached to his previous post.
  • Hangup key is working.
  • In addition, I cannot make outgoing calls from the card (for example to zoiper on my phone).
    Asterisk does not even now about the call (logs are empty). The browser error message of the card simply states:
Call failed. Originator: remote sipjs-card.ts:805:24
Call: newRTCSession: Originator: local sipjs-card.ts:776:20
ICE gathering timeout: 5 seconds

After trying numerous things, I am hitting a dead end, and a hint would be greatly appreciated.
I have not configured any ICE. Any logs can be posted on request (I did not want to spam the post with maybe irrelevant logs).

Do you have multiple instances of the card loaded? Can you show the full browser console?

Also, I donā€™t get notifications from here. Best would be to ask in the discord server if you want a quicker response. (Other people and chat history there could help too.)

Thanks, I try thereā€¦

Hi, I need help.
I installed and configured Asterisk on my Home Assistant, I also configured my Dahua VTO and everything works fine in my network.
If I call the intercom from my phone from an external network everything works except the video.
Who can help me?

Hi All,

Just came across this. Itā€™s taken me a couple of days but Iā€™ve got it mostly working. I can call between browsers via https, I can call my android device as long as I disable video and I can call my doorbell (2N Solo). The only thing Iā€™m stuck in is receiving calls from the doorbell. Any tips/examples?

There are examples and guides on the docs: Doorbell | SIP-HASS

Also, I donā€™t get notifications from here. Best would be to ask in the discord server if you want a quicker response. (Other people and chat history there could help too.)

2 Likes

hi to all,

first i wanted to express my joy of the ability, finally to use a doorbell within an smarthome visualization!
Many thanks to TECHFox and Helpers. its awesome what people can do!

Butā€¦ I canā€™t get it to work :confused:
I think there is a Basic setup i did wrong and hope someone can help me.
Maybe this could be a Reason why some others failā€¦

-Home Assistant 2023.2.5 on a Proxmox intel Nuc
-Fritzbox 7590 Router
-3 Person Entities(Me, Girlfriend, Tablet)
-DuckDNS (pointed fullchain.pem and privkey.pem in configaration.yaml to ssl/ directory and https works for me)

  1. I installed DuckDNS (DDNS) and set up internet and local Network with the https://mydomain.duckdns.org:8123 URL
    (under Settings>System>Network>Home Assistant URL)
    so my local Network should also be the DDNS URL instead of my 192.168.x.x:8123

Q1. Or is this my first Mistake?

  1. After istalling and configurate Asterisk with default settings and a random AMI-Password the LOG says Asterisk Ready (both on WIFI and Mobile Data) and i can see the pjsip_default.conf extensions, but the integration sometime is on success and other times on disconnected. extension state is unavailable.

  2. Card Configuration with the Editor and the Server without https:// so mydomain.duckdns.org. everything else default. extensions are created.
    secret / auto_add_secret: is it 1234 by default or is it the same as the AMI Password?

  3. Browser cache is clear, side reloaded, HA reloaded

  4. I am not sure with the Ports. Do i have to open them in every case?
    All of them?
    5060TCP
    8089TCP
    (is TCP right in any case or do i have to set up UDP too?)
    Is there a Scenario for using local and away?
    Because both are DDNS URLā€™sā€¦
    When do i need to use those 10000-20000 (cant set it up for forwarding, cause the range seems to be too big, only 255)

  5. the Docu says to go this Way to import the Certificate https://:8089/ws for Browser.
    Nothing happens if i use mydomain name here. It works with the https://192.168.x.x:8089/ws but the system says its not secure
    Is it correct still to use the regular IP of the System?!

  6. Is there a way now to use the companion up instead of the browser? the wiki says that the companion App since 2022.2 is required.

ā†’ When i log in as ME on my PC and as Tablet on my Mobile Device i see that the extension Number is switching between 100 and 101, but when i try to set a call the window pops up for a second and disappears again :see_no_evil:

THANKS A LOT IN ADVANCE
-what kind of Logs would you need? just let me know-