Incoming Caller ID, Vega 50 & FreePBX: how can I get this working pls?

configuration
vega
Tags: #<Tag:0x00007f7026cc2610> #<Tag:0x00007f7026cc2408>

(Steve Root) #1

Hello everyone.
Since our phone system died last week I decided it was finally time to move to FreePBX for our small family business. It’s been great so far but now I’m stuck on the last detail and my google-fu and reading of manuals and guides has let me down in finding a solution. It’s probably just one setting… I’ve just no idea which one.

We have a Sangoma Vega 50 4 x FXO, for incoming UK BT style lines, which in turn is talking to our FreePBX server.
Calls work perfectly both incoming and outgoing, but we get no Caller ID on our extensions, just ‘vega’ which is the incoming trunk name.

I can see the Vega is getting the Caller ID from the BT line; here’s a log file example:

LOG: 12/07/2016 09:12:12.657 POTS     (I)R01Cad incoming
   call ref=[f10300e2]                          srce=TEL:077XXXXXXX [0]  #number hidden for this forum post!
LOG: 12/07/2016 09:12:12.675 ROUTER   (I)R0bC00 FINDROUTE profile:20(To_SIP) plan:1
   call ref=[f10300e2]                            <-- POTS    [1,1] dest= 
                                                  --> SIP     [2,1] dest=TEL:0201
LOG: 12/07/2016 09:12:12.675 ROUTER   (I)R0bC00 call proceeding
   call ref=[f10300e2]
LOG: 12/07/2016 09:12:17.545 SIP      (I)R03C39 connect g711Alaw64k (Profile 1 - Voice)
   call ref=[f10300e2]
LOG: 12/07/2016 09:14:55.980 SIP      (I)R04C39 disconnect(disc ind) 16

In FreePBX CDR logs, I can see the call;

2016-07-12 09:12:13 1468311045.428 "vega" <vega> 0201 Dial 81 ANSWERED 01:14

The incoming trunk is set:

Trunk Name: Vega
Hide CallerID: No
CID Options: Allow Any CID
PJSIP Settings+
UserName: Username is trunk name
Authentication: Inbound
Registration:Recieve

And inbound routes:

Description: Analog Lines via vega50
CallerID Number: Any
CID Lookup Source: None

obviously there are plenty of other settings I’ve not shown so please ask I’ve missed the important ones (which may well help me solve my settings).

Other things that might be relevant:
81 is a call group that rings multiple phones.
I have a SIP incoming trunk doing to the same hung group and the incoming caller IDs display for that.

If anyone can point out my error and how to fix I’d appreciate it.
Thanks
Steve


FreePBX, Sangoma Vega 50 & PJSIP
(David) #2

I’ve worked a lot with Vega units - i suspect the problem is in your dialing plan.

If you ssh onto the vega, and type - log display on
then make an inbound call - you should see which “route” the vega is using - as a starting place.
If you then screenshot the inbound route - i suspect its a missing token :slight_smile:


(Steve Root) #3

Thanks David, that’s really useful.

The word ‘Token’ lead me to finding ‘Token Help’ as a drop down on the dial plan pages. That in turn lead me to finding examples of settings that work to pass the caller ID to the SIP destination. For others reading in the future,

Source - enter "IF:02..,TELC:<.*>"   #where 02.. is the source, like 0201
Destination - enter "IF:9901,TELC:<1>"

The observation here is that <.*> in the source collects the caller ID and <1> drops it on the destination.
Checking the vega log (by telnet, it didn’t like SSH, but the log was the same as I found through the web interface);

LOG: 12/07/2016 15:53:34.152 POTS     (I)R01Cac incoming
   call ref=[f10600d3]                          srce=TEL:07912933052 [0]
LOG: 12/07/2016 15:53:34.170 ROUTER   (I)R0bC00 FINDROUTE profile:20(To_SIP) plan:1
   call ref=[f10600d3]                            <-- POTS    [1,1] dest=
                                                  --> SIP     [2,1] dest=TEL:0201,TELC:077XXXXXX #number hidden for this forum post
LOG: 12/07/2016 15:53:34.170 ROUTER   (I)R0bC00 call proceeding
   call ref=[f10600d3]
LOG: 12/07/2016 15:53:39.435 SIP      (I)R03C1c connect g711Alaw64k (Profile 1 - Voice)
   call ref=[f10600d3]
LOG: 12/07/2016 15:56:00.522 SIP      (I)R04C1c disconnect(disc ind) 16
   call ref=[f10600d3]
LOG: 12/07/2016 15:56:00.532 POTS     (I)R05Cac disconnect call cause 16
   call ref=[f10600d3]

