Skip to main content

Forwarding to downstream PBX

Posted by bup413 on Tue, 12/15/2009

I know the first reaction will be "MTE is not a call router" but for now it is some of what I am doing with it so until I can afford a separate call router I am trying to use MTE for extensions and downstream IP-PBXs

The problem I seem to be having is when send multiple DIDs downstream to the PBX. The __FROM_DID is coming in as
__FROM_DID = 4135551212-MyBusiness

I need for it to come in as
__FROM_DID = 4135551212
this way downstream Asterisk boxes or hardened systems like the Aastra 160 can do DID based call routing.

I have a script "Inbound Route" in MTE as follows

exten => Set(CALLERID(num)=${FILTER(0123456789,${CALLERID(num)})});
exten => Set(TRUNK = 4135551212);
exten => s,1,Dial(SIP/${ARG1}-${TENANT},60,of);

Real simple for now, just want to forward the call on to the downstream PBX. How can I manipulate the DID so the receiving PBX gets the DID without the TENANT on there?

Please help! This has been driving me mad for the last couple days.

-Adam


Submitted by mattdarnell on Tue, 12/15/2009 Permalink

This is what I do when I want to forward a DID to an IP address, point a DID to this script:

exten => s,1,Wait(0.2)
exten => s,n,Log(DEBUG, ${CALLERID(num)} is the Caller Number)
exten => s,n,Set(CALLERID(number)=${CALLERID(num)})
exten => s,n,Log(DEBUG, ${CALLERID(name)} is the Caller Name)
exten => s,n,Set(CALLERID(name)=${CALLERID(name)})
exten => s,n,Log, (DEBUG, DNIS is ${CALLERID(dnid)})
exten => s,n,Dial(SIP/${CALLERID(dnid)}@${ARG1})

ARG1 can be an IP or host name.

Use at your own risk!!!

-Matt

Submitted by eeman on Tue, 12/15/2009 Permalink

your problem is entirely in your dial statement... I suppose you dont care that outbound callerid of your customers is going to be thrown out the window, or that your violating CPNA and CAELA requirements.. your customers might though.

exten => s,1,Dial(SIP/${ARG1}-${TENANT},60,of);

this is not how you dial another PBX,

you need to dial SIP/trunk/extension or SIP/extension@trunk

Dial(SIP/${ARG1}/${MACRO_EXTEN},90)