Call Forwarding Help

I have a call forwarding script that runs when a call is received by a trunk and checks for if it should and where to forward. I would like to know how to get the phone the PBX calls during the forwarding and bridging to ring with the CallerID info of the person calling the PBX. Right now it works as intended, but it doesn’t properly pass on CallerID info when my cell phone is called it shows the DID number of the trunk used to dial out.

This is the context for an incoming call on my primary trunk:

exten = s,1,Set(temp=${DB(CFIM/100)})
exten = s,2,GotoIf(${temp}?s-cfim,1:s-nocfim,1)
exten = s-cfim,1,Dial(DAHDI/g3/${temp},300,o(${CALLERID(all)}))
exten = s-nocfim,1(nocfim),ExecIf($[ "${CALLERID(num)}"="" ]?SetCallerPres(unavailable))
exten = s-nocfim,2,ExecIf($[ "${CALLERID(num)}"="" ]?Set(CALLERID(all)=unknown <0000000>))
exten = s-nocfim,3,Goto(default,100,1)

I’m new to asterisk, but from what I’ve read, this should set the CallerID and dial outbound on dahdi channel 3. It dials out using dahdi channel 3 and bridges channels 1 and 3 thus “forwarding”, but the CID info isn’t getting set for trunk 3 to match the incoming call to the PBX. Am I missing something, or what should I be doing differently?

Using Asterisk 1.8.4.1 and AsteriskGUI 2.1.0-rc1
on Fedora 14
with Rhino R4FXO-EC 4 trunks active

This is not possible on an FXO interface in the UK. I don’t know if it is possible for some PTTs, and I haven’t investigated if the Asterisk provides any support for sending CLID via those PTTs, other than the ability to explicitly send DTMF.

Normally, outgoing CLID requires:

  • a common channel, digital, interface to the PSTN;
  • permission from your PTT to present the particular CLID value.

If it is possible on your FXO line, you will need to tell us the technical requirements from the PTT, or identify the country, PTT and service product that you are using.

We are in Denver, CO, USA. We use the Integra Telecom company to host the trunks. We subscribe to the Novus voice service. Other than that I do not know too many other technical details about the service. The equipment for the PBX and T1 lines were in place when I got here. I was called in to restore the original PBX when it went down and wouldn’t come back up and the person who originally installed it could not be contacted. By the time I got here the root password for the old system was no longer documented on site and I had no option but to start fresh as we couldn’t get in contact with the only person who had the password and simply powering the system off and back on did not restore functionality. My client tells me that before the phones went out and I came to restore them when they’d turn forward on it would display the ID of the original caller to the PBX on the phone it was forwarded to. So I know it is possible on our lines, I just don’t know how it was done before and like i previously mentioned I had zero access to the old PBX and a 100% need to get a new PBX up and running.

I will call Integra today and get as much of the technical details as I possibly can once the client arrives back here and I can have him authorize me to speak with them about his account. Again I am new to phone systems in general so I do not know exactly what tech info I will need so if anyone could add the things I need to know in order to move this along that would be much appreciated, otherwise I will just get as much as I can get out of Integra and paste it here.

FXO’s don’t interface to T1s!

If the PTT presents as T1, it is the box that converts to FXO for which you need the information.

@david55, first thank you for your patience in this. I’m still learning what I need to know as I go along. I got myself into a little bit bigger project than I had been expecting, and so far I’ve learned how to at least get the system running and working. We can make and receive calls just fine, this is just a final cosmetic fix I’d like to get working for the client. Like I said I’m waiting on the client. Once he is here I can get in touch with integra and get full details on the service here. For now all I really know 100% is that we have Integra service of some sort that proves 6 lines (4 of which we actually use). I can tell you that integras line is wired in to the inside of the building then into a white box that is labelled “ADRLAN Total Access 608” that has a few things running out of it. One being the cat5 cable to the router for internet. The other is a somewhat bulky connecter tied into a piece of cat3 cable that runs to two boxes that separate out the phone lines and then tie in to the PBX. This “Total Access” box theoretically would be what is converting to FXO. If it is converted to FXO somewhere else in the system (say between this box in the clients office and Integras hosting center) I will not know until I can speak with Integra. I have also noted, if this provides anything to this discussion, if our Primary trunk is in use for a call in either direction, when placing an outgoing call on our system it no longer overrides the CallerID info, which it does properly set on the main trunk when calling out. Or at least the client says it properly manipulates this info as he claims prior to me coming in his callerid reported the name as “trixbox” when calling from the old PBX, now it says his business name as I set in the GUI as the outbound calling rules callerid info.

I have also learned now through speaking with the client that after the forward, if a person leaves a voice mail on his phone that the caller id info is reported correctly by his voicemail when it plays the message. I also did some probing deeper in to my configs and in my dahdi-channels.conf (included in chan_dahdi.conf) ive noticed under each trunk it has a line that reads “callerid=asrecieved”. I’m thinking this overrides my attempts to set callerid info, but again I’m currently learning new things daily regarding Asterisk. Maybe a short explanation of how the dahdi channels config works with callerid might help me get a little more figured out with this. Again, I have been told by the client this worked before. Hopefully someone reading this has a little more knowhow into this ans can provide some answers.

Penguin PBX is in Denver and has set up several systems with Integra in the past, mostly with T1 lines, but happy to help on your analog problem! Please give a ring 720-863-0819 to discuss opportunities for setting up a digital trunk to handle your custom caller ID needs. (david55 is quite right that this probably won’t work on an FXO analog interface.)