Send extensions to other PBX

Inclined readers,
I’m afraid this is a beginners’ problem, but maybe someone wil have some mercy and help me. :wink:

We want to connect subordinate PBXs to our Asterisk, roughly like this:

SDH <–> Asterisk 1.6 <----> Innovaphone iP 800 <—> ISDN-Phones

The Asterisk is 1.6.2.13, it is equipped with a TE420 4span PRI Card

  • When I want to send calls to the Innovaphone IP800, the whole dialed numer extension comes in as the extension from dahdi. (eg 031622502910 with 0316225029 the number an 10 the extension the caller dialed)
  • We want to pass this extension to the IP800.
  • The innovaphone box expects the extension in the SIP TO Header. (Something that we know from accepting calls when using asterisk as a PBX with other providers.)

Our Test-Only-Dialplan looks like that (0316225029 is the user of the ip800). All calls that we get over DAHDI just go into that I-. extension. (We don’t use ${EXTEN} yet, as we’re just testing, every call should terminate at that PBX)

exten => _I-.,1,Dial(SIP/0316225029)
exten => _I-.,2,Goto(RESULT-${DIALSTATUS},1)

As of now when doing a packet trace we see that the To header just contains the username without the Extension. Its clear for me, but not what I want :wink:.

My question is, how can I tell asterisk to modify the To header so that it will contain the extension? with SIPAddHeader I can only add headers that are not there yet.

Something else of my reasoning:
I cant just add the extension smthg like :
exten => _I-.,1,Dial(SIP/${EXTEN:2})
(eg. with ${EXTEN} being somtehing like I-031622502910) , because Atserisk would not find the Resource 031622502910, as it only knows 0316225029.

Gentlemen, to be honest my mind is completely blank on that, maybe someone who has experience with using Asterisk peering can help me out

Best regards from Austria
George

Relevant parts of the config-Files:

sip.conf
[0316225029]
type=friend
qualify=yes
language=de
host=dynamic
user=0316225029
trustrpid=yes
sendrpid=yes
secret=notimportanthere
context=sippeers-ausgehend
canreinvite=no
dtmfmode=rfc2833
allow=alaw
disallow=ulaw

SIP/section/digits or SIP/digits@section

Yeah, that did it!

You made my weekend!
Cheers,
George