Newbie help please: Cause 20 - subscriber absent

Hello,

I’m new to asterisk and I’m trying to what should be a very simple task - make a call from my sip phone to an outside party using Asterisk as the gateway.

Asterisk version : 11.3.0
Running on: Ubuntu 12.10 X86_64
Service subscribed to: Voicepulse

My SIP phone seems to register fine with the asterisk server (no errors and says “reachable”).

I downloaded the quickstart examples from voicepulse and thought I made the correct changes to them - obviously, I didn’t.

When I try to make a call out from my sipphone, I get the following error on the CLI:

[Apr 7 14:20:09] WARNING[5271][C-00000009] chan_sip.c: Purely numeric hostname (), and not a peer--rejecting! [Apr 7 14:20:09] WARNING[5271][C-00000009] app_dial.c: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent) [Apr 7 14:20:09] WARNING[5271][C-00000009] pbx.c: The application delimiter is now the comma, not the pipe. Did you forget to convert your dialplan? (GotoIf(1?14045511212|GatewayB))

Here’s my sip.conf: (user/password edited)

[code] ;sip.confSample.txt

; Sample /etc/asterisk/sip.conf
;
;
; *** Trixbox and FreePBX users DO NOT USE THIS FILE
; *** See your account center for guides specific to your PBX
;
;
; Updated Feb 24, 2011 for general enhancements
; Updated Jun 13, 2008 to fix inbound legacy calls
; Updated Jul 9, 2008 to migrate to sjc/jfk
; Updated Aug 8, 2008 to be more SIP RFC compliant
;
; Copyright (c) 2003-2011 VoicePulse Inc.
; VoicePulse is a registered trademark of VoicePulse Inc.
;
; =========================================================
; QUICKSTART WITH VOICEPULSE CONNECT FOR ASTERISK
;
; * Login to your VoicePulse SIP PBX account:
;   https://www.voicepulse.com/secure/login.aspx
;
; * Go to the Setup tab to see your device login and
;   device password.  Your device login and passwords are
;   NOT THE SAME AS YOUR WEBSITE LOGIN AND PASSWORD.
;
; * Do a text search & replace in this file:
;   - Replace MY_DEVICE_LOGIN with your device login
;   - Replace MY_DEVICE_PASSWORD with your device password
;
; =========================================================


; ---------------------------------------------------------
; GENERAL SETTINGS
;
; ---------------------------------------------------------

; .........................................................
; REGISTER WITH VOICEPULSE
;
; You should register to the datacenter closest to you.
; There are currently two datacenters you may use:
; * New York, NY (JFK)
; * San Jose, CA (SJC)
;
; The entire "register =>" line below should be on one line
; (with no carriage returns in the middle):
; .........................................................

[general]
disallow=all
allow=ulaw
allow=alaw
allow=gsm
qualify=yes
canreinvite=no

; Register to JFK by default
;
; West coast users: replace "jfk" with "sjc" in the following two lines,
; and again in the peer entries below.

register => user:password@jfk-primary.voicepulse.com
register => user:password@jfk-backup.voicepulse.com

; ---------------------------------------------------------
; SIP PEERS
;
; These are the primary and backup peers for calls to/from:
; JFK (New York, NY) or SJC (San Jose, CA)
; ---------------------------------------------------------

[voicepulse-primary]

type=peer
context=voicepulse-in ; <-- the context in extensions.conf
; that you want these calls to go to
host=jfk-primary.voicepulse.com ; <-- west coast users should
; use sjc-primary instead
username=user
secret=password
qualify=yes
allow=all
canreinvite=no
dtmfmode=rfc2833
rfc2833compensate=yes
insecure=port,invite
trustrpid=yes

; ---------------------------------------------------------
; REGISTERED USER -- FOR TESTING SIP ENDPOINTS
;
; This is a test user.  You can use Counterpath's X-Lite
; Phone to test your Asterisk configuration.  Configure the
; following settings:
;
;   Enabled: Yes
;   Display Name: sipuser
;   User Name: sipuser
;   Authorization User: sipuser
;   Password: sippassword
;   SIP Proxy: <your Asterisk server IP address>
;
; You can get X-Lite at:
; http://www.counterpath.com/x-lite.html
; ---------------------------------------------------------

[niall]
type=friend
host=dynamic
secret=1234 ; Change this to something secure!
context=outgoing
canreinvite=no
allow=all
deny=0.0.0.0/0.0.0.0 ; These entries ensure this extension can
permit=10.0.0.0/255.0.0.0 ; only be used from your internal network.
permit=172.16.0.0/255.240.0.0 ; If your extensions are on a remote network,
permit=192.168.0.100/255.255.0.0 ; update these accordingly.[/code]

Here’s my extensions.conf:

[code] ; Sample /etc/asterisk/extensions.conf
;
;
; *** Trixbox and FreePBX users DO NOT USE THIS FILE
; *** See your account center for guides specific to your PBX
;
;
; Updated Feb 24, 2011 for general enhancements
; Updated Jun 24, 2008 to fix bug with int’l calls
; Updated Jul 9, 2008 to support jfk/sjc
; Updated Aug 8, 2008 to reflect changes in sip.conf
;
; Copyright © 2003-2011 VoicePulse Inc.
; VoicePulse is a registered trademark of VoicePulse Inc.
;
; =========================================================
; QUICKSTART WITH VOICEPULSE CONNECT FOR ASTERISK
;
; * Test your incoming and outgoing calls using the test
; programs mentioned in sip.conf
;
; * Incoming calls should ring the extension set up in
; sip.conf
;
; * Test outgoing calls by dialing all 11 digits, e.g.
; 17323395100
;
; * After testing, modify the OUTGOING CONTEXT and
; INCOMING CONTEXT per your requirements.
;
; =========================================================

