QUESTION Inbound Trunk advice

BioGuyver

New Member
Joined
Jan 7, 2014
Messages
8
Reaction score
0
Hi All,
Forgive me if this is covered somewhere but my main issue is terminology. I am more than happy to do the research but I am stuck understanding what to look for.
I have an account with VoipTalk that has 2 numbers currently setup on it. I have another account (primary) that has 10 and is connected to an old cisco pbx that we wish to retire.
I have a clean Piaf install setup and patched from 2 days ago. I can call out and call between extensions without issue but inbound seems to be a bit of a dilemma.
Voiptalk have the option to direct any numbers you have with them to:
Route to a PBX by IP or DNS
Route to a SIP PBX
Route to Voip Office

My existing setup uses route to IP and all the numbers are pointed at the old cisco box. Its fairly standard in that it has 15 extensions with internal numbers (1001,1002,1003 etc) and our DDI range is routed to the correct number as needed.

Switch to testing with PiaF and if I route to the IP of PiaF I can nothing when calling one of the DDI numbers and nothing in the logs on PIAF from what I can see.
I spoke with VoipTalk support and they confirmed that their system wasn't able to route an incoming call when setup this way and stated something must be wrong at the pbx. For testing he changed to Route to SIP PBX and then the calls were showing in the log on my side but failing. He told me he was now routing the calls at the trunk? Basically the log showed a call starting from my voiptalk id and looking for an extension number that was the same as the DDI being called. I created an extension with the DDI number and suddenly everything worked when I had the softphone logged in as that extension.

My issue is (and I need help trying to get Voiptalk to understand what I am struggling with) is that so far my internal extensions have to be the full DDI number for inbound to work. This means I can't just dial an internal 4 digit number for internal calls. I am sure there must be a way to get this right so that PIAF can have 15 or so private extension numbers and then have calls to DDIs routed to the correct extension using the voip talk system. It works fine to the old cisco.

Can anyone suggest the terminology I need to search on here or be learning about? All my issues seem to be based around getting the sip provider and the pbx to talk the same language.

Any advice welcome.
Thanks
Ja
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
You want to create an Inbound Route for each DID and set the destination the the appropriate extension.
 

BioGuyver

New Member
Joined
Jan 7, 2014
Messages
8
Reaction score
0
Hi Ross,
I have inbound routes for all DIDs and I have them defined both as the national and the international number just in case that was the issue. This is why i am confused as I have everything set as i believe it should be if the PBX was seeing the DID number being passed to it. But the logs show me nothing being passed from what i can see at the time of me making an inbound call. I am running tail -f /var/log/asterisk/full and it doesn't change at all during call setup :(
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Clarification Time! :)
So when you call the DID number and have the extension number off of your PIAF set to the same thing as your DID, the call goes through.
When you call the DID number and have the extension number off of your PIAF set to anything else, the call doesn't go through.
Or am I misunderstanding?
 

BioGuyver

New Member
Joined
Jan 7, 2014
Messages
8
Reaction score
0
Spot on Ross.
I can see from the logs that when I don't have the extension created same as the DID, the log shows an inbound call from my voip talk account number and then fails looking for the extension that is the same as the DID. so if I create an inbound route for the DID and set the destination as any generic extension it fails. This is why I am confused right now.
 

john p

Member
Joined
Jul 9, 2013
Messages
82
Reaction score
6
Here is something I'd try. For an incoming DID you can test, point the route to a ring group with just the desired, internally tested extension in the group & see if the routing works. Also, you could try setting un an incoming routing, for testing, & leave the route DID blank (which should catch any "other" DID) then point that to a specific destination. These 2 things may tell you where the problem is. Hope this helps.
John
 

BioGuyver

New Member
Joined
Jan 7, 2014
Messages
8
Reaction score
0
Ok, So this is driving me a little nuts now.
I started looking at my config in order to try some of the suggestions above and I realised today, with not so tired eyes, that I had no inbound route defined for one of my numbers yet it was working fine. So here is actually the truth of what is happening right now:
PSTN call to a voip number signals the pbx with the account number from voiptalk. It looks for an extension that mathes the DID that is being called and if it finds it the call works and if it doesn't find it the call fails.
Here is a quick failure from the log:
[2014-09-23 11:34:37] NOTICE[1906][C-00000026]: chan_sip.c:25381 handle_request_invite: Call from '84XXXXX48' (77.240.48.94:5060) to extension '08XXXXXX03' rejected because extension not found in context 'default'.
84XXXXX48 = Voiptalk account ID
08XXXXXX03 = DID number supplied by VoipTalk

Now, defined in my inbound routes and have always been there is routing info that says that DID 08XXXXXX03 should go to ext 2001 and DID 08XXXXXX04 should go to ext 2002.
This means the inbound route is being ignored entirely?
 

MGD4me

