Page 1 of 1

Twilio outbound not working

PostPosted: Fri Sep 30, 2016 11:03 am
by Keyfin
So I installed a vicibox 7.0.3 server, whitelisted the ips, upgraded to latest svn, installed dgg, and setup campaign, user, in group, did, server, and carrier, Twilio
I have inbound working, but outbound is giving me a problem.
here's the CLI output when making a call:

[Sep 30 11:43:30] -- <Local/8600051@default-00000004;1>AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Sep 30 11:43:30] -- Executing [917277670489@default:2] Dial("Local/8600051@default-00000004;1", "SIP/Twilio/+17277670489,,To") in new stack
[Sep 30 11:43:30] WARNING[25318][C-00000006]: app_dial.c:2455 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)
[Sep 30 11:43:30] == Everyone is busy/congested at this time (1:0/0/1)
[Sep 30 11:43:30] -- Executing [917277670489@default:3] Hangup("Local/8600051@default-00000004;1", "") in new stack
[Sep 30 11:43:30] == Spawn extension (default, 917277670489, 3) exited non-zero on 'Local/8600051@default-00000004;1'
[Sep 30 11:43:30] -- Executing [h@default:1] AGI("Local/8600051@default-00000004;1", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----20-----CHANUNAVAIL----------") in new stack
[Sep 30 11:43:30] -- <Local/8600051@default-00000004;1>AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... ---------- completed, returning 0
[Sep 30 11:43:30] == Spawn extension (default, 8600051, 1) exited non-zero on 'Local/8600051@default-00000004;2'
[Sep 30 11:43:30] -- Executing [h@default:1] AGI("Local/8600051@default-00000004;2", "agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----0---------------") in new stack
[Sep 30 11:43:30] -- <Local/8600051@default-00000004;2>AGI Script agi://127.0.0.1:4577/call_log--HVcauses ... ---------- completed, returning 0

here is
vicibox7*CLI> sip show peer Twilio


* Name : Twilio
Description :
Secret : <Set>
MD5Secret : <Not set>
Remote Secret: <Not set>
Context : trunkinbound
Record On feature : automon
Record Off feature : automon
Subscr.Cont. : <Not set>
Language : en
Tonezone : <Not set>
AMA flags : Unknown
Netborder CPD: No
Transfer mode: open
CallingPres : Presentation Allowed, Not Screened
FromUser : <Twilio toll free number here in +1800 format>
FromDomain : <my pstn name>.pstn.twilio.com Port 5060
Callgroup :
Pickupgroup :
Named Callgr :
Nam. Pickupgr:
MOH Suggest : default
Mailbox :
VM Extension : asterisk
LastMsgsSent : 0/0
Call limit : 0
Max forwards : 0
Dynamic : No
Callerid : "" <>
MaxCallBR : 384 kbps
Expire : -1
Insecure : port,invite
Force rport : Yes
Symmetric RTP: Yes
ACL : No
DirectMedACL : No
T.38 support : No
T.38 EC mode : Unknown
T.38 MaxDtgrm: 4294967295
DirectMedia : No
PromiscRedir : No
User=Phone : No
Video Support: No
Text Support : No
Ign SDP ver : No
Trust RPID : No
Send RPID : Yes
TrustIDOutbnd: Legacy
Subscriptions: Yes
Overlap dial : No
DTMFmode : rfc2833
Timer T1 : 500
Timer B : 32000
ToHost : <mypstnname>.pstn.twilio.com
Addr->IP : 54.172.60.3:5060
Defaddr->IP : (null)
Prim.Transp. : UDP
Allowed.Trsp : UDP
Def. Username: <Twilio Credentials user name here>
SIP Options : (none)
Codecs : (ulaw)
Codec Order : (ulaw:20)
Auto-Framing : No
Status : UNREACHABLE
Useragent :
Reg. Contact :
Qualify Freq : 60000 ms
Keepalive : 0 ms
Sess-Timers : Accept
Sess-Refresh : uas
Sess-Expires : 1800 secs
Min-Sess : 90 secs
RTP Engine : asterisk
Parkinglot :
Use Reason : No
Encryption : No

here's ths SIP setup

[Twilio]
type=peer
secret=<twilio credentials password>
username=<twilio credentials username>
host=<pstnname>.pstn.twilio.com
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
insecure=port,invite
fromuser=+18(twilio toll free number)
fromdomain=<pstnname>.pstn.twilio.com

global string = DIAL9TRUNK = SIP/Twilio

and the dial plan
exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,n,Dial(${DIAL9TRUNK}/+1${EXTEN:2},,To)
exten => _91NXXNXXXXXX,n,Hangup

exten => _9NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9NXXNXXXXXX,n,Dial(${DIAL9TRUNK}/+1${EXTEN:1},,tTo)
exten => _9NXXNXXXXXX,n,Hangup


It seems to me, I am simply not registering sip.

Re: Twilio outbound not working

PostPosted: Fri Sep 30, 2016 11:07 pm
by ambiorixg12
Asterisk is telling you exactly what is the issue

[Sep 30 11:43:30] WARNING[25318][C-00000006]: app_dial.c:2455 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)


Status : UNREACHABLE

Re: Twilio outbound not working

PostPosted: Sat Oct 01, 2016 12:01 pm
by Keyfin
At this point, I think it's ports 5060:5061 not being forwarded correctly in the VPN router. Unfortunately, the ISP won't give me access to the router at this location, so I have to trust they forwarded correctly after I called. I will put a ports.txt on the server that they can see and call them next week to make sure everything is forwarded properly.

Re: Twilio outbound not working

PostPosted: Tue Oct 04, 2016 10:51 am
by Keyfin
OK, so called the ISP for the location and they comfirmed that 5060-5061 ports are being forwarded correctly. As I have Twilio inbound working on 2 different numbers, one local, one toll-free, this does seem to be the case, however outbound is still not working, as Twilio is still showing up as unreachable. Any help please?

Re: Twilio outbound not working

PostPosted: Tue Oct 04, 2016 9:56 pm
by Keyfin
RESOLVED
I simply ran the install.pl file again from the SVN trunk, used the option to copy the sample configuration files, then rebuilt the .conf files using the admin screen, suddenly Twilio registered outbound, not sure what was wrong, but it's fixed now. :D
Note: In case anyone else has trouble like I did with this, Twilio is a carrier that uses +1 in front of their number thus you have edit the extensions.conf file for inbound calling to work on Twilio.
extension.conf under trunkinbound
[trunkinbound]
; DID call routing process
; exten => _XXXXXXXXXX,1,AGI(agi-DID_route.agi) ; use this one instead of the one below if you are having delay issues, and match to number of received digits
exten => _X.,1,AGI(agi-DID_route.agi)
exten => _X.,n,Hangup()
; If you have DIDs that arrive with a plus sign at the beginning then uncomment
exten => _+X.,1,AGI(agi-DID_route.agi)
exten => _+X.,n,Hangup()
; If you have DIDs that arrive with a plus and 1 at the beginning that you want to filter out, then uncomment
exten => _+1X.,1,Goto(trunkinbound,${EXTEN:2},1)