So, I now see the Vega is passing the Caller ID. Only problem is, FreePBX still shows ‘vega’ as the ID. I’ve spent a few more hours googling and reading and I know I’ll get there eventually, but if you can point me where to look I’d be grateful.
The best hint I’ve found in the FreePBX logs so far is;

 dialparties.agi: Starting New Dialparties.agi
 dialparties.agi: Caller ID name is 'vega' number is 'vega'
       > dialparties.agi: USE_CONFIRMATION:  'FALSE'
       > dialparties.agi: RINGGROUP_INDEX:   ''
 dialparties.agi: Methodology of ring is  'ringall'

Maybe ‘TELC’ is not the string FreePBC is expecting to parse as CallerID?


Call ID Anonymous from Vega 50 GW, Dial Plan not working
(Gerardo Barajas) #4

Hi there,

How’s your SIP profile configured?

Regards.


(Steve Root) #5

On the Vega50 FXO

Name	    profile1
Interface ID	    9901
Local Domain	    10.18.6.231
Alternative Local Domain	    alt-reg-domain.com
From Header 'userinfo'	Authentication Username
Contact Header 'userinfo'	Calling Party
P Header 'userinfo'	Calling Party
From Header 'host'	Local Domain
To Header 'host'	   Local Domain
Redirection 'host'	Local Domain
Transport	UDP
Capability Set	2-voice+t38Udp
Reliable Provisional Responses  off  
DTMF Transport	rfc2833  
DTMF INFO	mode1  
RFC2833 payload  (96-127)	    101

On FreePBX

   Trunk Name     vega
   Hide CallerID  No
   Outbound CallerID       <our number>
   CID Options Allow Any CID 
   Maximum Channels  
   Asterisk Trunk Dial Options  [defaults = T, System]
   Continue if Busy  No
   Disable Trunk   No

PJSIP Settings General
Username     Username is trunk name
Secret     ••••••••
Authentication Inbound
Registration  Recieve   
SIP Server      10.18.6.230 (greyed out - left from when I tried Auth:outbound & Reg:Send/etc)
SIP Server Port      5060
Context      from-pstn

In my research, I found;
wiki.freepbx.org/display/VG/Vega+50+FXO+with+FreePBX
Is empty.

wiki.freepbx.org/display/VG/Vega+50+FXO+with+a+Generic+PBX
Suggests not registering the Vega with the PBX

wiki.freepbx.org/display/VG/Registering+Vega+with+FreePBX
Suggests registering the Vega with the PBX.

I’m not sure of the reasons/difference between registered and unregistered, but I think it’s inferred that unregistered is less secure, so I’ve assumed it’s not connected with my lack of caller ID display.
I also looked at the inbound routes, saw the ‘CID name prefix field’ and put some text there. That text does get displayed on the extensions along with our trunk name (eg “TestCID:vega”). So at least I can be sure the extensions know how to display things.

Thanks for your time,
Steve

PS - Sorry links don’t work, new user security :slight_smile:


(David) #6

this is a screenshot froma vega200 - but same principle (ignore the interface numbers)

I’d suggest not registering, and then using the TA: token to pass the call directly to the IP if your Freepbx


(Gerardo Barajas) #7

Here’s a useful link in Sangoma’s wiki:

http://wiki.sangoma.com/Vega-FAQ#No_CLI_SIP_END

Please tell us how this goes.


(Steve Root) #8

Solved!

That link was perfect thanks, and for others reading this in the future;

Change from
From Header 'userinfo': Authentication Username

To
From Header 'userinfo': Calling Party

In the Vega Sip Profile (Menu ‘SIP’, then ‘Modify’ in the SIP Profile section.

Coupled with the earlier change and as suggested by David to send on the CallerID within the Dialplan (<.*> and <1>).

Thanks for the help.


(David) #9

Doh - i forgot that setting, i don’t usually register, and use the TA token instead - but i’m glad it’s working for you :slight_smile:


(Peter ) #10

Hi Steve
don’t know if you are still following this. I’ve been trying to do a similar set-up but not getting as far as you: FreePBX can see my Vega (endpoints shows it is available), but the Vega won’t register. In my log I get this:
2018-03-24 14:35:41] WARNING[8593] res_pjsip_registrar.c: AOR ‘vega’ has no configured max_contacts. Endpoint ‘vega’ unable to register

Are you able to look into your AOR file (pjsip.aor) and see if your vega has max_contacts configured? Because if not, then I need to find another reason. I have a feeling its something simple in my set-up of the trunk, but I have just followed all the wiki instructions, so don’t know what. Thanks.


