Sunday, November 8, 2009

Asterisk (PBX) and PAP2T

  1. hasexten=yes|no
    If the context for a peer sets hasexten=yes, Asterisk creates a hint for the user in the default context as shown below for a SIP peer 6000.
    CLI> dialplan show default
    [ Context 'default' created by 'pbx_config' ]
    '6000' => hint: SIP/6000 [pbx_config]
    1. Dial(${HINT}) [pbx_config]

    Therefore I can use Goto(default,6000,1) to ring it
  2. [general] user in users.conf
    It's set the default contexts for all other users. They can be overridden though. The following are in my [general] user (all my users are using SIP):
    fullname = My Name
    ;
    ; Starting point of allocation of extensions
    ;
    userbase = 6000
    ;
    ; Create SIP Peer
    ;
    hassip = yes
    ;
    ; Create IAX friend
    ;
    hasiax = no
    registeriax = no
    ;
    ; Create manager entry
    ;
    hasmanager = no
    callwaiting = yes
    threewaycalling = yes
    callwaitingcallerid = yes
    transfer = yes
    canpark = yes
    cancallforward = yes
    callreturn = yes
    call-limit = 100
    qualify = yes
    disallow = all
    allow = ulaw,alaw
    type = friend
  3. Asterisk directed call pickup
    I have two extensions: 6000 and 8888. Typically when there's a incoming call, only extension 6000 rings. I can pick up the call from the other extension though by pressing the # key from extension 8888. Therefore I have the following in features.conf
    [general]
    pickupexten = #

    and the following in extensions.conf:
    [globals]
    voipbuster = SIP/voipbuster

    [CallingRule_pickup]
    exten = _#,1,Pickup(6000@default)
    exten = _#,n,Hangup()

    [DLPN_8888]
    include = CallingRule_pickup
    include = CallingRule_VBOut
    include = default

    [CallingRule_VBOut]
    exten => _001.,1,Dial(Local/${EXTEN:2}@gv-outbound/n)
    exten => _00[2-9]X.,1,Macro(trunkdial-failover-0.3,${voipbuster}/${EXTEN:0},,voipbuster,)

    I had to add the following to the Dial Plan of the line that will pickup the call in my PAP2T to pass # key directly to Asterisk: #S0
  4. Blind transfer
    I use the * key for Blind transfer. Therefore I have the following in features.conf
    [featuremap]
    blindxfer = *
    and the following in extensions.conf:
    [globals]
    DIALOPTIONS = tT

    [DLPN_6000]
    include = CallingRule_VBOut
    include = default
    include = parkedcalls
    include = conferences
    include = ringgroups
    include = voicemenus
    include = queues
    include = voicemailgroups
    include = directory
    include = pagegroups
    include = page_an_extension
    exten = _*,1,Transfer(8888)

    I had to add the following to the Dial Plan of the line that will initiate the transfer in my PAP2T to pass * key directly to Asterisk: *S0
  5. Connecting PAP2T to the telephone lines 1&2 in my house (T568A type socket): I cut one standard 2-wire RJ11 telephone cable assembly in half and connected them to Blue and Orange lines of the T568A. That will enable me to connect a phone onto the wall outlet at any room to my PAP2T.

No comments: