Asterisk newbie needs help adding an extension

So I’ve got an Asterisk server running in my Home Assistant and a Dahua VTO doorbell.

Now I want to add also a Dahua VTH touch screen.

Let’s say the VTO has SIP number 8001 and I want to add the VTH that has SIP number 9902 what shall I enter in the files below please?

pjsip_custom.conf:

; Place your own extensions here.

[8001]

type = endpoint

context = default

disallow = all

allow = alaw,ulaw

allow = h264

direct_media_method = invite

dtmf_mode = info

callerid = "Doorbell" <8001>

force_rport = no

aors = 8001

auth = auth8001

[8001]

type = aor

max_contacts = 1

[auth8001]

type = auth

auth_type = userpass

password = ******

username = 8001

extensions.conf:

; Note: this file has been modified from the Asterisk defaults for the add-on

[general]

static=yes

[default]

exten => 9901,1,NoOp()

same => n,Answer()

same => n,Hangup()

;

include => parkedcalls

;

exten => 444,1,Park(,s)

;

exten => 555,1,ParkedCall(default,701)

;

exten => _X!,1,Dial(${PJSIP_DIAL_CONTACTS(${EXTEN})})

;

;extension for dialing chan_sip devices.

;exten => _X!,1,Dial(SIP/${EXTEN})

[parkedcallstimeout]

exten => s,1,Hangup()

Do the same thing you did for xt8001 for the new xt9902 in pjsip.conf, just make the necessary changes to indicate its a new extension.

e.g.

[9902] type = endpoint context = default disallow = all allow = alaw,ulaw allow = h264 direct_media_method = invite dtmf_mode = info callerid = “VTH” <9902> force_rport = no aors = 9902 auth = auth9902 [9902] type = aor max_contacts = 1 [auth9902] type = auth auth_type = userpass password = ****** username = 9902

1 Like

Thank you.

Therefore nothing to add to extensions.conf? :thinking:

You need to modify extensions.conf as well to be able to dial the new extension.

Only you can answer that, as that file doesn’t exist, and isn’t referenced, in a standard installation of Asterisk.

It is both in FreePBX, but you would normally add extension using the GUI, and they would end up spread across several .conf files, all of which should only be manipulated through the GUI.

If this is the case, you should be using https://community.freepbx.org/ for peer support.

Oh I see.

Well I have to stick with that Home Assistant Asterisk integration because it’s the only SIP solution that I got working successfully.

Thanks for clearing things out.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.