Good morning/evening to all, im pretty new to Asterisk and FreePBX and im a newbie in this field, and i was trying to find a solution to “redirect” an inbound SIP call to a dynamic external number via sip trunk.
The flow i want to achieve is:
- Incoming SIP call
- Asterisk reads destination number (from custom header)
- Call continues to ring until callee responds, so that the incoming SIP call becomes an outbound call to the destination
Is this possible?
I’ve already tried doing something like this:
exten => 900,1,Set(CALLERID(num)=callerid)
same => n,Dial(PJSIP/destination@trunk_name)
same => n,Hangup()
And it kind of works, but if not answered quickly the call drops after a few seconds of ringing