Direct forward to outside number

I have the following problem…

I need to forward incoming calls (that I receive via SIP trunk) to an outside number. The call needs to be forwarded via same SIP trunk from which it came from.

I created the custom extension (“SIP/name_of_the_trunk/outside_number” in the dial field) but the call always fails

"-- Called Telekom/0641552854
– SIP/Telekom-000000c7 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
"
When i set up the custom extension to use GSM gateway (second SIP trunk) everything works fine.

I tried diferent versions of commands for dialing (using the @from-internal option), different outbound CIDs (setting it on extension, on SIP trunk), but nothing works.

Box is Trixbox 2.8.0.4, Asterisk 1.6.0.26

Did anybody had similar problem?

You will have to check the SIP communication and clear this up with your Telekom. I am presuming that you are sending the wrong information in the From: and Contact: headers of the ougoing SIP Invite - if it’s not one of the DID’s that are assigned to the subscriber, then it’s normal that they block such a call.

What you are looking for is Call Forward to an external number, where the C party sees the A number of the original caller. This is not trivial - usually implemented with Diversion headers or 302 Moved messages. In any case this exceeds the capabiltiys of GUI generated dialplans. You will have to do some Asterisk dialplan coding on your own.

Dejan,

Thank you for your replay. I thing you’re right, because Asterisk is trying to use incoming call number for id

– Executing [s@macro-outbound-callerid:13] ExecIf(“Local/07155562@from-internal-b626;2”, “1?Set(CALLERID(all)=0117155555)”) in new stack

In this case 0117155555 is the CID of the A party.

I’m currently looking for command to put in custom extension to override this setting (to put in one of the assigned DIDs)…

Often fromuser in the sip.conf entry.