Hello I’m having trouble with my asterisk server I’m trying to make calls and get calls with a specific number Here is the errors and the extension.conf and sip.conf Please let me know if I make any changes [general]
context=default
bindport=5060
dtmfmode=rfc2833
disallow=all
allow=alaw
allow=ulaw
allow=gsm
allow=g723
allow=g726
allow=speex
; replace INBOUND_SIP_USERNAME and INBOUND_SIP_PASSWORD
; with your Inbound SIP Registration credentials
register => curlyjoey:testpassword@192.168.100.130
[1001]
type=friend
context=from=internal
host=dynamic
secret=password
disallow=all
allow=ulaw
[1002]
type=friend
context=from-internal
host=dynamic
secret=password
disallow=all
allow=ulaw
[trunk]
type=peer
;host=192.168.100.130 ; North America POP
context=from-trunk
qualify=yes
defaultuser=curlyjoey
remotesecret=testpassword
[trunk]
type=peer
host=192.168.100.130
username=curlyjoey
secret=testpassword
context=from-trunk
qualify=yes
;send all other numbers to outbound trunk
exten => _[0-9].,1,NoOp (#### [from-interrnal] ####)
exten => _[0-9].,n,Set(CALLERID(num)=9546699281)
exten => _[0-9].,n,Dial(SIP/+${EXTEN}@trunk}
exten => _[0-9].,n,Hangup()
[from trunk]
;send all incoming calls from trunk DDI numbers to extension 1002
exten => _[0-9].,1,NoOp(#### [from-trunk] ####)
exten => _[0-9].,n,Dial(SIP/1002)
exten => _[0-9].,n,Hangup()
exten => _1NXXNXXXXXXX,1,Dial(SIP/${EXTEN}@trunk)
exten =>_1NXXNXXXXXX,n,Hangup()
[default]
; Default context to drop unwanted calls
exten => _X.,1,NoOp(### [default] ###)
exten =>_X.,n,Hangup()
[from-internal]
; Internal call between extensions
exten => 1001,1,Dial(SIP/1001)
exten => 1001,n,Hangup()
exten => 1002,1,Dial(SIP/1002)
exten => 1002,n,Hangup()
; Send all other numbers to outbound trunk
exten => _X.,1,NoOp(#### [from-internal] ####)
exten => _X.,n,Set(CALLERID(num)=9546699281)
exten => _X.,n,Dial(SIP/${EXTEN}@trunk)
exten => _X.,n,Hangup()
[from-trunk]
; Route all incoming calls to extension 1002
exten => _X.,1,NoOp(#### [from-trunk] ####)
exten => _X.,n,Dial(SIP/1002)
exten => _X.,n,Hangup()
ERROR[2233][C-0000000b]: pbx_functions.c:700 ast_func_write: Function CallerID not registered
[Nov 26 02:19:52] ERROR[2233][C-0000000b]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo(“trunk}”, “(null)”, …): Name or service not known
[Nov 26 02:19:52] WARNING[2233][C-0000000b]: chan_sip.c:6410 create_addr: No such host: trunk}
[Nov 26 02:19:52] NOTICE[2233][C-0000000b]: app_dial.c:2750 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Subscriber absent)