(Dave Burgess) #11

How many contacts do you have set in your PJ-SIP config for the Vega? The error says “none”. Have you tried setting the number of contacts to a larger number (say 4)?


(Peter ) #12

I tried, but not sure if I have done this correctly:
Using the built in file editor, I edited pjsip.aor_custom and put the whole of pjsip.aor inside it and edited this part:
[vega]
type=aor
qualify_frequency=60
contact=sip:192.168.0.110:5060
max_contacts=1

(ie added the last line to what I copied from the original unwritable pjsip.aor)

Should that have fixed it? It made no difference to the outcome. Got the same line stating :
AOR ‘vega’ has no configured max_contacts. Endpoint ‘vega’ unable to register


(Steve Root) #13

”res_pjsip_registrar.c: AOR ‘vega’ has no configured max_contacts. Endpoint ‘vega’ unable to register"

I always had that error. There was nowhere in the GUI to configure it that I found and everything worked, so I ignored it. I think I read it was a difference between pjsip and chansip but I can’t be sure of that


(Steve Root) #14

Actually, no configured max contacts is the error, I can’t recall if it also said that Vega was unable to register


(Peter ) #15

That’s very helpful to know.
So, in the Vega quick set-up page, did you set Registration to Off and Outbound Proxy Use to No.

Then in FreePBX trunk set-up, Authentication is Inbound, Registration is Receive.
That greys out Username and SIP server.

Secret is not greyed out, but is one required? If so, what does that match with?

I only want the incoming (BRI) calls to Vega to go to the FreePBX, not the other way around (which I think is your set-up).

Thanks


(Steve Root) #16

For outgoing calls, you decide by freepbx outbound routes, no?

I wrote myself lots of notes intending to share them but was never satisfied they were good enough. If it helps, this is the bit on Vega;

  1. Connecting POTS/PSTN lines
    Summary, connect the vega to the freepbx using registration mode: gateway, ID= name you’re calling trunk in freebpx (I chose ‘vega’) and password.
    In Freepbx, add trunk, name it (I chose ‘vega’), set the ‘secret’ to the same as the password you made up for the Vega, Authentication: Inbound, Registration: Recieve.
    http://wiki.sangoma.com/Vega-Registering-Vega-PRIFXO-with-FreePBX
    Note: The vega itself can be set to process calls in such a way as to route to different lines depending on the dial string.
    Although, I have Authentication: Outbound, Registration:Send, SIP Server: The Vega IP Address. Port 5060

Apologies for formatting, copy pasting via my phone as I’m away fromy laptop and office


(Peter ) #17

All sorted. The main thing I found was that I had to very carefully delete all existing settings (on the SIP page as well as in the Quick Setup page) before entering the new trunk name and password. The Vega did not do that well automatically (and I didn’t want to do a full factory reset).

So far I have only set up for incoming calls (BRI to Vega) to be routed to FreePBX using a simple dialplan in the Vega (altering the pre-set destination line in the “To_SIP” Dialplan to send the calls to the ip address of the FreePBX server. From memory it is something like IF:99…,TEL<1>,TA:192.168.x.x.


(United States) #18

@sudoroo I hope things are still going well with your setup. I too am in the middle of a new PBXact (running FreePBX) with Vega 60G setup and 3 POTS coming into its FXO ports. With

From Header ‘userinfo’: Authentication Username
Calls pass through but show “vega” as the caller ID

When making this switch: From Header ‘userinfo’: Calling Party
Calls show in asterisk but do not get routed to the ring group. the follow asterisk message shows:
Request ‘INVITE’ from ‘"MY CID NAME " <sip:MYPHONENUMBER@freepbx.ip >’ failed for ‘vega.ip:5060’ (callid: HEX.MYPHONENUMBER@HEX.freepbx.ip) - No matching endpoint found

I haven’t made any other changes like the call plan. When I switch it back, everything works as normal except back to “vega” for the caller ID. Any thoughts?


(Dave Burgess) #19

If we assume you’ve set the system up the “standard” way (normal, out-of-the-box set up) you are mixing Chan-SIP (which is how you probably set this up) and PJ-SIP (which is where that “no matching endpoint found” message comes from). You probably need to set this up an PJ-SIP trunk for what you’re trying to do to work.


(United States) #20

@cynjut this is setup with pjsip 5060 on both sides following the setup from the wiki. Calls run fine but don’t push caller ID; just the term “vega”. If I change the header on the vega device from username to calling party (in efforts to troubleshoot the problem), that’s when the calls fail hit the endpoint.