CHAT NOW

Asterisk PJSIP Setup

1. Open the shell and edit the following information:

Your sip number: (xxxxxx)

Password: Your sip password found in My Account

101: The Asterisk extension number that is connected to the softphone/IP phone

Your PBX extension number: (xxx)

Standard setup example

Outgoing calls from the extension number 101 are routed to the trunk. Incoming calls are received by registration and are routed to extension number 101.

Editing pjsip.conf

                        
                        [udp-transport]
                        type=transport
                        protocol=udp
                        bind=0.0.0.0

                        [xxxxxx]
                        type=registration
                        transport=udp-transport
                        outbound_auth=xxxxxx_auth
                        server_uri=sip:voip.syd.spintel.net.au
                        client_uri=sip:xxxxxx@voip.syd.spintel.net.au
                        retry_interval=60
                        expiration=120
                        contact_user=xxxxxx

                        [xxxxxx_auth]
                        type=auth
                        auth_type=userpass
                        password=Password
                        username=xxxxxx

                        [xxxxxx]
                        type=aor
                        contact=sip:voip.syd.spintel.net.au

                        [xxxxxxx]
                        type=endpoint
                        transport=udp-transport
                        context=zadarma-in
                        disallow=all
                        allow=alaw
                        allow=ulaw
                        outbound_auth=_auth
                        aors=xxxxxx
                        from_user=xxxxxx
                        direct_media=no

                        [xxxxxx]
                        type=identify
                        endpoint=xxxxxx
                        match=voip.syd.spintel.net.au
                          
                        
                        
                        [udp-transport]
                        type=transport
                        protocol=udp
                        bind=0.0.0.0

                        [xxx]
                        type=registration
                        transport=udp-transport
                        outbound_auth=xxx_auth
                        server_uri=sip:yyyyyy-cust.spintel.net.au
                        client_uri=sip:xxx@yyyyyy-cust.spintel.net.au
                        retry_interval=60
                        expiration=120
                        contact_user=xxx

                        [xxx_auth]
                        type=auth
                        auth_type=userpass
                        password=Password
                        username=xxx

                        [xxx]
                        type=aor
                        contact=sip:yyyyyy-cust.spintel.net.au

                        [xxx]
                        type=endpoint
                        transport=udp-transport
                        context=zadarma-in
                        disallow=all
                        allow=alaw
                        allow=ulaw
                        outbound_auth=xxx_auth
                        aors=xxx
                        from_user=xxx
                        direct_media=no

                        [xxx]
                        type=identify
                        endpoint=xxx
                        match=yyyyyy-cust.spintel.net.au

                        
                        

Incoming and outgoing routing can be set up in the extensions.conf file

                            

                            [spintel-in]
                            exten => xxxxxx,1, Dial(PJSIP/101)                     ; all incoming calls from the trunk xxxxxx are routed to the extension number 101

                            [spintel-out]
                            exten => _XXX,1,Dial(PJSIP/${EXTEN})                   ; calls to 3-digit extension numbers of Asterisk
                            exten => _XXX.,1,Dial(PJSIP/${EXTEN}@xxxxxx)           ; calls to numbers with 4 digits or more via trunk

                            
                            

                            [spintel-in]
                            exten => xxx,1, Dial(PJSIP/101)                   ; all incoming calls from the trunk xxx are routed to the extension number 101

                            [spintel-out]
                            exten => _XXX,1,Dial(PJSIP/${EXTEN})                   ; calls to 3-digit extension numbers of Asterisk
                            exten => _XXX.,1,Dial(PJSIP/${EXTEN}@xxx)         ; calls to numbers with 4 digits or more via trunk

                            
                            

The standard setup is complete.