[arm-allstar] SIP

Chris Viningre chris at ws5b.com
Wed Mar 3 21:01:36 EST 2021


I'm trying to configure hamvoip to receive incoming calls. I'm using voip.ms
and my extension for my node is registered on voip.ms. When I call my DID
number and enter the extension it hangs up. If I call the extension from my
phone it goes to a busy signal.

extension.conf with passwords x out
[general]

static=yes       ; These two lines prevent the command-line interface
writeprotect=yes ; from overwriting the config file. Leave them here.

[globals]
HOMENPA=915

[default]
exten => i,1,Hangup

[radio-secure]
exten => 43934,1,rpt,43934
exten => 46039,1,rpt,46039

[radio-secure-proxy]
exten => 43934,1,rpt,43934|X
exten => _0X.,1,Goto(allstar-sys|${EXTEN:1}|1)

; IAXRPT Windows

[radio-iaxrpt]
exten=43934,1,Rpt,43934|X
exten=46039,1,Rpt,46039|X

; The following stanza is to be used for Android/Iphone
; connections. Please configure the node number for the
; node on this server you want to connect to.
; The callerID name is configured and returned from
; your phone. It is typically your call.

[phone-iaxrpt]    ;;; Stanza is the context from iax.conf
exten => 43934,1,Answer
exten => 43934,n,Playback,rpt/node
exten => 43934,n,Playback,digits/4
exten => 43934,n,Playback,digits/3
exten => 43934,n,Playback,digits/9
exten => 43934,n,Playback,digits/3
exten => 43934,n,Playback,digits/4
exten => 43934,n,Set(CALLERID(num)=0)
exten => 43934,n,Rpt,43934|P|${CALLERID(name)} ;;; The "CallerID" from
IAXRpt

