Hello,
I have installed ASTPP using automate script, created a SIP profile with a Gateway and was able to successfully register. When i try to make a test call to a external number it says Phone number not found, i have barely idea about how dialplans work on freeswitch, did some changes with dialplans but didn't help, below what i found on ASTPP logs
Something i noticed: WARNING Accountcode 8919667053. Dialed number
(0112781725) origination rates not found!!"/>
[2015-05-28 13:08:06] hostname
freeswitch.techseized.lk[2015-05-28 13:08:06] section directory
[2015-05-28 13:08:06] tag_name domain
[2015-05-28 13:08:06] key_name name
[2015-05-28 13:08:06] key_value 172.20.0.46
[2015-05-28 13:08:06] Event-Name REQUEST_PARAMS
[2015-05-28 13:08:06] Core-UUID ad1e3b58-050a-11e5-9f29-c34fb654b0f3
[2015-05-28 13:08:06] FreeSWITCH-Hostname
freeswitch.techseized.lk[2015-05-28 13:08:06] FreeSWITCH-Switchname
freeswitch.techseized.lk[2015-05-28 13:08:06] FreeSWITCH-IPv4 172.20.0.46
[2015-05-28 13:08:06] FreeSWITCH-IPv6 ::1
[2015-05-28 13:08:06] Event-Date-Local 2015-05-28 13:08:06
[2015-05-28 13:08:06] Event-Date-GMT Thu, 28 May 2015 07:38:06 GMT
[2015-05-28 13:08:06] Event-Date-Timestamp 1432798686101167
[2015-05-28 13:08:06] Event-Calling-File sofia_reg.c
[2015-05-28 13:08:06] Event-Calling-Function sofia_reg_parse_auth
[2015-05-28 13:08:06] Event-Calling-Line-Number 2741
[2015-05-28 13:08:06] Event-Sequence 581
[2015-05-28 13:08:06] action sip_auth
[2015-05-28 13:08:06] sip_profile internal
[2015-05-28 13:08:06] sip_user_agent Bria Professional release 2.4 stamp 49381
[2015-05-28 13:08:06] sip_auth_username 8919667053
[2015-05-28 13:08:06] sip_auth_realm 172.20.0.46
[2015-05-28 13:08:06] sip_auth_nonce 7ab19cc6-050c-11e5-9f58-c34fb654b0f3
[2015-05-28 13:08:06] sip_auth_uri
sip:01127...@172.20.0.46[2015-05-28 13:08:06] sip_contact_user 8919667053
[2015-05-28 13:08:06] sip_contact_host 172.20.2.1
[2015-05-28 13:08:06] sip_to_user
0112781725[2015-05-28 13:08:06] sip_to_host 172.20.0.46
[2015-05-28 13:08:06] sip_via_protocol udp
[2015-05-28 13:08:06] sip_from_user 8919667053
[2015-05-28 13:08:06] sip_from_host 172.20.0.46
[2015-05-28 13:08:06] sip_call_id ZjU1ZjNlNGQxYTAyMjRiOTg3OGUzOWNhYmJjMmVhYzE.
[2015-05-28 13:08:06] sip_request_user
0112781725[2015-05-28 13:08:06] sip_request_host 172.20.0.46
[2015-05-28 13:08:06] sip_auth_qop auth
[2015-05-28 13:08:06] sip_auth_cnonce 9972fc5b775c4e7d9a9fbd33deaa5b46
[2015-05-28 13:08:06] sip_auth_nc 00000001
[2015-05-28 13:08:06] sip_auth_response 3cdc15f9a86373bb888e57c0f3bc3d74
[2015-05-28 13:08:06] sip_auth_method INVITE
[2015-05-28 13:08:06] client_port 51978
[2015-05-28 13:08:06] key id
[2015-05-28 13:08:06] user 8919667053
[2015-05-28 13:08:06] domain 172.20.0.46
[2015-05-28 13:08:06] ip 172.20.2.1
[2015-05-28 13:08:06] SELECT username,dir_params,dir_vars,number as accountcode,accountid FROM sip_devices,accounts WHERE accounts.status=0 AND accounts.deleted=0 AND
accounts.id=sip_devices.accountid AND username='8919667053'
[2015-05-28 13:08:06] Content-Type: text/plain; charset=ISO-8859-1
<?xml version="1.0"?>
<document type="freeswitch/xml">
<section name="Directory" description="Directory">
<domain name="172.20.0.46">
<user id="8919667053">
<params>
<param name="password" value="123456"/>
<param name="allow-empty-password" value="false"/>
<param name="domain_name" value="172.20.0.46"/>
<param name="dial-string" value="{sip_invite_domain=${domain_name},presence_id=${dialed_user}@${domain_name}}${sofia_contact(*/${dialed_user}@${domain_name})}"/>
</params>
<variables>
<variable name="effective_caller_id_name" value="8919667053"/>
<variable name="effective_caller_id_number" value="8919667053"/>
<variable name="accountcode" value="8919667053"/>
<variable name="account_id" value="4"/>
</variables>
</user>
</domain>
</section>
</document>
[2015-05-28 13:08:06] hostname
freeswitch.techseized.lk[2015-05-28 13:08:06] section dialplan
[2015-05-28 13:08:06] tag_name
[2015-05-28 13:08:06] key_name
[2015-05-28 13:08:06] key_value
[2015-05-28 13:08:06] Event-Name REQUEST_PARAMS
[2015-05-28 13:08:06] Core-UUID ad1e3b58-050a-11e5-9f29-c34fb654b0f3
[2015-05-28 13:08:06] FreeSWITCH-Hostname
freeswitch.techseized.lk[2015-05-28 13:08:06] FreeSWITCH-Switchname
freeswitch.techseized.lk[2015-05-28 13:08:06] FreeSWITCH-IPv4 172.20.0.46
[2015-05-28 13:08:06] FreeSWITCH-IPv6 ::1
[2015-05-28 13:08:06] Event-Date-Local 2015-05-28 13:08:06
[2015-05-28 13:08:06] Event-Date-GMT Thu, 28 May 2015 07:38:06 GMT
[2015-05-28 13:08:06] Event-Date-Timestamp 1432798686181142
[2015-05-28 13:08:06] Event-Calling-File mod_dialplan_xml.c
[2015-05-28 13:08:06] Event-Calling-Function dialplan_xml_locate
[2015-05-28 13:08:06] Event-Calling-Line-Number 606
[2015-05-28 13:08:06] Event-Sequence 587
[2015-05-28 13:08:06] Channel-State CS_ROUTING
[2015-05-28 13:08:06] Channel-Call-State RINGING
[2015-05-28 13:08:06] Channel-State-Number 2
[2015-05-28 13:08:06] Channel-Name sofia/internal/
89196...@172.20.0.46[2015-05-28 13:08:06] Unique-ID 7ab18f6a-050c-11e5-9f57-c34fb654b0f3
[2015-05-28 13:08:06] Call-Direction inbound
[2015-05-28 13:08:06] Presence-Call-Direction inbound
[2015-05-28 13:08:06] Channel-HIT-Dialplan true
[2015-05-28 13:08:06] Channel-Presence-ID
89196...@172.20.0.46[2015-05-28 13:08:06] Channel-Call-UUID 7ab18f6a-050c-11e5-9f57-c34fb654b0f3
[2015-05-28 13:08:06] Answer-State ringing
[2015-05-28 13:08:06] Caller-Direction inbound
[2015-05-28 13:08:06] Caller-Logical-Direction inbound
[2015-05-28 13:08:06] Caller-Username 8919667053
[2015-05-28 13:08:06] Caller-Dialplan XML
[2015-05-28 13:08:06] Caller-Caller-ID-Name 8919667053
[2015-05-28 13:08:06] Caller-Caller-ID-Number 8919667053
[2015-05-28 13:08:06] Caller-Orig-Caller-ID-Name 8919667053
[2015-05-28 13:08:06] Caller-Orig-Caller-ID-Number 8919667053
[2015-05-28 13:08:06] Caller-Network-Addr 172.20.2.1
[2015-05-28 13:08:06] Caller-ANI 8919667053
[2015-05-28 13:08:06] Caller-Destination-Number
0112781725[2015-05-28 13:08:06] Caller-Unique-ID 7ab18f6a-050c-11e5-9f57-c34fb654b0f3
[2015-05-28 13:08:06] Caller-Source mod_sofia
[2015-05-28 13:08:06] Caller-Context public
[2015-05-28 13:08:06] Caller-Channel-Name sofia/internal/
89196...@172.20.0.46[2015-05-28 13:08:06] Caller-Profile-Index 1
[2015-05-28 13:08:06] Caller-Profile-Created-Time 1432798686161151
[2015-05-28 13:08:06] Caller-Channel-Created-Time 1432798686161151
[2015-05-28 13:08:06] Caller-Channel-Answered-Time 0
[2015-05-28 13:08:06] Caller-Channel-Progress-Time 0
[2015-05-28 13:08:06] Caller-Channel-Progress-Media-Time 0
[2015-05-28 13:08:06] Caller-Channel-Hangup-Time 0
[2015-05-28 13:08:06] Caller-Channel-Transfer-Time 0
[2015-05-28 13:08:06] Caller-Channel-Resurrect-Time 0
[2015-05-28 13:08:06] Caller-Channel-Bridged-Time 0
[2015-05-28 13:08:06] Caller-Channel-Last-Hold 0
[2015-05-28 13:08:06] Caller-Channel-Hold-Accum 0
[2015-05-28 13:08:06] Caller-Screen-Bit true
[2015-05-28 13:08:06] Caller-Privacy-Hide-Name false
[2015-05-28 13:08:06] Caller-Privacy-Hide-Number false
[2015-05-28 13:08:06] variable_direction inbound
[2015-05-28 13:08:06] variable_uuid 7ab18f6a-050c-11e5-9f57-c34fb654b0f3
[2015-05-28 13:08:06] variable_session_id 3
[2015-05-28 13:08:06] variable_sip_from_user 8919667053
[2015-05-28 13:08:06] variable_sip_from_uri
89196...@172.20.0.46[2015-05-28 13:08:06] variable_sip_from_host 172.20.0.46
[2015-05-28 13:08:06] variable_channel_name sofia/internal/
89196...@172.20.0.46[2015-05-28 13:08:06] variable_sip_call_id ZjU1ZjNlNGQxYTAyMjRiOTg3OGUzOWNhYmJjMmVhYzE.
[2015-05-28 13:08:06] variable_ep_codec_string PCMU@8000h@20i@64000b,PCMA@8000h@20i@64000b
[2015-05-28 13:08:06] variable_sip_local_network_addr 172.20.0.46
[2015-05-28 13:08:06] variable_sip_network_ip 172.20.2.1
[2015-05-28 13:08:06] variable_sip_network_port 51978
[2015-05-28 13:08:06] variable_sip_received_ip 172.20.2.1
[2015-05-28 13:08:06] variable_sip_received_port 51978
[2015-05-28 13:08:06] variable_sip_via_protocol udp
[2015-05-28 13:08:06] variable_sip_authorized true
[2015-05-28 13:08:06] variable_Event-Name REQUEST_PARAMS
[2015-05-28 13:08:06] variable_Core-UUID ad1e3b58-050a-11e5-9f29-c34fb654b0f3
[2015-05-28 13:08:06] variable_FreeSWITCH-Hostname
freeswitch.techseized.lk[2015-05-28 13:08:06] variable_FreeSWITCH-Switchname
freeswitch.techseized.lk[2015-05-28 13:08:06] variable_FreeSWITCH-IPv4 172.20.0.46
[2015-05-28 13:08:06] variable_FreeSWITCH-IPv6 ::1
[2015-05-28 13:08:06] variable_Event-Date-Local 2015-05-28 13:08:06
[2015-05-28 13:08:06] variable_Event-Date-GMT Thu, 28 May 2015 07:38:06 GMT
[2015-05-28 13:08:06] variable_Event-Date-Timestamp 1432798686101167
[2015-05-28 13:08:06] variable_Event-Calling-File sofia.c
[2015-05-28 13:08:06] variable_Event-Calling-Function sofia_handle_sip_i_invite
[2015-05-28 13:08:06] variable_Event-Calling-Line-Number 9056
[2015-05-28 13:08:06] variable_Event-Sequence 580
[2015-05-28 13:08:06] variable_sip_number_alias 8919667053
[2015-05-28 13:08:06] variable_sip_auth_username 8919667053
[2015-05-28 13:08:06] variable_sip_auth_realm 172.20.0.46
[2015-05-28 13:08:06] variable_number_alias 8919667053
[2015-05-28 13:08:06] variable_requested_domain_name 172.20.0.46
[2015-05-28 13:08:06] variable_effective_caller_id_name 8919667053
[2015-05-28 13:08:06] variable_effective_caller_id_number 8919667053
[2015-05-28 13:08:06] variable_accountcode 8919667053
[2015-05-28 13:08:06] variable_account_id 4
[2015-05-28 13:08:06] variable_user_name 8919667053
[2015-05-28 13:08:06] variable_domain_name 172.20.0.46
[2015-05-28 13:08:06] variable_sip_from_user_stripped 8919667053
[2015-05-28 13:08:06] variable_sip_from_tag df0f3b74
[2015-05-28 13:08:06] variable_sofia_profile_name internal
[2015-05-28 13:08:06] variable_recovery_profile_name internal
[2015-05-28 13:08:06] variable_sip_full_via SIP/2.0/UDP 172.20.2.1:51978;branch=z9hG4bK-d8754z-a5076a5a1b7dba33-1---d8754z-;rport=51978
[2015-05-28 13:08:06] variable_sip_full_from <
sip:89196...@172.20.0.46>;tag=df0f3b74
[2015-05-28 13:08:06] variable_sip_full_to <
sip:01127...@172.20.0.46>
[2015-05-28 13:08:06] variable_sip_req_user
0112781725[2015-05-28 13:08:06] variable_sip_req_uri
01127...@172.20.0.46[2015-05-28 13:08:06] variable_sip_req_host 172.20.0.46
[2015-05-28 13:08:06] variable_sip_to_user
0112781725[2015-05-28 13:08:06] variable_sip_to_uri
01127...@172.20.0.46[2015-05-28 13:08:06] variable_sip_to_host 172.20.0.46
[2015-05-28 13:08:06] variable_sip_contact_user 8919667053
[2015-05-28 13:08:06] variable_sip_contact_port 51978
[2015-05-28 13:08:06] variable_sip_contact_uri
89196...@172.20.2.1:51978[2015-05-28 13:08:06] variable_sip_contact_host 172.20.2.1
[2015-05-28 13:08:06] variable_rtp_use_codec_string OPUS,G722,PCMU,PCMA,GSM
[2015-05-28 13:08:06] variable_sip_user_agent Bria Professional release 2.4 stamp 49381
[2015-05-28 13:08:06] variable_sip_via_host 172.20.2.1
[2015-05-28 13:08:06] variable_sip_via_port 51978
[2015-05-28 13:08:06] variable_sip_via_rport 51978
[2015-05-28 13:08:06] variable_max_forwards 70
[2015-05-28 13:08:06] variable_presence_id
89196...@172.20.0.46[2015-05-28 13:08:06] variable_switch_r_sdp v=0
o=- 9 2 IN IP4 172.20.2.1
s=CounterPath Bria Professional
c=IN IP4 172.20.2.1
t=0 0
m=audio 22428 RTP/AVP 107 119 100 106 0 98 8 18 101
a=rtpmap:107 BV32/16000
a=rtpmap:119 BV32-FEC/16000
a=rtpmap:100 SPEEX/16000
a=rtpmap:106 SPEEX-FEC/16000
a=rtpmap:98 iLBC/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=alt:1 1 : yQOgQClX Far56kPK 172.20.2.1 22428
a=x-rtp-session-id:8E76191DEB184329BD3881A64F8593B6
[2015-05-28 13:08:06] variable_endpoint_disposition DELAYED NEGOTIATION
[2015-05-28 13:08:06] variable_call_uuid 7ab18f6a-050c-11e5-9f57-c34fb654b0f3
[2015-05-28 13:08:06] Hunt-Direction inbound
[2015-05-28 13:08:06] Hunt-Logical-Direction inbound
[2015-05-28 13:08:06] Hunt-Username 8919667053
[2015-05-28 13:08:06] Hunt-Dialplan XML
[2015-05-28 13:08:06] Hunt-Caller-ID-Name 8919667053
[2015-05-28 13:08:06] Hunt-Caller-ID-Number 8919667053
[2015-05-28 13:08:06] Hunt-Orig-Caller-ID-Name 8919667053
[2015-05-28 13:08:06] Hunt-Orig-Caller-ID-Number 8919667053
[2015-05-28 13:08:06] Hunt-Network-Addr 172.20.2.1
[2015-05-28 13:08:06] Hunt-ANI 8919667053
[2015-05-28 13:08:06] Hunt-Destination-Number
0112781725[2015-05-28 13:08:06] Hunt-Unique-ID 7ab18f6a-050c-11e5-9f57-c34fb654b0f3
[2015-05-28 13:08:06] Hunt-Source mod_sofia
[2015-05-28 13:08:06] Hunt-Context public
[2015-05-28 13:08:06] Hunt-Channel-Name sofia/internal/
89196...@172.20.0.46[2015-05-28 13:08:06] Hunt-Profile-Index 1
[2015-05-28 13:08:06] Hunt-Profile-Created-Time 1432798686161151
[2015-05-28 13:08:06] Hunt-Channel-Created-Time 1432798686161151
[2015-05-28 13:08:06] Hunt-Channel-Answered-Time 0
[2015-05-28 13:08:06] Hunt-Channel-Progress-Time 0
[2015-05-28 13:08:06] Hunt-Channel-Progress-Media-Time 0
[2015-05-28 13:08:06] Hunt-Channel-Hangup-Time 0
[2015-05-28 13:08:06] Hunt-Channel-Transfer-Time 0
[2015-05-28 13:08:06] Hunt-Channel-Resurrect-Time 0
[2015-05-28 13:08:06] Hunt-Channel-Bridged-Time 0
[2015-05-28 13:08:06] Hunt-Channel-Last-Hold 0
[2015-05-28 13:08:06] Hunt-Channel-Hold-Accum 0
[2015-05-28 13:08:06] Hunt-Screen-Bit true
[2015-05-28 13:08:06] Hunt-Privacy-Hide-Name false
[2015-05-28 13:08:06] Hunt-Privacy-Hide-Number false
[2015-05-28 13:08:06] DID SQL : SELECT B.id,B.id,B.number as account_code,A.number as did_number,A.connectcost,A.includedseconds,A.cost,A.inc,A.extensions,A.maxchannels,A.call_type,A.city,A.province FROM dids AS A,accounts AS B WHERE B.status=0 AND B.deleted=0 AND B.id=A.accountid AND A.number = '
0112781725'
[2015-05-28 13:08:06] Get Account SQL : SELECT * FROM accounts WHERE number = '8919667053' AND status = 0 AND deleted=0
[2015-05-28 13:08:06] [Customer info] : [Account code: 8919667053, Rategroup Id: 2, Called number:
0112781725]
[2015-05-28 13:08:06] Block Prefixes SQL : SELECT * from block_patterns WHERE ((blocked_patterns='^
0112781725.*' OR blocked_patterns='^011278172.*' OR blocked_patterns='^01127817.*' OR blocked_patterns='^0112781.*' OR blocked_patterns='^011278.*' OR blocked_patterns='^01127.*' OR blocked_patterns='^0112.*' OR blocked_patterns='^011.*' OR blocked_patterns='^01.*' OR blocked_patterns='^0.*' OR blocked_patterns='^defaultprefix.*')) AND accountid = 4 limit 1
[2015-05-28 13:08:06] Rate group SQL : select * from pricelists WHERE id = 2 AND status = 0
[2015-05-28 13:08:06] Origination Rates SQL : SELECT * FROM routes WHERE ((pattern='^
0112781725.*' OR pattern='^011278172.*' OR pattern='^01127817.*' OR pattern='^0112781.*' OR pattern='^011278.*' OR pattern='^01127.*' OR pattern='^0112.*' OR pattern='^011.*' OR pattern='^01.*' OR pattern='^0.*' OR pattern='^defaultprefix.*')) AND status = 0 AND pricelist_id = 2 ORDER BY LENGTH(pattern) DESC,cost DESC LIMIT 1
[2015-05-28 13:08:06] Content-Type: text/plain; charset=ISO-8859-1
<?xml version="1.0"?>
<document type="freeswitch/xml">
<section name="dialplan" description="Dialplan">
<context name="public">
<extension name=\"
0112781725">
<condition field="destination_number" expression=\"
0112781725">
<action application="set" data="callstart=2015-05-28 07:38:06"/>
<action application="set" data="call_processed=internal"/>
<action application="set" data="originated_destination_number=
0112781725"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="log" data="WARNING Accountcode 8919667053. Dialed number
(0112781725) origination rates not found!!"/>
<action application="playback" data="/usr/local/freeswitch/sounds/en/us/callie/astpp-badphone.wav"/>
<action application="set" data="process_cdr=false"/>
<action application="hangup" data="CALL_REJECTED"/>
</condition>
</extension>
</context>
</section>
</document>