FreePBX 2.5.1.5
Asterisk 1.4.25.1
We’d like to check inbound calls (SIP/VSP-TRUNK) against NPA-NAA DBGET/DB_EXISTS and then pass them on or not – whitelisting. A little custom dialplan fragment DB() stuff, but …
Where in the freePBX dailplan framework is the correct/appropriate place to “hook” into the incoming sip/trunk callflow as well as the appropriate return-to point?
We’ve looked at from-trunk and watched asterisk -r, but it really isn’t clear to us. Other then hijacking the [app-blacklist-check] context.
Any guidance (or dialplan examples) would be appreciated.
Our VSP is voicenetwork.ca and per their configuration examples their TRUNK PEER DETAILS is as follows. It’s their guidance for a “trixbox” trunk config and works for non-trix freePBX installs. The “from-trunk” context is first cited here.
Where TRUNK NAME is VNCA-OUT (outbound “friend”)
------TRUNK PEER DETAILS----
nat=yes
disallow=all
host=sipgw.voicenetwork.ca
context=from-trunk
allow=ulaw
type=friend
username=<our_account>
fromuser=<our_account>
sendrpid=yes
qualify=yes
canreinvite=no
insecure=port,invite
secret=<63-bytes of secret>
TRUNK NAME VNCA-IN (inbound “peer”)
-----TRUNK USER DETAILS-----
type=peer
host=sipgw.voicenetwork.ca
qualify=yes
canreinvite=no
disallow=all
context=from-trunk
allow=ulaw
Thanks,