Two extensions for single call

Dear All,
I am trying to receive call from inbound proxy then route to internal peer (localhost) and then route to outgoing sip proxy but it failing with error rejected because extension not found in context ‘introutingB’. Can any one please correct me what i am doing wrong in below config.

SIP.conf

[Inbound]
type=peer
context=introuting
host=184.107.XXX.XXX
disallow=all
allow=all

[astinside]
type=peer
context=introutingB
host=localhost
disallow=all
;allow=speex

[voipprovider]
type=peer
host=XXX.X.XXX.159
disallow=all
allow=g723:120

Extentions.config

[introuting]
exten => _X.,1,Dial(SIP/astinside)

[introutingB]
exten => s,n,Dial(SIP/voipprovider)

Hi, test this.

[introutingB]
exten => _X.,n,Dial(SIP/voipprovider/${EXTEN})

Magnus
www.magnusbilling.com

A peer on localhost without either Asterisk or the peer having an override for the port number is going to cause problems.

I’m not entirely sure what you are trying to do, but I’m sure you have made it overcomplex. You should look into the Goto application and Local channels.