PBX->PBX->outbound callerID issue

I am setting up a new FreePBX distro box running Asterisk 13. However, I need to relay calls out to the PRI card located in my old server running Asterisk 1.4.36/FreePBX 2.9. Have a SIP trunk working between them and calls even go out to the PRI. However, the callerID of the extension is overwritten my the trunk/PRI callerID.

I can’t seem to locate how to fix this. Any help is appreciated. Below is verbose output from the Asterisk 1.4 server.

The CALLERID that should be passed to the PSTN in 2222222222, but it is sending 3333333333 instead.

– Executing [[email protected]:1] Macro(“SIP/crossoverSIP-00001a03”, “user-callerid|LIMIT|”) in new stack
– Executing [[email protected]:1] Set(“SIP/crossoverSIP-00001a03”, “AMPUSER= 2222222222”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/crossoverSIP-00001a03”, “0?report”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/crossoverSIP-00001a03”, “1|Set|REALCALLERIDNUM=2222222222”) in new stack
– Executing [[email protected]:4] Set(“SIP/crossoverSIP-00001a03”, “AMPUSER=”) in new stack
– Executing [[email protected]:5] Set(“SIP/crossoverSIP-00001a03”, “AMPUSERCIDNAME=”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/crossoverSIP-00001a03”, “1?report”) in new stack
– Goto (macro-user-callerid,s,12)
– Executing [[email protected]:12] GotoIf(“SIP/crossoverSIP-00001a03”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,25)
– Executing [[email protected]:25] Set(“SIP/crossoverSIP-00001a03”, “CALLERID(number)= 2222222222”) in new stack
– Executing [[email protected]:26] Set(“SIP/crossoverSIP-00001a03”, “CALLERID(name)=TEST”) in new stack
– Executing [[email protected]:2] Set(“SIP/crossoverSIP-00001a03”, “_NODEST=”) in new stack
– Executing [[email protected]:3] Macro(“SIP/crossoverSIP-00001a03”, “record-enable||OUT|”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/crossoverSIP-00001a03”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [[email protected]:4] ExecIf(“SIP/crossoverSIP-00001a03”, “1|MacroExit|”) in new stack
– Executing [[email protected]:4] Macro(“SIP/crossoverSIP-00001a03”, “dialout-trunk|1| 1111111111 |”) in new stack
– Executing [[email protected]:1] Set(“SIP/crossoverSIP-00001a03”, “DIAL_TRUNK=1”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/crossoverSIP-00001a03”, “0?sub-pincheck|s|1”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/crossoverSIP-00001a03”, “0?disabletrunk|1”) in new stack
– Executing [[email protected]:4] Set(“SIP/crossoverSIP-00001a03”, “DIAL_NUMBER=1111111111”) in new stack
– Executing [[email protected]:5] Set(“SIP/crossoverSIP-00001a03”, “DIAL_TRUNK_OPTIONS=trw”) in new stack
– Executing [[email protected]:6] Set(“SIP/crossoverSIP-00001a03”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/crossoverSIP-00001a03”, “0?nomax”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/crossoverSIP-00001a03”, “0?chanfull”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/crossoverSIP-00001a03”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/crossoverSIP-00001a03”, “DIAL_TRUNK_OPTIONS=W”) in new stack
– Executing [[email protected]:11] Macro(“SIP/crossoverSIP-00001a03”, “outbound-callerid|1”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/crossoverSIP-00001a03”, “0|SetCallerPres|”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/crossoverSIP-00001a03”, “0|Set|REALCALLERIDNUM= 2222222222”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/crossoverSIP-00001a03”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [[email protected]:6] Set(“SIP/crossoverSIP-00001a03”, “USEROUTCID=”) in new stack
– Executing [[email protected]:7] Set(“SIP/crossoverSIP-00001a03”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:8] Set(“SIP/crossoverSIP-00001a03”, “TRUNKOUTCID=<333333333>”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/crossoverSIP-00001a03”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [[email protected]:12] ExecIf(“SIP/crossoverSIP-00001a03”, “1|Set|CALLERID(all)=<333333333>”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/crossoverSIP-00001a03”, “0|Set|CALLERID(all)=”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/crossoverSIP-00001a03”, “0|Set|CALLERID(all)=”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/crossoverSIP-00001a03”, “0|SetCallerPres|prohib_passed_screen”) in new stack
– Executing [[email protected]:16] GotoIf(“SIP/crossoverSIP-00001a03”, “0?usercid”) in new stack
– Executing [[email protected]:17] Set(“SIP/crossoverSIP-00001a03”, “CALLERID(all)=<333333333>”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/crossoverSIP-00001a03”, “1?report”) in new stack
– Goto (macro-outbound-callerid,s,22)
– Executing [[email protected]:22] NoOp(“SIP/crossoverSIP-00001a03”, “CallerID set to “” <333333333>”) in new stack
– Executing [[email protected]:12] GosubIf(“SIP/crossoverSIP-00001a03”, “1?sub-flp-1|s|1”) in new stack

Hi!

If I understood your problem correctly you want to set Route Settings > Route Type of the outbound route you use between both PBX to Intra-Company

Please let me know if that does what you want otherwise please give an example…

Good luck and have a nice day!

Nick

Oops, I guess I misunderstood…

Your PRI card is in the old box…

I don’t know where it is in that old FreePBX but you need to find the setting that forces a specific CID…

On the new box it would be under CID Options > Allow Any CID of the trunk, you need to find the equivalent on the old box…

Good luck and have a nice day!

Nick

On my system setup in a similar way I have one Ian trunk between the two pbx’s with two outgoing routes route 1 is used to route internal calls. This is setup as an inter office and the cli on those calls is the internal cli.

The secound route is used to route the external Call’s this route is configured as an external route so the outbound cli of pbx a extensions is avail on pbx b, calls are then routed externally by pbx B using the out going cli of the calling extension on PBX A it works a treat, as long as your provider allows the sending of the cli and it is in the correct format otherwise the provider may rewrite the cli to a generic one.

The reason I used two outgoing routes was so internal calls had the internal caller name an extension. So what you want to do is perfectly possible

Jason