[radio-connect]
> >> exten => 595,1,Wait(1)
> >> exten => 595,n,Dial(SIP/telephone_dialin:Mbikes3#@192.168.1.169/43934)
> >> exten => 595,n,Hangup
> >>
> >> exten => 596,1,Wait(1)
> >> exten => 596,n,Dial(SIP/
> >> telephone_dialin:224273_43934:xxxxx at 192.168.1.169:4568/43934
> >> exten => 596,n,Hangup
> >>
> >> And this stanza is in my Allstar  iax.conf on BOTH of the servers at
the
> >> local IP addresses above.
> >>
> >> [telephone_dialin]
> >> type=user
> >> secret=xxxxx
> >> disallow=all
> >> allow=ulaw
> >> allow=g726aal2
> >> allow=gsm
> >> codecpriority=host
> >> context=radio-control
> >> transfer=no

[radio-control]
> >> exten=43934,1,Answer
> >> exten=43934,n,Playback(rpt/node)
> >> exten=43934,n,Playback(digits/4)
> >> exten=43934,n,Playback(digits/3)
> >> exten=43934,n,Playback(digits/9)
> >> exten=43934,n,Playback(digits/3)
> >> exten=43934,n,Playback(digits/4)
> >> exten=43934,n,Playback(rpt/connected)
> >> exten=43934,n,Rpt,43934|Pv

; To make this have a static callerID name if your phone
; app does not support callerID change the last line to this
; and specify the name (usually CALL) in place of static-name.

;exten => 43934,n,Rpt,1998|P|"static-name"

; Autopatch example lines. Must be configured and
; SIP or IAX phone connections configured to work.

[pstn-out]
exten=_NXXNXXXXXX,1,playback(ss-noservice)
exten=_NXXNXXXXXX,2,Congestion

[invalidnum]
exten=s,1,Wait,3
exten=s,n,Playback,ss-noservice
exten=s,n,Wait,1
exten=s,n,Hangup

[radio]
exten=_X11,1,Goto(check_route|${EXTEN}|1);
exten=_NXXXXXX,1,Goto(check_route|1${HOMENPA}${EXTEN}|1)
exten=_1XXXXXXXXXX,1,Goto(check_route|${EXTEN}|1)

[check_route]
; no 800
exten=_1800NXXXXXX,2,Goto(invalidnum|s|1)
exten=_1888NXXXXXX,2,Goto(invalidnum|s|1)
exten=_1877NXXXXXX,2,Goto(invalidnum|s|1)
exten=_1866NXXXXXX,2,Goto(invalidnum|s|1)
exten=_1855NXXXXXX,2,Goto(invalidnum|s|1)
; no X00 NPA
exten=_1X00XXXXXXX,2,Goto(invalidnum|s|1)
; no X11 NPA
exten=_1X11XXXXXXX,2,Goto(invalidnum|s|1)
; no X11
exten=_X11,2,Goto(invalidnum|s|1)
; no 555 Prefix in any NPA
exten=_1NXX555XXXX,2,Goto(invalidnum|s|1)
; no 976 Prefix in any NPA
exten=_1NXX976XXXX,2,Goto(invalidnum|s|1)
; no NPA=809
exten=_1809XXXXXXX,2,Goto(invalidnum|s|1)
; no NPA=900
exten=_1900XXXXXXX,2,Goto(invalidnum|s|1)

; okay, route it
exten=_1NXXXXXXXXX,1,Goto(pstn-out|${EXTEN:1}|1)
exten=_X.,2,Goto(invalidnum|s|1)

; End autopatch example

; Following stanza required for web transceiver access

[allstar-public]

exten => s,1,Ringing
exten => s,n,Set(RESP=${CURL(
https://register.allstarlink.org/cgi-bin/authwebphone.pl?${CALLERID(name)})
})
exten => s,n,Set(NODENUM=${CALLERID(number)})
exten => s,n,GotoIf($["${RESP:0:1}" = "?"]?hangit)
exten => s,n,GotoIf($["${RESP:0:1}" = ""]?hangit)
exten => s,n,GotoIf($["${RESP:0:5}" != "OHYES"]?hangit)
exten => s,n,Set(CALLSIGN=${RESP:5})
exten => s,n,Wait(3)
exten => s,n,Playback(rpt/node|noanswer)
exten => s,n,Saydigits(${NODENUM})
exten => s,n,Set(CALLERID(num)=0)
exten => s,n,Set(CALLERID(name)=${CALLSIGN})
exten => s,n,Rpt(${NODENUM}|X)
exten => s,n,Hangup
exten => s,n(hangit),Answer
exten => s,n(hangit),Wait(1)
exten => s,n(hangit),Hangup

exten => 9999,1,Goto(allstar-public|s|1)

; end web transceiver stanza

; Following stanza required for phone access

[allstar-sys]

exten => _x.,1,Ringing
exten => _x.,n,Wait(3)
exten => _x.,n,Answer
exten => _x.,n,Playback(rpt/node)
exten => _x.,n,Saydigits(${EXTEN:1})
exten => _x.,n,Rpt(${EXTEN:1}|P|${CALLERID(name)}-P)
exten => _x.,n,Hangup

; end phone access stanza

; The blacklist and whitelist stanzas below are used to allow or ban nodes
; from connecting. Only one can be selected at a time as defined in the
; [radio] stanza of iax.conf
;
; The best way to allow or ban nodes from the database is to
; use the Supermon application or the node-ban-allow.sh script.
;
; No changes need to be made to these stanzas. See comments in iax.conf.

[blacklist]
exten => _XXXX!,1,NoOp(${CALLERID(num)})
exten =>
_XXXX!,n,GotoIf($[${DB_EXISTS(blacklist/${CALLERID(num)})}]?blocked)
exten => _XXXX!,n,Goto(radio-secure,${EXTEN},1)
exten => _XXXX!,n(blocked),Hangup

[whitelist]
exten => _XXXX!,1,NoOp(${CALLERID(num)})
exten => _XXXX!,n,NoOp(${IAXPEER(CURRENTCHANNEL)})
exten => _XXXX!,n,GotoIf($["${IAXPEER(CURRENTCHANNEL)}" =
"127.0.0.1"]?radio-secure,${EXTEN},1)  ;permit local IPs
exten =>
_XXXX!,n,GotoIf($[${DB_EXISTS(whitelist/${CALLERID(num)})}]?radio-secure,${EXTEN},1)
exten => _XXXX!,n,Hangup

; Stanza to get node number and pass to saydns.sh script in rpt.conf
[saydns]
exten => _xxx.,1,System(/usr/local/sbin/saydns.sh ${EXTEN})
exten => _xxx.,n,Hangup()

; Example connection to another Asterisk server
; and passing an extension

; [pbx_server]
;exten => _1NXXNXXXXXX,1,Dial(IAX2/pbx/${EXTEN})
;exten => _NXXNXXXXXX,1,Dial(IAX2/pbx/${EXTEN})
;exten => _NXX,1,Dial(IAX2/pbx/${EXTEN})
;exten => _NX,1,Dial(IAX2/pbx/${EXTEN})

#includeifexists custom/extensions.conf

[mycontext]
; Make sure to include inbound prior to outbound because the _NXXNXXXXXX
handler will match the incoming call and create a loop
include => voipms-inbound
include => voipms-outbound

[voipms-outbound]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@voipms)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@voipms)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@voipms)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@voipms)
exten => _00.,n,Hangup()

; inbound context example for your DID numbers, do not add the number 1 in
front

[voipms-inbound]
exten => 9152014604,1,Answer() ;your DID

sip.conf with password x out

[general]
register => 224273_43934:xxxxx at dallas2.voip.ms:5060

context=default ; Default context for incoming calls
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; Note: Asterisk only uses the first host
; in SRV records
; Disabling DNS SRV lookups disables the
; ability to place SIP calls based on domain
; names to some other SIP users on the Internet

[voipms]
canreinvite=nonat
context=mycontext
host=dallas2.voip.ms ;(one of our multiple servers, you can choose the one
closer to your location)
type=peer
disallow=all
allow=ulaw
; allow=g729 ; uncomment if you support g729
nat=yes



-- 
Chris Viningre
Website: ws5b.com <http://ws5b.com>
Email: chris at ws5b.com <chris at ws5b.com>


More information about the ARM-allstar mailing list