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 [19195551212@from-internal-xfer:1] Macro("SCCP/12345-00001234", "user-callerid,LIMIT") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SCCP/12345-00001234", "TOUCH_MONITOR=1457460289.428604") in new stack
    -- Executing [s@macro-user-callerid:2] Set("SCCP/12345-00001234", "AMPUSER=") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("SCCP/12345-00001234", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("SCCP/12345-00001234", "1?Set(REALCALLERIDNUM=)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SCCP/12345-00001234", "AMPUSER=") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SCCP/12345-00001234", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SCCP/12345-00001234", "AMPUSERCIDNAME=") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("SCCP/12345-00001234", "1?report") in new stack
    -- Goto (macro-user-callerid,s,15)
    -- Executing [s@macro-user-callerid:15] GotoIf("SCCP/12345-00001234", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,28)
    -- Executing [s@macro-user-callerid:28] Set("SCCP/12345-00001234", "CALLERID(number)=") in new stack
    -- Executing [s@macro-user-callerid:29] Set("SCCP/12345-00001234", "CALLERID(name)=") in new stack
    -- Executing [s@macro-user-callerid: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 [s@macro-user-callerid: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 [s@macro-user-callerid:32] Set("SCCP/12345-00001234", "CHANNEL(language)=en") in new stack
    -- Executing [19195551212@from-internal-xfer:2] Set("SCCP/12345-00001234", "ROUTEUSER=") in new stack
    -- Executing [19195551212@from-internal-xfer:3] GotoIf("SCCP/12345-00001234", "1?notblind") in new stack
    -- Goto (from-internal-xfer,19195551212,6)
    -- Executing [19195551212@from-internal-xfer:6] GotoIf("SCCP/12345-00001234", "0?,19195551212,2:outbound-allroutes,19195551212,2") in new stack
    -- Goto (outbound-allroutes,19195551212,2)
    -- Executing [19195551212@outbound-allroutes:2] Gosub("SCCP/12345-00001234", "sub-record-check,s,1(out,19195551212,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("SCCP/12345-00001234", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("SCCP/12345-00001234", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("SCCP/12345-00001234", "NOW=1457460298") in new stack
    -- Executing [s@sub-record-check:4] Set("SCCP/12345-00001234", "__DAY=08") in new stack
    -- Executing [s@sub-record-check:5] Set("SCCP/12345-00001234", "__MONTH=03") in new stack
    -- Executing [s@sub-record-check:6] Set("SCCP/12345-00001234", "__YEAR=2016") in new stack
    -- Executing [s@sub-record-check:7] Set("SCCP/12345-00001234", "__TIMESTR=20160308-130458") in new stack
    -- Executing [s@sub-record-check:8] Set("SCCP/12345-00001234", "__FROMEXTEN=unknown") in new stack
    -- Executing [s@sub-record-check:9] Set("SCCP/12345-00001234", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("SCCP/12345-00001234", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("SCCP/12345-00001234", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("SCCP/12345-00001234", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("SCCP/12345-00001234", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("SCCP/12345-00001234", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("SCCP/12345-00001234", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("SCCP/12345-00001234", "Outbound Recording Check from unknown to 19195551212") in new stack
    -- Executing [out@sub-record-check:2] Set("SCCP/12345-00001234", "RECMODE=") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("SCCP/12345-00001234", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("SCCP/12345-00001234", "recordcheck,1(dontcare,out,19195551212)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("SCCP/12345-00001234", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("SCCP/12345-00001234", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("SCCP/12345-00001234", "") in new stack
    -- Executing [out@sub-record-check:8] Return("SCCP/12345-00001234", "") in new stack
    -- Executing [19195551212@outbound-allroutes:3] Set("SCCP/12345-00001234", "MOHCLASS=default") in new stack
    -- Executing [19195551212@outbound-allroutes: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
1,275
Reaction score
339
Do you have the "Outbound Routes" module installed?

Can you try it with a SIP phone?
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
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
1,275
Reaction score
339
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?
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
Or I'm really curious if the Skinny protocol is doing it for some reason.
 

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
1,275
Reaction score
339
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.
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
Thought it might be SCCP. I have no experience with SCCP, so I have no idea's on a fix.
 

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
 

Members online

No members online now.

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top