QUESTION Changing Outgoing CID based on trunk/outbound route

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
Hi,
I'm using one extension (cordless phone), and wondering if it's possible to change the outbound caller ID, based on adding a prefix or suffix to the number I dial.

I've tried this a few different ways with no success. Prepend/prefixes,

I have two VoIP.ms trunks, registering to different sub-accounts.

Please advise if there's a way to do this, or let me know what I'm doing wrong.

Thanks
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Sure - that would be all in the outbound routes. Please post the output of 'status' from either the PBX console or an SSH session so we can further assist.
 

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
Thank you, sorry for omitting the pertinent info:
PBX in a Flash PURPLE Status Program
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
lqqqqqqqqqqqqqqqqqqqSYSTEM INFORMATION *VERIFIED*qqqqqqqqqqqqqqqqqqqqqk
x Asterisk = ONLINE | Dahdi = ONLINE | MySQL = ONLINE x
x SSH = ONLINE | Apache = ONLINE | Iptables = ONLINE x
x Fail2ban = ONLINE | Internet = ONLINE | Ip6Tables = ONLINE x
x Disk Free = ADEQUATE| Mem Free = ADEQUATE| NTPD = ONLINE x
x SendMail = ONLINE | Samba = ONLINE | Webmin = ONLINE x
x Ethernet0 = ONLINE | Ethernet1 = N/A | Wlan0 = N/A x
x x
x PIAF Installed Version = 2.0.6.2 under *HARDWARE* x
x FreePBX Version = 2.10.1.9 x
x Running Asterisk Version = 1.8.19.1 x
x Asterisk Source Version = 1.8.19.1 x
x Dahdi Source Version = 2.6.1 x
x Libpri Source Version = 1.4.12 x
x IP Address = 192.168.1.105 on eth0 x
x Operating System = CentOS release 6.2 (Final) x
x Kernel Version = 2.6.32-220.17.1.el6.i686 - 32 Bit x
x Incredible Version = 403 x
mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
 

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
Please advise what I might be missing. I have two different trunks with two different SIP registrations with CID defined.

I've tried reloading the dialplan to no avail.

