SOLVED Different CallerIDs for different outbound routes with SCCP

waldo22

New Member
Joined
May 5, 2015
Messages
7
Reaction score
1
I'm using Asterisk 13.0.59 and FreePBX Distro 10.13.66-1. I understand that you are experts on PIAF, but hopefully this will be simple for someone more knowledgeable than me.

I have been trying for about a week to get outbound routes working with different caller IDs, but they all still show my trunk outbound CID regarless of which route I use.

All routes are using the same trunk.

I am using the Extension Routing commercial module to limit certain extensions to certain outbound routes, and each outbound route has caller ID set with a route CID, override extension => yes, and is not set as an emergency route.

Calling out of all routes still presents my trunk CID. The trunk outbound CallerID is set to "Block Foreign CIDs", not to "Force Trunk CID". The trunk "Hide CallerID" is set to "No".

How in the world does one make this work?

I am semi-comfortable with the Asterisk CLI, and have decent *nix and mysql skills.

I would prefer to do this over the phone, and I'm happy to pay a $100 bounty for the help, unless it takes more than an hour, in which case I will pay more.

Please PM me if you're willing to help, and I'll post the solution to this forum.

-Wes
 

waldo22

New Member
Joined
May 5, 2015
Messages
7
Reaction score
1
yes, SIP trunk through Broadvoice. They say they allow any CID as long as it's one of our DIDs, and the tech support guy watched a call come through with us sending the CID from the trunk.

Here's a snippet from the Asterisk CLI calling 919-555-1212 from extension 12345.
Notice at the bottom it shows TRUNKCIDOVERRIDE=9194441234 where 919-444-1234 is our Trunk CID instead of the outbound route CID.

Code:
    -- Executing [[email protected]:1] Macro("SCCP/12345-00001234", "user-callerid,LIMIT") in new stack
    -- Executing [[email protected]:1] Set("SCCP/12345-00001234", "TOUCH_MONITOR=1457460289.428604") in new stack
    -- Executing [[email protected]:2] Set("SCCP/12345-00001234", "AMPUSER=") in new stack
    -- Executing [[email protected]:3] GotoIf("SCCP/12345-00001234", "0?report") in new stack
    -- Executing [[email protected]:4] ExecIf("SCCP/12345-00001234", "1?Set(REALCALLERIDNUM=)") in new stack
    -- Executing [[email protected]:5] Set("SCCP/12345-00001234", "AMPUSER=") in new stack
    -- Executing [[email protected]:6] GotoIf("SCCP/12345-00001234", "0?limit") in new stack
    -- Executing [[email protected]:7] Set("SCCP/12345-00001234", "AMPUSERCIDNAME=") in new stack
    -- Executing [[email protected]:8] GotoIf("SCCP/12345-00001234", "1?report") in new stack
    -- Goto (macro-user-callerid,s,15)
    -- Executing [[email protected]:15] GotoIf("SCCP/12345-00001234", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,28)
    -- Executing [[email protected]:28] Set("SCCP/12345-00001234", "CALLERID(number)=") in new stack
    -- Executing [[email protected]:29] Set("SCCP/12345-00001234", "CALLERID(name)=") in new stack
    -- Executing [[email protected]:30] Set("SCCP/12345-00001234", "CDR(cnum)=") in new stack
[2016-03-08 13:04:58] WARNING[1871]: func_cdr.c:352 cdr_write_callback: CDR requires a value (CDR(variable)=value)
    -- Executing [[email protected]:31] Set("SCCP/12345-00001234", "CDR(cnam)=") in new stack
