Password protect and other question

Hello to all, I have two questions about my configuration files. The first is how to use more than one port to do calls to the outside (I have a b410p with 4 ISDN ports). And the second is how can I protect with a password the calls, how to do that when a person wants to do a call to the pstn, must mark a password before.

Thank you, I attach my extensions.conf.

extensions.conf

[dosarcos]
include => oficina
include => to_isdn
include => from_isdn

[oficina]

exten => 666,1,Dial(SIP/ramon,15)
exten => 666,2,Hangup

exten => 6001,1,Dial(SIP/guillermo,15)
exten => 6001,2,Hangup

exten => 6002,1,Dial(SIP/pablo,15)
exten => 6002,2,Hangup

exten => 6003,1,Dial(SIP/jesus,15)
exten => 6003,2,Hangup

exten => 6004,1,Dial(SIP/enrique,15)
exten => 6004,2,Hangup

exten => 6005,1,Dial(SIP/miguel,15)
exten => 6005,2,Hangup

exten => 6006,1,Dial(SIP/yolanda,15)
exten => 6006,2,Hangup

exten => 6007,1,Dial(SIP/aguistin,15)
exten => 6007,2,Hangup

exten => 6008,1,Dial(SIP/alonso,15)
exten => 6008,2,Hangup

exten => 6009,1,Dial(SIP/rafael,15)
exten => 6009,2,Hangup

exten => 6010,1,Dial(SIP/luis,15)
exten => 6010,2,Hangup

exten => 6011,1,Dial(SIP/juanma,15)
exten => 6011,2,Hangup

exten => 6012,1,Dial(SIP/ruben,15)
exten => 6012,2,Hangup

exten => 6013,1,Dial(SIP/antonio,15)
exten => 6013,2,Hangup

exten => 6014,1,Dial(SIP/ignaciop,15)
exten => 6014,2,Hangup

exten => 6015,1,Dial(SIP/manuel,15)
exten => 6015,2,Hangup

exten => 6016,1,Dial(SIP/ignaciol,15)
exten => 6016,2,Hangup

exten => 501,1,Dial(SIP/recepcion1,60)
exten => 501,2,Hangup

exten => 502,1,Dial(SIP/recepcion2,60)
exten => 502,2,Hangup

exten => 503,1,Dial(SIP/administracion,60)
exten => 503,2,Hangup

exten => 504,1,Dial(SIP/direccion,60)
exten => 504,2,Hangup

exten => 505,1,Dial(SIP/fernando,60)
exten => 505,2,Hangup

exten => 505,1,Dial(SIP/fernando,60)
exten => 505,2,Hangup

exten => 506,1,Dial(SIP/recepcion3,60)
exten => 506,2,Hangup

exten => 508,1,Dial(SIP/rrpp,60)
exten => 508,2,Hangup

exten => 509,1,Dial(SIP/gabinete2,60)
exten => 509,2,Hangup

exten => 510,1,Dial(SIP/laboratorio,60)
exten => 510,2,Hangup

exten => 511,1,Dial(SIP/general,60)
exten => 511,2,Hangup

exten => 512,1,Dial(SIP/medicacion,60)
exten => 512,2,Hangup

exten => 513,1,Dial(SIP/atencion,60)
exten => 513,2,Hangup

exten => 514,1,Dial(SIP/control,60)
exten => 514,2,Hangup

exten => 515,1,Dial(SIP/quirofano1,60)
exten => 515,2,Hangup

exten => 516,1,Dial(SIP/quirofano2,60)
exten => 516,2,Hangup

exten => 517,1,Dial(SIP/consulta1,60)
exten => 517,2,Hangup

exten => ramon,1,goto(666,1)
exten => guillermo,1,goto(6001,1)
exten => pablo,1,goto(6002,1)
exten => jesus,1,goto(6003,1)
exten => enrique,1,goto(6004,1)
exten => miguel,1,goto(6005,1)
exten => yolanda,1,goto(6006,1)
exten => agustin,1,goto(6007,1)
exten => alonso,1,goto(6008,1)
exten => rafael,1,goto(6009,1)
exten => luis,1,goto(6010,1)
exten => juanma,1,goto(6011,1)
exten => ruben,1,goto(6012,1)
exten => antonio,1,goto(6013,1)
exten => ignaciop,1,goto(6014,1)
exten => manuel,1,goto(6015,1)
exten => ignaciol,1,goto(6016,1)
exten => recepcion1,1,goto(501,1)
exten => recepcion2,1,goto(502,1)
exten => administracion,1,goto(503,1)
exten => direccion,1,goto(504,1)
exten => fernando,1,goto(505,1)
exten => recepcion3,1,goto(506,1)
exten => rrpp,1,goto(508,1)
exten => gabinete2,1,goto(509,1)
exten => laboratorio,1,goto(510,1)
exten => general,1,goto(511,1)
exten => medicacion,1,goto(512,1)
exten => atencion,1,goto(513,1)
exten => control,1,goto(514,1)
exten => quirofano1,1,goto(515,1)
exten => quirofano2,1,goto(516,1)
exten => consulta1,1,goto(517,1)

[to_isdn]
exten => _9.,1,Dial(misdn/1/${EXTEN:1},60,th)

[from_isdn]
exten => s,1,Dial(SIP/recepcion1,30)
exten => s,2,Hangup
exten => s,1,Dial(SIP/recepcion2,30)
exten => s,2,Hangup

Anyone knows how to do it?

Put all the ports of the isnd card in the same group, adding the parameter “group=1” in the definition of every isdn port and change the dial plan to something like this:

[to_isdn]
exten => _9.,1,Read(PASS,password_announce,4,1,3)
exten => _9.,2,GotoIf($[${LEN(${PASS})} > 0 ]?3:5)
exten => _9.,3,GotoIf($[${PASS} = 1234 ]?4:5)
exten => _9.,4,Dial(misdn/g1/${EXTEN:1},60,th)
exten => _9.,5,Hangup

Hope it helps.

Regards.

Thank you mbruni, but one more question… :smiley:

In my misdn.conf where must I add the parameter “group=1”

That is my misdn.conf

misdn.conf

[general]
debug=0
bridging=no

[default]
context=misdn
language=en
senddtmf=yes
nationalprefix=0
internationalprefix=00
rxgain=0
txgain=0
method=standard
dialplan=0
localdialplan=0
cpndialplan=0
echocancel=yes

[outgoing]
ports=1,2,3,4
context=from_isdn
msns=*
callgroup=1
pickupgroup=1
always_immediate=yes

Thank you again for your help.

Sorry, the parameter should be “callgroup”, not “group”, in the “outgoing” context there is callgroup=1, so you should be able to dial out using one of the 4 ports using Dial(misdn/g1/${EXTEN:1},60,th), g1 means group 1.

Bye.

Hello mbruni, I have tried the solution that you told to me, but it doesn´t work. Any more ideas?

Thank you

Could you please post your misdn.conf, extensions.conf and the * cli output of a test call to see what happens ?

Bye.