Thank you,
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Sorry about that. On mobile so I can't give you screenshots but you want to do something like this. Create a new inbound route for each custom outbound caller ID that you want. Make sure to choose the override extension check box by the Cid. Then in the match patterns put your normal outbound rules (1nxxxxxxxxx etc) and in the / box, put your extension number. Submit changes. Move this route above all other routes. Apply configuration changes. That should get you going. Again sorry I'm on mobile so I can't give you screenshots. Once I'm in front of my computer tonight I'll try and post some screenshots.
 

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
Hi Ross, thanks for the feedback; sorry for the delayed reply. (I haven't been email alerts for new replies...)

I wasn't aware of the need to create inbound routes, however I tried this, too with no change.

The outbound route, which caller ID I'm trying to pass is the highest, with "Override extension" checked and the dial pattern that matches. It's the only route that has NXXNXXXXXX - the other route has 1NXX....

Not sure if my ATA is messing it up or what the issue is.

Both trunks are using my PAP2T at the moment with the same cordless phone. I'm hoping that by adding a 1+### I can get one outbound display, or without the 1 get a different one. (I'm open to using other digits but I get a congestion message when I tried using 2 | 1NXXX... "All circuits are busy now..."

Did something get messed up on my system? - Thanks for your help.
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Oh - that's a typo. I didn't mean Inbound Route. That's supposed to be outbound routes. Regardless, here are the screenshots I mentioned. Does your outbound route that you have configured at the moment look similar to this? On the far right are the extensions to match. In this case, it matches 201-208.
zc2mcPK.jpg
 

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
Thanks very much, Ross.

My trunks look similar, however on the "troubling route" - only has NXXNXXXXXX as a dial pattern and its own trunk sequence (with the same caller ID) at the bottom.

I'm not sure what's gone wrong. :( -- Not sure if it's related or not, but sometimes calls aren't coming in to this DID (CallCentric DID).
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
The actual dial pattern (match part) shouldn't matter, as long as you end up going out on that route. Any chance you can post some call logs? Run "asterisk -vvvr" through SSH, place a test call out, and post the log (with phone numbers, other sensitive data removed) here inside [ code ] tags.
Something else - your routes may be fine. With VoIP.ms, you choose in the control panel whether the device is a PBX or actual extension (desk phone, ATA, etc.), and can also force override all CID for the (sub)account. May be worth double checking those as well
 

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
Thanks for your feedback. Sorry it took me a couple of weeks to try this.

The first thing I noticed after running "asterisk -vvvr" is: "admin logged on" and "admin logged off" very often/quickly, one after the next...
I also saw 0?Set(CALLERPRES()=prohib_passed_screen)") in new stack

Thanks for your help! :)


Code:
Manager 'admin' logged on from 127.0.0.1
  == Manager 'admin' logged off from 127.0.0.1
  == Manager 'admin' logged on from 127.0.0.1
  == Manager 'admin' logged off from 127.0.0.1
  == Manager 'admin' logged on from 127.0.0.1
  == Manager 'admin' logged off from 127.0.0.1
  == Manager 'admin' logged on from 127.0.0.1
.....
Executing [NXXNXXXXX@from-internal:1] Macro("SIP/200-00000123", "user-callerid,LIMIT,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/200-00000123", "AMPUSER=###") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/200-00000123", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/200-00000123", "1?Set(REALCALLERIDNUM=200)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/200-00000123", "AMPUSER=###") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/200-00000123", "AMPUSERCIDNAME=*****") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/200-00000123", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/200-00000123", "AMPUSERCID=###") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/200-00000123", "CALLERID(all)="*****" <200>") in new stack
    -- Executing [s@macro-user-callerid:9] GotoIf("SIP/200-00000123", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:10] ExecIf("SIP/200-00000123", "1?Set(GROUP(concurrency_limit)=200)") in new stack
    -- Executing [s@macro-user-callerid:11] ExecIf("SIP/200-00000123", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:12] GosubIf("SIP/200-00000123", "7?sub-ccss,s,1(from-internal,NXXNXXXXX)") in new stack
    -- Executing [s@sub-ccss:1] ExecIf("SIP/200-00000123", "0?Return()") in new stack
    -- Executing [s@sub-ccss:2] Set("SIP/200-00000123", "CCSS_SETUP=TRUE") in new stack
    -- Executing [s@sub-ccss:3] GosubIf("SIP/200-00000123", "0?monitor_config,1(from-internal,NXXNXXXXX):monitor_default,1(from-internal,NXXNXXXXX)") in new stack
    -- Executing [monitor_default@sub-ccss:1] GotoIf("SIP/200-00000123", "0?is_exten") in new stack
    -- Executing [monitor_default@sub-ccss:2] StackPop("SIP/200-00000123", "") in new stack
    -- Executing [monitor_default@sub-ccss:3] Return("SIP/200-00000123", "FALSE") in new stack
    -- Executing [s@macro-user-callerid:13] GotoIf("SIP/200-00000123", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,26)
    -- Executing [s@macro-user-callerid:26] Set("SIP/200-00000123", "CALLERID(number)=200") in new stack
    -- Executing [s@macro-user-callerid:27] Set("SIP/200-00000123", "CALLERID(name)=*****") in new stack
    -- Executing [s@macro-user-callerid:28] Set("SIP/200-00000123", "CHANNEL(language)=en") in new stack
    -- Executing [NXXNXXXXX@from-internal:2] Set("SIP/200-00000123", "MOHCLASS=default") in new stack
    -- Executing [NXXNXXXXX@from-internal:3] ExecIf("SIP/200-00000123", "1?Set(TRUNKCIDOVERRIDE="Home" <NXXNXXXXX>)") in new stack
    -- Executing [NXXNXXXXX@from-internal:4] Set("SIP/200-00000123", "_NODEST=") in new stack
    -- Executing [NXXNXXXXX@from-internal:5] Gosub("SIP/200-00000123", "sub-record-check,s,1(out,NXXNXXXXX,)") in new stack