[2016-03-08 13:04:58] WARNING[1871]: func_cdr.c:352 cdr_write_callback: CDR requires a value (CDR(variable)=value)
    -- Executing [[email protected]:32] Set("SCCP/12345-00001234", "CHANNEL(language)=en") in new stack
    -- Executing [[email protected]:2] Set("SCCP/12345-00001234", "ROUTEUSER=") in new stack
    -- Executing [[email protected]:3] GotoIf("SCCP/12345-00001234", "1?notblind") in new stack
    -- Goto (from-internal-xfer,19195551212,6)
    -- Executing [[email protected]:6] GotoIf("SCCP/12345-00001234", "0?,19195551212,2:outbound-allroutes,19195551212,2") in new stack
    -- Goto (outbound-allroutes,19195551212,2)
    -- Executing [[email protected]:2] Gosub("SCCP/12345-00001234", "sub-record-check,s,1(out,19195551212,dontcare)") in new stack
    -- Executing [[email protected]:1] GotoIf("SCCP/12345-00001234", "0?initialized") in new stack
    -- Executing [[email protected]:2] Set("SCCP/12345-00001234", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [[email protected]:3] Set("SCCP/12345-00001234", "NOW=1457460298") in new stack
    -- Executing [[email protected]:4] Set("SCCP/12345-00001234", "__DAY=08") in new stack
    -- Executing [[email protected]:5] Set("SCCP/12345-00001234", "__MONTH=03") in new stack
    -- Executing [[email protected]:6] Set("SCCP/12345-00001234", "__YEAR=2016") in new stack
    -- Executing [[email protected]:7] Set("SCCP/12345-00001234", "__TIMESTR=20160308-130458") in new stack
    -- Executing [[email protected]:8] Set("SCCP/12345-00001234", "__FROMEXTEN=unknown") in new stack
    -- Executing [[email protected]:9] Set("SCCP/12345-00001234", "__MON_FMT=wav") in new stack
    -- Executing [[email protected]:10] NoOp("SCCP/12345-00001234", "Recordings initialized") in new stack
    -- Executing [[email protected]:11] ExecIf("SCCP/12345-00001234", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [[email protected]:12] Set("SCCP/12345-00001234", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [[email protected]:13] ExecIf("SCCP/12345-00001234", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [[email protected]:14] GotoIf("SCCP/12345-00001234", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [[email protected]:17] GotoIf("SCCP/12345-00001234", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [[email protected]:1] NoOp("SCCP/12345-00001234", "Outbound Recording Check from unknown to 19195551212") in new stack
    -- Executing [[email protected]:2] Set("SCCP/12345-00001234", "RECMODE=") in new stack
    -- Executing [[email protected]:3] ExecIf("SCCP/12345-00001234", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [[email protected]:7] Gosub("SCCP/12345-00001234", "recordcheck,1(dontcare,out,19195551212)") in new stack
    -- Executing [[email protected]:1] NoOp("SCCP/12345-00001234", "Starting recording check against dontcare") in new stack
    -- Executing [[email protected]:2] Goto("SCCP/12345-00001234", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [[email protected]:3] Return("SCCP/12345-00001234", "") in new stack
    -- Executing [[email protected]:8] Return("SCCP/12345-00001234", "") in new stack
    -- Executing [[email protected]:3] Set("SCCP/12345-00001234", "MOHCLASS=default") in new stack
    -- Executing [[email protected]:4] ExecIf("SCCP/12345-00001234", "1?Set(TRUNKCIDOVERRIDE=9194441234)") in new stack
(we're using Cisco 7960 phones with Chan-SCCP-B)
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
698
Reaction score
94
Location
Ottawa, Canada
And by "Outbound Routes" I mean the add-on module that lets you restrict extensions from routes. I think it's called Extension Routing or something.
 

waldo22

New Member
Joined
May 5, 2015
Messages
7
Reaction score
1
I have "Extension Routes" installed. Is that what you mean?

I don't have a SIP phone handy, but I'll see if I can conjure one up. I may be able to put SIP on one of the 7960s to test.

Thanks for the advice.
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
698
Reaction score
94
Location
Ottawa, Canada
So, you don't have 919-444-1234 in the Trunk Outbound CallerID, yet the Trunk is over riding the setting. Almost sounds like a bug. Did you *ever* set the Trunk Outbound CID, at any poiunt at all? Like during a testing stage or something?
 

waldo22

New Member
Joined
May 5, 2015
Messages
7
Reaction score
1
So, you don't have 919-444-1234 in the Trunk Outbound CallerID, yet the Trunk is over riding the setting. Almost sounds like a bug. Did you *ever* set the Trunk Outbound CID, at any poiunt at all? Like during a testing stage or something?
I do have 919-444-1234 in the Trunk Outbound CallerID.

I thought about that and was going to try removing it, but I got this JS Alert message:
It is highly recommended that you define an Outbound CallerID on all trunks, undefined behavior can result when nothing is specified. The CID Options can control when this CID is used. Do you still want to continue?
So I decided not to remove it.

Most of the documentation I have read says that extension CID and outbound Routes CID should override the trunk CID unless the trunk is specifically set to "Force Trunk CID".

Should I remove it?
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
698
Reaction score
94
Location
Ottawa, Canada
Ohh, I would try removing it from the Trunk then as a 1st step. If that doesn't turn out to be the issue then I'd try it from a SIP device instead of SCCP.
 

waldo22

New Member
Joined
May 5, 2015
Messages
7
Reaction score
1
Ohh, I would try removing it from the Trunk then as a 1st step. If that doesn't turn out to be the issue then I'd try it from a SIP device instead of SCCP.
Removing trunk CID didn't change anything, unfortunately
 

waldo22

New Member
Joined
May 5, 2015
Messages
7
Reaction score
1
Downloaded Blink SIP client and tried with that.

Works great. Must be something in the way that Chan-SCCP is set up as a custom extension.

I can't tell if it's not using the correct outbound route, or if it isn't sending callerID. Probably not using the route.
 

waldo22

New Member
Joined
May 5, 2015
Messages
7
Reaction score
1
Chan-SCCP-b has fields in the database called:
"cid_name" and
"cid_num".

These have to be set in order for the Extension Routes module to route the lines through the correct route, and it doesn't get set when you create the custom extension for some reason.

In addition, I had to issue the command "sccp line reload 1234" to reload the config for line 1234.

Everything working now. Thanks for the troubleshooting!

-Wes

-Wes
 
  • Like
Reactions: rjaiswal

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,571
Messages
138,925
Members
14,674
Latest member
gnordli