Guru
Joined
Feb 3, 2009
Messages
505
Reaction score
109
It would seem that you are doing everything correctly, so your issue is puzzling, to say the least. It would be beneficial (for us) to know that you basically have your configs set up as per the Voiptalk web site instructions. You may have already done so, but if you could confirm that your PBX is configured as they recommend, that would give us both a good basic 'starting point' to troubleshoot.

Although this example is for Trixbox, I would believe it should apply here as well. See: https://www.voiptalk.org/products/c...with-trixbox-for-use-with-voiptalk-setup.html
 

BioGuyver

New Member
Joined
Jan 7, 2014
Messages
8
Reaction score
0
Its been a long day but I just had another quick poke at the beast. I deleted the extension that has the same number as the DID and all calls to that DID then started failing.
I checked I have a generic extension with no restrictions on it and then setup a clean inbound route that had no DID on it and pointed it at the extension I have. The call fails again with the same error as above. It can't find an extension that matches the DID number even thou I have a softphone connected to my extension account that is set to receive any inbound call.

I can confirm I have been through the Trixbox setup from the voiptalk site and I have been on the phone with their support guy and yet I am still in the dark.
I have spent the day getting to grips with netstat and iftop on the linux box so I could be certain that requests are getting directly to the box that is running Piaf. My hardware firewall has a 1 to 1 NAT setup and all IPs from Voiptalk are open to it for all requested ports. I am connected to the PBX myself at the moment from in front of the firewall too and I have a softphone and hardware phone working fine talking to the box so I know the firewall is happy to pass the communication.

With all the messing about that has gone on I am going to check the trixbox config again just to be sure.
 

BioGuyver

New Member
Joined
Jan 7, 2014
Messages
8
Reaction score
0
Ok, So I confirmed the info for the trixbox on the link above to be exactly the same as my setup as best it can be given the differences in versions.
No calls can get through right now and they all fail with this error:
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
[2014-09-23 17:28:12] NOTICE[1906][C-00000042]: chan_sip.c:25381 handle_request_invite: Call from '84XXXXX48' (77.240.48.94:5060) to extension '08XXXXXXX04' rejected because extension not found in context 'default'.

So it is still looking for an extension that is called the DID number rather than going to 2001 which is a softphone with an inbound route pointing at it for any DID and any CID.
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Looks like you have a context issue - notice the context 'default'. IIRC that's not standard in PIAF. Generally anything internal should be in from-internal. Trunks should be from-trunk.
 

BioGuyver

New Member
Joined
Jan 7, 2014
Messages
8
Reaction score
0
Thanks Ross,
I have only seen a couple of things that mention don't change the context unless you know what you are doing. I guess I will start reading up on what they are and how they work. Anyone got a link to a solid guide on this?
Thanks for the help so far guys.
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Check the context= setting in your trunk configuration, and the context setting for the destination extension.
 

MGD4me

Guru
Joined
Feb 3, 2009
Messages
505
Reaction score
109
BioGuyver,

I just reviewed the Trixbox link (above) in more detail, and I think Ross is correct. Voiptalk does not specify a context in their trunk configuration, so they must be doing something else behind the scenes. Even so, open up your Trunk configuration, and add the line 'context=from-trunk' to the Outgoing Settings.

Possibly what might be happening "as-is", is if you have "something" added to the end of your Register String, like an Account ID, UserID, or any other number, then the Inbound Route *could* be looking for this as an extension when a call is received, by-passing your Inbound Route. Just a WAG here, but without being at your console it is pure speculation.
 

BioGuyver

New Member
Joined
Jan 7, 2014
Messages
8
Reaction score
0
Hey guys,
Apologies for the delay.
Well the good news is that it is now finally working, or at least calls are routing to the correct places at the moment. I have to say a big thanks for the pointers as they all helped me narrow the issue and confirm I was not going insane.

So after the talk about context, I checked there was nothing in the trunk config on the GUI. I added the context=from-trunk as suggested and still no joy. I decided to look at the conf files to see what I could see. I grepped for context= and got plenty of results with some saying local and some from-internal. I found the file with the from-trunk that I had added and found it also had a line for context=voiptalk_incoming and context=default. I removed all the context strings from the file, rebooted and everything suddenly worked. The default and voiptalk_incoming were both added a various times during testing either with voiptalk directly or from trying other options. They were not visible in the trunk config on the GUI but were in the file. Removing them removed the issue and calls started hitting the extensions they were supposed to. The Trixbox howto (although a little old) does still work on my box if you leave the context out all together.

I haven't yet tried the context=from-trunk on the working system and wondered what you guys thought? Should I add it and if it works leave it there or should I just leave well enough alone now its working? :)

Thanks again.
Jay
 

Members online

Forum statistics

Threads
25,815
Messages
167,789
Members
19,245
Latest member
rahee
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