asterisk-hass-addons icon indicating copy to clipboard operation
asterisk-hass-addons copied to clipboard

please include module chan_sip (and dependant for sip) at add-on

Open VitalyIak opened this issue 3 years ago • 9 comments

Unfortunatelly it's not possible to use chan_sip module (pjsip doesn't work correct with my doorbell as outbound registratiion, with chan_sip (asterisk 13 works ok) By the way - do you know that Dahua VTO doesn't manage Mifare cards for access, when you switch to external SIP server. Any solutions? As i understand it's possible to use internal VTO's SIP server and use outbound registration from asterisk, but pjsip works strange at all... ((

VitalyIak avatar Sep 08 '22 21:09 VitalyIak

I think this is reasonable. I also identified an issue with pjsip and Dahua, which I posted in the Discord chat some months ago.

felipecrs avatar Sep 13 '22 21:09 felipecrs

We removed chan_sip as it is depreciated and can give conflicts with pjsip. pjsip only works different on the background and has different settings. It should work with all pjsip devices. Did you try this: from the doorbells-general channel on discord

And for the rfid issue.

TECH7Fox avatar Sep 13 '22 21:09 TECH7Fox

I'm new at discord and unable to access this channel, unfortunately... links are useless without invitation to channel, as I understand. My discord id is ratnet#7706, please help to join this channel. Thanks in advance!

UPDATE: - I found the invitation at HA threads

VitalyIak avatar Sep 14 '22 07:09 VitalyIak

And for the rfid issue.

Thanks for workaround, but this workaround only for add RFID cards, it's totally impossible to manage - delete and view current set of cards, unfortunately.

VitalyIak avatar Sep 14 '22 07:09 VitalyIak

it's totally impossible to manage - delete and view current set of cards

Also not on Home Assistant with the dahua integration?

TECH7Fox avatar Sep 14 '22 11:09 TECH7Fox

Also not on Home Assistant with the dahua integration?

Yes, unfortunatelly there is no options to manage RFID cards in case of external SIP server. I suppose - may be it's possible to export/import settings and manually change information about cards, but it's very uncomfortable workaround. Concern PJSIP+Dahua i can conclude following things: for succesfull and right registration it's mandatory to use contact_user=9901#0 at registration

[9901] type=registration transport=transport-udp outbound_auth=9901 server_uri=sip:192.168.1.30:5060 client_uri=sip:9901#[email protected]:5060 retry_interval=60 contact_user=9901#0

but, there is a bug at Dahua firmware and call from SIP via asterisk with PJSIP it's impossible to perform because: asterisk reports error: No joint capabilities for 'audio' media stream between our configuration((ulaw)) and incoming SDP((h264)) this problem reproduced, because Dahua VTO panel at SDP packets provide video information before aodio, and asterisk developers said that it's a problem... But Dahua doesn't hurry up to fix it ))) more info - here Just for information and your consideration. I'll try to use flexisip and freeswitch instead of asterisk...

VitalyIak avatar Sep 19 '22 19:09 VitalyIak

Hello, I'm exactly on the same situation, I've a VTO's alreday configured to connect with PJSIP but due the issue already mentioned by VitalyIak, I can't get video from doorbell. With legacy SIP it works, it will be really helpfull to have at least the possibility to enable legacy SIP.

E-NINA avatar Oct 19 '22 23:10 E-NINA

I have zero experience with the Asterisk code base, but if someone can come up with a patch for making pjsip work with VTO, we can add the patch to the add-on.

felipecrs avatar Nov 01 '22 03:11 felipecrs

@TECH7Fox @felipecrs Is there any possibility to have Dahua VTO doorbell working with video (both ways call A->B and B->A) with asterisk as client or server to Dahua. If yes could you post some configuration how to do it? I have try many ways with addon:

  • VTO to Asterisk (type: endpoint)
  • Asterisk to VTO (type: registration) Still no luck with video from VTO at all. Everything works (including video) between ha-card, linphone or microsip.

banny310 avatar Nov 02 '22 23:11 banny310

I totally agree as it would help to make Dahua VTO compatible. See explanations https://ipcamtalk.com/threads/dahua-ip-intercom-vto3211d-p2-new-p-p4-door-station-experience-review-firmware-support.26820/post-470664

chan_sip configuration files are present in the asterix folder tree of the module. Why not setting a default configuration file for chan_sip with different ports (5260 for example) and adding the module chan_sip.so to the add-on BUT disabling it in modules.conf ?

It would be enabled manually.

bdherouville avatar Dec 16 '22 17:12 bdherouville

Yes, this is doable and also acceptable. PRs are welcome.

felipecrs avatar Dec 16 '22 17:12 felipecrs

I can work on the sip.conf file but I don't know how to enable sip module into the add-on.

bdherouville avatar Dec 16 '22 17:12 bdherouville

You can get inspiration from this:

  • https://github.com/TECH7Fox/asterisk-hass-addons/pull/112

felipecrs avatar Dec 16 '22 17:12 felipecrs

After upgrading Asterisk to 20, add-on version 2.3.4, everything seems to be working with my VTO using PJSIP. Can someone else please also confirm?

https://github.com/TECH7Fox/asterisk-hass-addons/pull/199#issuecomment-1360463374

felipecrs avatar Dec 20 '22 23:12 felipecrs

After upgrading Asterisk to 20, add-on version 2.3.4, everything seems to be working with my VTO using PJSIP. Can someone else please also confirm?

https://github.com/TECH7Fox/asterisk-hass-addons/pull/199#issuecomment-1360463374

Glad to hear that. Can you share your doorbell model and your firmware version?

bdherouville avatar Dec 21 '22 06:12 bdherouville

VTO2202F-P-S2 V4.600.0000000.0.R.220813

Do not change the codec using the ONVIF method, otherwise it will not work. If you did, just do a factory reset.

felipecrs avatar Dec 22 '22 00:12 felipecrs

VTO2202F-P-S2 V4.600.0000000.0.R.220813

Do not change the codec using the ONVIF method, otherwise it will not work. If you did, just do a factory reset.

Even by starting by a brand new firmware installation it does not work. I start to think that my model has something special.

bdherouville avatar Dec 22 '22 09:12 bdherouville

If you want to try with chan_sip, clone the repository in your /addons folder, and do a git checkout v1.3.3. Then it will show up in your addon store as a local addon.

felipecrs avatar Dec 22 '22 12:12 felipecrs

Thank you, in the mean time I opened a ticket to dahua support.

bdherouville avatar Dec 22 '22 12:12 bdherouville

Closing this since VTOs now appears to work with Asterisk 20. Tested by me and @bdherouville. If someone else face issues, let us know.

felipecrs avatar Dec 22 '22 23:12 felipecrs

:( It's 2 week or 3 now since i'm trying to make my VTO working. It's a old one... vto2111d first generation and works fine on freepbx with chansip and and also pjsip (asterisk 13). When moved the same configuration on latest addon i can see video but no audio is passing (local, no nat). I've also tried every config, the wiki one, the discord one etc. Video ok but no audio :(

I thinks it could be usefull add chan_sip on another port for who has a old dahua device.

Condorello avatar Feb 18 '23 18:02 Condorello

Maybe you should also report this issue to Asterisk.

felipecrs avatar Feb 18 '23 18:02 felipecrs