Skip to content

Latest commit

 

History

History
79 lines (71 loc) · 4.64 KB

File metadata and controls

79 lines (71 loc) · 4.64 KB

speech recognition

misc

text to speech

pjsip + kamailio

twilio

connecting

pjsua --id sip:1001@$(ipconfig getifaddr en0) --username 1001 --local-port=5061 --app-log-level 3
pjsua --id sip:1002@192.168.188.110 --registrar sip:192.168.188.110 --username 1002 --local-port=5062 --app-log-level 3
./play-sound.sh 1002
sip:23@192.168.188.110

start twilio example

./dc.sh nats core ngrok twilio websocketd - up --build
curl -s -H 'Content-Type: application/json' -X POST http://localhost:8080/api/broadcast/workers -d '{ "name": "UpdateWorkerRegistration", "registrations": [{ "connected": true, "workerId": "1002", "address": "PSTN/+15555555555" }]}'

apis

curl -s -H 'Content-Type: application/json' -X POST http://localhost:8080/api/broadcast/workers -d '{"name":"get_workers"}' | jq
curl -s -H 'content-type: application/json' -X POST http://localhost:8080/api/broadcast/interactions --data '{"name":"get"}' | jq

curl -s -H 'Content-Type: application/json' -X POST http://192.168.188.110:8080/api/broadcast/workers -d '{"name":"get_workers"}' | jq
curl -s -H 'Content-Type: application/json' -X POST http://192.168.188.110:8080/api/broadcast/workers -d '{"name":"get_worker_address","workerId":"1002"}'
curl -s -H 'Content-Type: application/json' -X POST http://192.168.188.110:8080/api/broadcast/workers -d '{ "name": "UpdateWorkerRegistration", "registrations": [{ "connected": true, "workerId": "1002", "address": "SIP/cluster/123" }]}'
curl -s -H 'content-type: application/json' -X POST http://192.168.188.110:8080/api/broadcast/interactions --data '{"name":"get"}' | jq
curl -s -H 'content-type: application/json' -X POST http://192.168.188.110:8080/api/interactions/CAde58c2e007cb8789334aa81d293592fd --data '{"name":"ExternalInteractionInitiatedEvent","interactionId":"CAde58c2e007cb8789334aa81d293592fd","channel":"voice"}' | jq

todo

  • create bridge api for kamailio which updates registered users
  • review if there are any hacks in kamailio config or routing logic
  • create kamailio-proxy dockerfile
  • add mechanism to update cluster friend config in sip.conf
  • determine which things should be externally configured in asterisk - e.g. certain ari.conf settings
  • external configuration of rtp ports
  • cleanup dispatcher list setup so it handles if kamailio restarted
  • cleanup dispatcher list setup so it detects dead destinations
  • integrate logic from example-stasis-app as generic capability
  • make flow-processor adapter service generic
  • create separate compose for core apis
  • implement twiml flow processor
  • handle aggregate node stickiness/affinity - options:
  • re-design model for routes
  • kamailio-agent will not advertise workers to restarted router-api because it thinks its already registered
  • add app level error handling for nats replys if listener has an error
  • handle requests and delayed registration - e.g. calling get_workers before worker apis registered
  • auto-register twilio trunk + number
    • auto-ngrok setup for local dev env
  • terraform provisioning and scaling controller
  • integrate lets encrypt
  • fix stale message nodes causing timeouts
    • set timeouts and mark instances as down
    • failover to other instances