Search code examples
rubyasteriskasteriskamiagiadhearsion

asterisk to adhearsion agi async call transfer confusion


We have a telephony service (build on asterisk and adhearsion) in production and now i need another stage server for development and testing. What i need is one asterisk server and two adhearsion one for live and another for stage. Same asterisk for both stage and live adhearsion is because i have telecom sip trunk connection to asterisk. For that i create two AMI connection from manager.conf and configure adhearsion.rb according to AMI configuration.
But confusion is call transfer from asterisk to adhearsion. if i do as follow where a call will transfer. which AMI connection the call use to connect to asterisk ?

[stage]
exten =>_stage_numbers,1,AGI(agi:async)

[live]
exten => _live_numbers,1,AGI(agi:async)

I know call can be handle from router according to number. but i dont wanna mess same live system code.

if call from live number then asterisk transfer call to live adhearsion and call from stage number call transfer to stage adhearsion. Can we do that from asterisk ?


Solution

  • Why not make a 2nd Asterisk server and trunk it to your existing one? Think of it like you're registering the 2nd Asterisk server as you would a phone/user, except the dialplan to call it is different. This is how we implement our tests for Asterisk. Official docs here. That limits the amount of changes you need to make to the production server, and you still get access to the PSTN.

    Another option is to make a completely separate Asterisk/Adhearsion deployment and register an endpoint (like a testing phone) to the test Asterisk server to make/receive calls into the Adhearsion system.