Reply To: RE: Problems configuring a callcentric trunk

VitalPBX Community Support General Discussion Problems configuring a callcentric trunk Reply To: RE: Problems configuring a callcentric trunk

    Tom
    Participant
    Up
    0
    Down

    Hi,

     

    It looks like this is a callcentric thing. In doing a little more research I found the following in the freepbx dialplan:

    ;——————————————————————————-
    ; from-pstn-to-did:
    ;
    ; The context is designed for providers who send the DID in the TO: SIP header
    ; only. The format of this header is:
    ;
    ; To: <sip:2125551212@172.31.74.25>
    ;
    ; So the DID must be extracted between the sip: and the @, which this does
    ;
    [from-pstn-toheader]
    exten => _.,1,NoOp(Attempting to extract DID from SIP To header)
    exten => _.,n,gotoif($[“${CHANNEL(channeltype)}”=”SIP”]?SIP)
    exten => _.,n,gotoif($[“${CHANNEL(channeltype)}”=”PJSIP”]?PJSIP)
    exten => _.,n,NoOp(Unable to determine SIP channel type)
    exten => _.,n,goto(from-pstn,${EXTEN},1))
    exten => _.,n(SIP),Goto(from-pstn,${CUT(CUT(SIP_HEADER(To),@,1),:,2)},1)
    exten => _.,n(PJSIP),Goto(from-pstn,${CUT(CUT(PJSIP_HEADER(read,To),@,1),:,2)},1)

    ;——————————————————————————-

    It appears that this is what callcentric does. In free pbx I simply add “context=from-pstn-toheader” to the trunk configuration and all is well.

    What is the correct way to achieve something like this with vitalpbx?

    Regards,

     

    Tom

    0