Without seeing your dialplan, this is just a guess, but, I would bet that your gateway appears before this trunk in the external dialplan and the call matches the regex on the gateway. So, tighten your regex on the gateway and/or move this entry above the gateway entry.



On Monday 19 December 2011 11:54:12 Zhuravlov Sergey wrote:

> Hi,

>

> in my dialplan I try to call directly to the asterisk server follows:

>

> <extension name="ast_NTCOM-711">

> <condition field="destination_number" expression="^(711)$">

> <action application="set" data="hangup_after_bridge=true"/>

> <action application="bridge" data="sofia/external/$1@ast.er.isk.ip"/>

> <action application="hangup"/>

> </condition>

> </extension>

>

> But it does not work for me! If the profile external has gateways then a call goes

> through a gateway, and receives forbidden.

>

> If in the profile external NOT have gateways - all is good and asterisk

> recieve call.

>

> I do not understand why this is happening? Where to look?

>

>

>

>