; ---------------------------------------------------------
; GENERAL SETTINGS
;
; ---------------------------------------------------------

[general]
static=yes
writeprotect=no

; ---------------------------------------------------------
; OUTGOING CONTEXT
;
; [outgoing] is the context referred to by the test user
; [sipuser] in sip.conf.
;
; This is where your custom outgoing call processing should
; go.
;
; Outgoing calls should be dialed in proper e164 format:
;   +<countrycode><number>
;
; For example:
;   +17323395100 or
;   +441234567890
; ---------------------------------------------------------

[globals]

[outgoing]

; .........................................................
; NANPA calls (US, Canada, Bermuda, parts of the Caribbean)
; .........................................................

; Set your CallerID number
; Setting both the name and number is required due to
; non-standard SIP behavior by previous versions of Asterisk.
;
; The CallerID number must be 10 digits.

exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=0000000000)
exten => _1NXXNXXXXXX,2,Set(CALLERID(name)=0000000000)

; Print the SIP Call-ID to the CLI for troubleshooting.
; You can send this Call-ID to customer service when asked
; for a call example that may have experienced an issue.

exten => _1NXXNXXXXXX,n,NoOp(SIPCALLID: ${SIPCALLID})

; Send your call to VoicePulse using SIP

exten => _1NXXNXXXXXX,n,Dial(SIP/niall+${EXTEN}@${jfk-primary.voicepulse.com})
exten => _1NXXNXXXXXX,n,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?${EXTEN}|GatewayB)
exten => _1NXXNXXXXXX,n(GatewayB),Dial(SIP/niall+${EXTEN}@${jfk-primary.voicepulse.com})

; .........................................................
; International calls
; .........................................................

; Set your CallerID number
; The CallerID number must be 10 digits.

exten => _011XXXX.,1,Set(CALLERID(num)=0000000000)

; Print the SIP Call-ID to the CLI for troubleshooting.
; You can send this Call-ID to customer service when asked
; for a call example that may have experienced an issue.

exten => _011XXXX.,n,NoOp(SIPCALLID: ${SIPCALLID})

; Send your call to VoicePulse using SIP
;
; Note the "${EXTEN:3}" in the Dial statement, which removes
; the "011" from the dialed number before sending to our gateway.

exten => _011XXXX.,n,Dial(SIP/+${EXTEN:3}@${VOICEPULSE_GATEWAY_OUT_A})
exten => _011XXXX.,n,GotoIf($[${DIALSTATUS}=CHANUNAVAIL]?${EXTEN}|GatewayB)
exten => _011XXXX.,n(GatewayB),Dial(SIP/+${EXTEN:3}@${VOICEPULSE_GATEWAY_OUT_B})

; ---------------------------------------------------------
; INCOMING CONTEXT
;
; [voicepulse-in] is the context referred to by the
; [voicepulse-primary] peer in sip.conf and the
; [voicepulse-backup] peer in sip.conf
;
; This is where your custom incoming call processing should
; go.
;
; IMPORTANT: Incoming calls from VoicePulse will have an
; extension of country code + number, so calls from US
; numbers will be 1 + area code + number (11 digits).
; ---------------------------------------------------------

[voicepulse-in]

; .........................................................
; This section catches calls coming from VoicePulse.
;
; The extension used below will catch your incoming calls
; regardless of what phone numbers are on your VoicePulse
; Connect for Asterisk account:
;
; exten => _XX.
;
; If you would like to route your calls based on different
; incoming phone numbers (YOUR numbers, not the caller's
; number), use:
;
; exten => _17325550000,1,Dial(SIP/sipuser)
; exten => _17325550001,1,Dial(SIP/john)
; ...
; ...
; ...
;
; For sample purposes, this section will ring your test
; SIP phone.  For this to
; work:
;
; - You must have a test phone set up using the test user
;   found at the end of sip.conf
; - You must order a phone number on your account
; - You must dial that phone number from a different phone
;
; .........................................................

exten => _XX.,1,NoOp(Call received from VoicePulse)
exten => _XX.,n,Dial(SIP/niall)

; ---------------------------------------------------------
; BANNED CONTEXT
;
; This context is used by unauthorized incoming or
; outgoing calls
; ---------------------------------------------------------

[banned]
exten => i,1,Hangup
exten => t,1,Hangup

[/code]

I know I’m missing something simple, but clearly not simple enough for me to grasp at the moment.

Thanks is advance for any assistance you can provide.

Sincerely.

Gerald

You haven’t define djfk-primary.voicepulse.com and similar variables.

Normally you would have a literal sip.conf section name here, not a variable reference.

The niall+ prefix is odd, but could be OK.

Hi

thank you for the quick response. Where would I define these variables, in sip.conf, or extensions.conf?

Thank you

Gerald

In extensions.conf. However, as only one value could possibly work for all of them, why use variables at all?

Thank you david55,

I now need to go figure out what exactly the variables are. Thank you.