.....
.....
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/200-00000123", "0?Set(CALLERPRES()=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/200-00000123", "0?Set(REALCALLERIDNUM=200)") in new stack
    -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/200-00000123", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,6)
    -- Executing [s@macro-outbound-callerid:6] Set("SIP/200-00000123", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:7] Set("SIP/200-00000123", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("SIP/200-00000123", "TRUNKOUTCID="" <NXXNXXXXX>") in new stack
    -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/200-00000123", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,12)
    -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/200-00000123", "1?Set(CALLERID(all)="Home" <NXXNXXXXX>)") in new stack
    -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/200-00000123", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/200-00000123", "1?Set(CALLERID(all)=Home <NXXNXXXXX>)") in new stack
    -- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/200-00000123", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
 

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
I just tried dialing from a softphone on my cell phone and it used the dialing plans of the trunks as specified.

Could my PAP2T Dial plan be causing trouble?

This is what I have:
( P20 | [4689]11 | <:1>[2-9]xx[2-9]xxxxxxS0 | 1[2-9]xx[2-9]xxxxxxS0 | 011xxxxxxx. | [#*x][#*x][#*x][#*x]. )

TIA,
 

kwimberl

New Member
Joined
Aug 27, 2008
Messages
26
Reaction score
2
Yes, your pap is sending the call after conforming it to it's own dial pattern regardless of what you dial...
 

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
Thank you, for experimental purposes I changed the dial plan to:
( [23456789]11 | *xxx. | <:1>[2-9]xx[2-9]xxxxxxS0 | 1[2-9]xx[2-9]xxxxxxS0 | 011xxxxxxx. | [#*x] [*x][*x][*x][*x][*x][*x][*x][*x][*x][*x][*x]. )

...but it still results in the same.

Please let me know if there is some way around this. (Am I banging my head against the phone, and there's no way to do it, or is there a way to do it that we can try?)
Thank you!!
 

TwigsUSAN

Guru
Joined
Apr 7, 2011
Messages
215
Reaction score
24
Could you please give us an example of how you are trying to dial the number.
 

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
Thanks for the feedback.
Default trunk NXX-XXXXX (212-000-1234)
Secondary trunk 1-NXX-XXXXXX (1-212-000-1234)

The issue is, CID displayed is that off secondary trunk, even when no 1+area-code-number is entered.
When I dial either pattern, NXX or 1NXX... it shows CID of trunk that should have 1NXX...

I hope that clarifies.
Thank you
 

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
To add, as kwimberl commented earlier, it appears that the PAP2T is messing it up, as VoIP.ms CDR's show 1NXX even though I didn't dial the 1.

....When I dial using Taki (softphone) on my BlackBerry it follows the dial patterns and trunks as specified.
 

TwigsUSAN

Guru
Joined
Apr 7, 2011
Messages
215
Reaction score
24
So I don't have one of these devices, but I am wondering if you remove the <:1> what would happen. I am wondering if the adds a 1 for a 10 digit call.
 

ramboaz

New Member
Joined
Mar 11, 2011
Messages
16
Reaction score
0
Thank you, TwigsUSAN. I should have looked more carefully, but you're right. That fixed it! :) -YAY!!!

I really appreciate the peer feedback on this board.

Have a good one! :)
 

TwigsUSAN

Guru
Joined
Apr 7, 2011
Messages
215
Reaction score
24
That is the problem. I just found this and it confirms my suspicion.

<dialed:substituted> This is used for sequence substitution, you can use this to indicate that certain numbers dialed are replaced by other characters. The dialed digits can be zero or more characters.
For example with this sequence <:1555>xxxxxxx if the user dial a 7 digit number, the number 1555 is added to the beginning of the sequence. If the user press 6782345, the system transmits 15556782345.
 

Members online

No members online now.

Forum statistics

Threads
25,825
Messages
167,849
Members
19,250
Latest member
mark-curtis
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