[PJSIP] Incoming ITSP working at last! Is this a sane config

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

[PJSIP] Incoming ITSP working at last! Is this a sane config

Postby lardconcepts » Thu Nov 12, 2015 9:07 am

After 3-and-a-half long and frustrating days, I've finally figured out how to connect my ITSP (Voipfone) to an Asterisk install so that I can:

  • Play the correct message depending on the number being called.
  • Store the date/time/CID of the person calling and which group they called.
  • Not allow outgoing calls (message service only).

Note that with Voipfone, you can only have the calling number and any name set in the control panel.

The following config is designed to provide me with enough info as a learning basis, the idea being that anything from this point on is just dialplan - buy a number from Voipfone, give it a name in their control panel, and then just add a dialplan section with that name.

Does this look sane and safe for the time being?


Code: Select all
type = transport
protocol = UDP
bind =

type = registration
retry_interval = 20
max_retries = 10
contact_user = 301XXXXX
transport = simpletrans
outbound_auth = voipfone-auth
server_uri = sip:301XXXXX@sip.voipfone.net:5060
;Note: IP in next line is MY Asterisk IP
client_uri = sip:301XXXXXN@46.101.37.X:5060

type = auth
auth_type = userpass
username = 301XXXXX
password = XXXXX

type = identify
endpoint = Elephant
; You cannot use FQDNs or hostnames. You must use IP addresses.
match =

type = endpoint
context = fromvoipfone
disallow = all
allow = alaw
outbound_auth = voipfone-auth

type = acl
deny =
permit =


Code: Select all
exten => _X.,1,Answer()
same => n,Set(VOLUME(TX)=8)
same => n,Wait(1)
same => n,DumpChan()
;same => n,SayNumber(${EXTEN})
same => n,Verbose(The caller ID all is ${CALLERID(all)})
same => n,Set(DB(${CALLERID(name)}/${CALLERID(num)})=${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)})
same => n,Playback(hello-world)
same => n,Goto(${CALLERID(name)},s,1)
;same = n,ControlPlayback(demo-instruct,5000,6,4,8,5)
same => n,Hangup()

exten => s,1,Answer(500)
same => n,SayNumber(1)

exten => s,1,Answer(500)
same => n,SayNumber(2)
Posts: 35
Joined: Tue Nov 11, 2014 2:13 pm

Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 1 guest