[arm-allstar] reverse autopatch and local phone extension

Gary Dion gdion at engineer.com
Fri Nov 10 12:22:56 EST 2017


Adding to Doug's reply, here is how I connected a SIP phone directly to my Allstar node (no separate PBX is necessary).
 
I placed basically the same code as Doug into extensions.conf on my node:

[radio-control]
exten=43710,1,Answer
exten=43710,n,Playback(rpt/node)
;exten=43710,n,Playback(letters/n)
;exten=43710,n,Playback(digits/4)
;exten=43710,n,Playback(letters/t)
;exten=43710,n,Playback(letters/x)
;exten=43710,n,Playback(letters/i)
exten=43710,n,Playback(digits/4)
exten=43710,n,Playback(digits/3)
exten=43710,n,Playback(digits/7)
exten=43710,n,Playback(digits/1)
exten=43710,n,Playback(digits/0)
exten=43710,n,Playback(rpt/connected)
;exten=43710,n,rpt(43710|S)  ; S = Simple exten... single * to key and # (or * again) to unkey (no other control)
exten=43710,n,rpt(43710|P)   ; P = Phone exten... *99 to key and # to unkey (but with full control)
;exten=43710,n,rpt(43710|Pv) ; Pv = Phone VOX exten


I also placed this in extensions.conf on the node instead of on the separate PBX:

[from-ata]
exten => 595,1,Wait(1)
exten => 595,n,Dial(IAX2/telephone_dialin:<secret>@127.0.0.1/<my_node_number>)
exten => 595,n,Hangup


I used Doug's code verbatim in the node iax.conf file... <secret> here is same password as as above:

[telephone_dialin]
type=user
secret=<secret>
disallow=all
allow=ulaw
allow=g726aal2
allow=gsm
codecpriority=host
context=radio-control
transfer=no


Then I added this stanza to the sip.conf file with the details to register my SIP phone/ata, which then points it to the "from-ata" stanza from above:

[lineone]
type=friend
secret=passwordone
host=dynamic
context=from-ata


And finally, I edited modules.conf and placed a semicolon before "noload=chan_sip.so" to enable SIP:

;noload=chan_sip.so


On reload using astres.sh, I was able to register my SIP phone with user: lineone, and password: passwordone.

If you find that the node is not recognizing your DTMF keypad presses, you may need to configure your phone/ata to use "RFC2833" for DTMF handling instead of "in-audio" - which I found did not work.

Hope this helps!
73, Gary, N4TXI


-------------------
On Fri, Nov 3, 2017 at 11:18 PM, "Doug Crompton via arm-allstar" <
arm-allstar at hamvoip.org> wrote:

Bob,

 I should do a howto on this as others have asked. Here is what I do here.
First of all this is based on two separate Asterisk systems, My home PBX
which is nothing more than the Asterisk portion of the Allstar code running
on a Pi, and one of my Allstar servers. My phone PBX runs my phones at two
homes and uses voip.ms for outgoing and incoming calls. I have been using
Asterisk long before I was using Allstar as my phone PBX. This example uses
IAX between two Asterisk systems, one the PBX and the other an Allstar
server. The same thing with connection variations should work with SIP but
SIP is a lot more fussy especially going through NAT.

In extensions.conf of the PBX -

[radio-connect]
exten => 595,1,Wait(1)
exten => 595,n,Dial(IAX2/telephone_dialin:<secret>@<IP_ADDRESS>/27225)
exten => 595,n,Hangup

<secret> and <IP_ADDRESS> without < or >

In iax.conf of the Allstar server you wish to connect to.

[telephone_dialin]
type=user
secret=<secret>
disallow=all
allow=ulaw
allow=g726aal2
allow=gsm
codecpriority=host
context=radio-control
transfer=no

In extensions.conf of the same Allstar server.

[radio-control]
exten=27225,1,Answer
exten=27225,n,Playback(rpt/node)
;exten=27225,n,Playback(letters/w)
;exten=27225,n,Playback(letters/a)
;exten=27225,n,Playback(digits/3)
;exten=27225,n,Playback(letters/d)
;exten=27225,n,Playback(letters/s)
;exten=27225,n,Playback(letters/p)
exten=27225,n,Playback(digits/2)
exten=27225,n,Playback(digits/7)
exten=27225,n,Playback(digits/2)
exten=27225,n,Playback(digits/2)
exten=27225,n,Playback(digits/5)
exten=27225,n,Playback(rpt/connected)
exten=27225,n,Rpt,27225|S

What this does
----------------------

A phone is picked up and extension 595 is dialed. The extensions can be
whatever you want within your PBX system. This sends a connect to the IP
address of the Asterisk server via IAX at the IP address, with the Password
(secret) and the node number. This brings us down to the Allstar server.
The message comes in on IAX to the telephone_dialin stanza. If the PW is
correct it accepts it and passed it to the context radio-control in
extensions.conf. This stanza then plays back the connect message and and
completes the connection to the specified node. At this point VOX is used
to control PTT and it actually works quite well.

The IP address can be local, which it is my case, or anywhere on the
Internet. Of course the other end has to have the IAX port forwarded to the
Allstar server if it is behind NAT. Of course you would specify your node
in place of the 27225's shown above.

Also this is a simplified method with a fixed node for an extension. You
could write an extension that would ask for a node number and then attempt
connects to multiple systems local or remote or have multiple extensions
each connecting to a different node.

Also this could conceivably be in one system - Allstar and PBX in one
system in which case all of the examples above would be put into the one
server. I prefer to keep them separate


*73 Doug*

*WA3DSP*

*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*




On Fri, Nov 3, 2017 at 10:33 PM, "Robert Conklin via arm-allstar" <
arm-allstar at hamvoip.org> wrote:

> Greetings everyone. I am seeking information on how I can set up access to
> one of my nodes using viop phone as an extension into the repeater. Would
> like to be able to transceive or just monitor node activity from the phone.
> Thank you for any and all advice!
>
> --
> Robert Conklin
> *N4WGY <http://qrz.com/db/N4WGY>*
> _______________________________________________
>
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>



More information about the arm-allstar mailing list