Set CID question

(Lonely Admin) #21

That seemed to fix it. Thanks! What is the NoOp line changing? I could tell by the logs when it was broke that ${EXTEN} was being set…so how did the NoOp make it work?

(Lorne Gaetz) #22

It was as @david55 said, there was no line to catch calls other than the specific CID cases. The Noop line doesn’t do anything other than provide a priority 1 for those.

(Lorne Gaetz) #23

This is technically correct, but long experience with writing contexts for this purpose has given me a level of comfort with just using _. It’s my lazy shorthand instead of writing separate lines for DIDs/CIDs with a leading + character, as well as for cases where one or both are missing. The most likely unexpected extension to catch with this dialplan is h, and happily there is a condition catching that in from-pstn in FreePBX, to terminate the channel.

(Lonely Admin) #24

What would you recommend for priorities on the callerID lines, the no-op line, and the goto line. I’m reading the docs but just not getting it.

I would guess that the order of parsing I want is my callerID lines, then the noop, and then the goto. Also, on the matching bit, looks like _X. is what should be on the callerID lines, but for the NoOp should it be _. or something more along the lines of “not _X.”?

(Lorne Gaetz) #25

I recommend you use the dialplan as written. Add additional Set lines for each CID you need using the same template, just change the CID number.

(Lonely Admin) #26

Thanks so much everyone, got it going!

One last question and I’ll shut up for a while :slight_smile:

While troubleshooting I found that if I didn’t send any callerid info that somewhere along the way it gets set to “Anonymous”, where does that get set and is it configurable?

(Lorne Gaetz) #27

If FreePBX is doing it, you will see a line to that effect somewhere in the call trace. I suspect it’s coming from the provider with that CID.

(Lonely Admin) #28

From the Vega logs I see the following, first is subject to the callerid rewrite that we’ve been working on, second one is the one that shows “Anonymous”. I’m just learning the “show dialplan number@foo” commands for debugging…how do you set callerid info on those for testing?

LOG: 06/07/2021 13:21:37.085 ISDN     (I)R01C2f incoming
   call ref=[f10f0615]                          srce=TEL:1234567890 [0]

LOG: 06/07/2021 13:21:37.085 ROUTER   (I)R0bC00 FINDROUTE profile:20(To_SIP) plan:5
   call ref=[f10f0615]                            <-- ISDN    [2,1] dest=TEL:1234 
                                                  --> SIP     [2,1] dest=TEL:1234

LOG: 06/07/2021 13:22:56.465 ISDN     (I)R01C2f incoming
   call ref=[f10f061d]                          srce= [0]

LOG: 06/07/2021 13:22:56.465 ROUTER   (I)R0bC00 FINDROUTE profile:20(To_SIP) plan:5
   call ref=[f10f061d]                            <-- ISDN    [2,1] dest=TEL:1234 
                                                  --> SIP     [2,1] dest=TEL:1234

(David55) #29

The whole caller ID part, including the “/” should be left out. Asterisk uses the longest match, so a match including the caller ID will always win over the Noop line, without one. The order of the priority one lines doesn’t actually matter, although I would put the catch all one last.