SIP trunk not working (PJSIP)

VitalPBX Community Support General Discussion SIP trunk not working (PJSIP)

  • Post
    sipper007
    Participant
    I’m

     

    Config information from my sip provider =>

    ;pjsip.conf
    ;———————–

    [global]
    type=global
    user_agent=Asterisk PBX
    max_initial_qualify_time=5

    [transport-udp]
    type=transport
    protocol=udp
    bind=0.0.0.0
    local_net=192.168.0.0/16
    local_net=127.0.0.1/32
    external_media_address=<EXTERNIP>
    external_signaling_address=<EXTERNIP>

    ;DEFAULTS
    [default-endpoint](!)
    type=endpoint
    transport=transport-udp
    disallow=all
    allow=g729
    allow=alaw
    allow=gsm
    direct_media=no
    ;rtp_symmetric=yes
    force_rport=yes
    ;rewrite_contact=yes

    [default-auth](!)
    type=auth
    auth_type=userpass

    [default-aor](!)
    type=aor
    max_contacts=1
    remove_existing=yes
    qualify_frequency=120

    ;CM Trunk inbound
    [cminbound](default-endpoint)
    context=from-cm (context name)
    aors=cminbound

    [cminbound]
    type=aor
    contact=sip:188.94.185.98
    contact=sip:188.94.185.99
    contact=sip:188.94.185.110
    contact=sip:31.169.58.10 ;legacy
    contact=sip:31.169.58.11 ;legacy
    qualify_frequency=60

    [cminbound]
    type=identify
    endpoint=cminbound
    match=188.94.185.98
    match=188.94.185.99
    match=188.94.185.110
    match=31.169.58.10
    match=31.169.58.11

    ;CM Trunk outbound
    [cm]
    type=registration
    transport=transport-udp
    outbound_auth=cm
    client_uri=sip:<USERNAME>@31.169.63.1:5060
    server_uri=sip:31.169.63.1:5060
    expiration=120
    auth_rejection_permanent = yes
    retry_interval = 0
    forbidden_retry_interval = 0
    max_retries = 9999

    [cm](default-auth)
    password=<PASSWORD>
    username=<USERNAME>

    [cm]
    type=aor
    contact=sip:31.169.63.1:5060
    qualify_frequency=60

    [cm](default-endpoint)
    context=from-cm
    outbound_auth=cm
    aors=cm

    [cm]
    type=identify
    endpoint=cm
    match=31.169.63.1

    ;extensions.conf
    ;———————–

    ;Outbound
    [to-cm]
    exten => _X.,1,NoOp(Oubound call from: ${CALLERID(all)} to: ${EXTEN})
    same => n,Dial(PJSIP/${EXTEN}@cm,,b(gosub-pjsipaddppi^s^1(${CALLERID(num)})))
    same => n,Hangup()

    ;Add outbound header
    [gosub-pjsipaddppi]
    exten => s,1,Set(PJSIP_HEADER(add,Preferred-Identity)=<sip:+${ARG1}@<EXTERNIP>)
    same => n,Return()

    ;Inbound
    [from-cm]
    exten => _+X.,1,NoOp(Inbound call from: ${CALLERID(all)} to: ${EXTEN})
    same => n,Answer()
    same => n,Hangup()

     

     

    Attachments:
    You must be logged in to view attached files.
    0
Viewing 2 replies - 1 through 2 (of 2 total)
  • Replies
    sipper007
    Participant
    Up
    0
    Down
    Who can help me?

    attached my bad config in vitalpbx and a working config in freepbx

    Attachments:
    You must be logged in to view attached files.
    0
    PitzKey
    Participant
    US
    Up
    0
    Down
    Try removing the contact. Also, I think you should never post your SIP creds online.
    0
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.