SOLVED Can't seem to configure a PJSIP Trunk

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
I'm setting up a new machine on Centos 7 with 16-15.2
Flowroute has informed me that chan_sip is no longer supported (I was trying to register on x.x.x.133 and getting reponses from x.x.x.134 (for example) due to mistranslation in the xxx.sip.flowroute.com name used to register. I'm not sure I believe them since I can plug in the old machine and it will connect in a jiffy with chan_sip, but whatever. PJSIP, here we come.

So, I followed (tried to follow) their guide, and no dice.

I'm getting the following error:

[2019-09-27 18:58:57] WARNING[2347]: res_pjsip_outbound_registration.c:792 schedule_retry: Temporal response '401' received from 'sip:us-east-nj.sip.flowroute.com:5060' on registration attempt to 'sip:[email protected]:5060', retrying in '60'

Steps I've taken:

In Setting > Asterisk SIP Settings, chan_pjsip, have PJSIP on port 5060 (per flowroute);
General SIP Settings, my external address is my DDNS, local networks are my 192.168 and my VPN of 10.0.

In the Trunk, I created a new PJSIP trunk and followed their guide: https://support.flowroute.com/customer/en/portal/articles/2960886-freepbx-pjsip-trunk-setup

I have my prefix (username) and password, the sip server us-east-nj.sip.flowroute.com, port is 5060.Match permit is all of their addresses as they request. Support path is yes and I set the codecs.

Not sure what else there could be to do. I'm only using flowroute for my trunks; the system has the default trunks which I think are all chan_SIP; I haven't tried to track them all down to disable, but it shouldn't matter.


Help?


Andrew
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,011
Reaction score
207
I am running IncrediblePBX 16-15.2 and have pjsip disabled. Here is what I use for Flowroute with chan_sip. You are not required to register the connection if you use IP authorization.
Code:
disallow=all
username=xxxxxxxx
type=friend
secret=xxxxxxxx
qualify=yes
insecure=port,invite
host=us-east-nj.sip.flowroute.com
fromdomain=us-east-nj.sip.flowroute.com
dtmfmode=rfc2833
directmedia=no
context=from-pstn-e164-us
canreinvite=no
allow=ulaw
This is my registration string (I'm old fashioned and like to see my instance registered on their web site.) userid:[email protected]

If you want to continue to fight with pjsip, make sure you have set its port to 5060 in the settings > asterisk sip setting and set the chan_sip port to something else.
 
Last edited:

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
Our registration is exactly alike. except that my disallow=all is above allow, but not first.
However, what's happening is that us-east-nj.sip.flowroute.com registers/comes back as 147.75.65.194 . However, info is being send from 147.75.65.193 (because multiple IPs are being used on the flowroute side) and this causes the mismatch.

I'm staring at a screenful of cli messages of for the second flowroute account on my system. I have 2 accounts (mine and a friend) which both register to flowroute - one seems to be fine. The second is throwing up errors. Both are identical PJSIP except for the username and passwords.

If I could get chan_sip working again, I'd ignore all of this and worry when chan_sip gets fully deprecated <g>.

andrew
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
@wardmundy

If I understand your post correctly, this will allow me to use chan_sip and not chan_pjsip?

I'd be thrilled - and likely operational.

Andrew
 
  • Like
Reactions: wardmundy

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
Ward,

I'm trying to follow the directions for bulkvs in the linked post.

I have disabled PJSIP in the advanced settings.

I have 4 possible SIP connections to flowroute (NJ, VA, WA and OR) and I have 2 different accounts connecting to flowroute with separate billing.
I have no problem replicating the directions 4 or 8 times, but I'm trying to get my facts down.

The directions state:
[bulkvs1](bulkvs);
host=199.255.157.198
[bulkvs2](bulkvs);
host=....

1. Is the trunk name in this description bulkvs?
2. If I have (for example) a trunk called FlowRouteNJ-FirstAccount and another called FlowRouteNJ-SecondAccount, would I create entries of

[FlowRouteNJ-FirstAccount1](FlowRouteNJ-FirstAccount);
host=x.y.z.a
[FlowRouteNJ-FirstAccount2](FlowRouteNJ-FirstAccount);
host=

and then duplicate this for Second Account and then duplicate the process again for VA, WA and OR?

3. Additionally, can I use a single line in the file and say
[FlowRouteNJ-FirstAccount1](FlowRouteNJ-FirstAccount);
host=x.y.z.a/24

or must all entries be a single IP?


I think I'm getting close <g>.


Andrew
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
I created a total of 8 FlowRoute trunks named
FlowRouteNJASB, FlowRouteVAASB, FlowRouteORASB and FlowRouteWAASB and then another set using my friend's initials.

each has the trunk details using one of the flowroute names - such as fromdomain=us-east-nj.sip.flowroute.com.

I created a long chain of aliases in /etc/asterisk/sip_custom_post.conf

[FlowRouteNJASB0](FlowRouteNJASB);
host=us-east-nj.sip.flowroute.com-
[FlowRouteNJASB1](FlowRouteNJASB);
host=147.75.65.192
[FlowRouteNJASB2](FlowRouteNJASB);
...

I have one of these for each of the IP blocks (so us-east-nj.sip.flowroute.com is 147.75.65.192-207
FlowRouteVAASB is 34.226.36.32-47

I'm still getting errors:
Code:
[2019-09-30 12:02:05] WARNING[8412][C-00000002]: Ext. s:7 @ from-sip-external: "Rejecting unknown SIP connection from 34.226.36.32"
This is a us-east-va.sip.flowroute IP. My Outbound Route is ordered NJ, VA, OR, WA.

Is Flowroute sending VA IPs via the NJ trunk?

Do I need to create a single trunk 'NJ' and have ALL the possible IP listings in this one section in sip_custom_post.conf?



Thoughts?

Andrew
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
@wardmundy,

Can you respond to the post above? I'm trying to get Flowroute to work correctly with 13-13.
Do I want 1 Trunk with ALL IPs or 4 separate with each of the IPs for each of their geo locations?

Or something else entirely?


Andrew
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
Ward, I can’t use 16-15 because I need faxing and you have said it is unreliable in 16-15.

I thought those instructions were fir chan_sip.

So, in 13-13, how do I get chan_sip working correctly with flowroute?

Andrew
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,011
Reaction score
207
Andrew, you don't need to set up every location for Flowroute in your system. I only have two trunks: NJ and VA set up. I'd recommend you stay with 13-13 and use chan_sip. I completely disabled PJSIP in the Settings>Advanced Settings>Dialplan and Operational>SIP Channel Driver (from BOTH to chan_sip.)
Once deciding to use chan_sip, make sure you set the port to 5060 in the Asterisk Sip Settings>chan_sip>Bind Port after you disable pjsip in the Advanced Settings.

Chan_Sip still works in 16-15 as well. True that no new development is being done on chan_sip, but it works so who cares? Flowroute absolutely works with chan_sip. From what I understand, you have a small setup so don't sweat it with pjsip. Flowroute is already in your default iptables so you should not have firewall issues. If you have inbound DID's, I simply use the registration string in chan_sip to make sure they get to my system.

I am actively using the configuration below in IncrediblePBX 13-13, IncrediblePBX 15-16 and VitelPBX 2.3.8-1. It just works. The one setting in the PEER details that didn't make it at the bottom of the screen capture is allow=ulaw. Add that at the bottom of the outgoing Peer Settings.

2448
2449
 
  • Like
Reactions: wardmundy

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,011
Reaction score
207
On your Flowroute account, go to Interconnection>inbound routes and use this for your inbound DID's from Flowroute and assign the route to the DID(s).
2450
 
  • Like
Reactions: wardmundy

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,011
Reaction score
207
Active registrations with Flowroute:
2451
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
Yes, that's what I have. However, us-east-nj.sip.flowroute.com will 'send' from several IP addresses.
I have the full block of IPs for us-east-nj.sip.flowroute.com added as a

I end up being disconnected:

[2019-10-07 12:35:41] NOTICE[2553]: chan_sip.c:29640 check_rtp_timeout: Disconnecting call 'SIP/flowrouteNJSIP_ASB-00000012' for lack of RTP activity in 31 seconds


Andrew
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,011
Reaction score
207
Yes, that's what I have. However, us-east-nj.sip.flowroute.com will 'send' from several IP addresses.
I have the full block of IPs for us-east-nj.sip.flowroute.com added as a

I end up being disconnected:

[2019-10-07 12:35:41] NOTICE[2553]: chan_sip.c:29640 check_rtp_timeout: Disconnecting call 'SIP/flowrouteNJSIP_ASB-00000012' for lack of RTP activity in 31 seconds


Andrew
Is that on incoming or outgoing or both? I have never had a disconnect issue.
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,011
Reaction score
207
Check your Asterisk SIP Settings > Chan_Sip and take a look at these parameters:
2452
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
Incoming Call is rejected.

I'm using SIP only. us-east-nj.flowroute.com is my only trunk

us-east-nj.sip.flowroute.com reports it is 147.75.65.194 (dns lookup); the call below comes in from flowroute as 147.75.65.193 and is rejected. 193 <> 194.
I have the IP block 147.75.65.192/28 whitelisted.

Obviously my number isn't 800-555-1212.

BTW - who the heck is 23.29.25.58 inside the call? Is this the caller (they are using VOIP)

Code:
Executing [[email protected]:1] NoOp("SIP/fl.gg-00000016", "Received incoming SIP connection from unknown peer to 18005551212") in new stack
    -- Executing [[email protected]:2] Set("SIP/fl.gg-00000016", "DID=18005551212") in new stack
    -- Executing [[email protected]:3] Goto("SIP/fl.gg-00000016", "s,1") in new stack
    -- Goto (from-sip-external,s,1)
    -- Executing [[email protected]:1] GotoIf("SIP/fl.gg-00000016", "1?setlanguage:checkanon") in new stack
    -- Goto (from-sip-external,s,2)
    -- Executing [[email protected]:2] Set("SIP/fl.gg-00000016", "CHANNEL(language)=en") in new stack
    -- Executing [[email protected]:3] GotoIf("SIP/fl.gg-00000016", "1?noanonymous") in new stack
    -- Goto (from-sip-external,s,5)
    -- Executing [[email protected]:5] Set("SIP/fl.gg-00000016", "TIMEOUT(absolute)=15") in new stack
    -- Channel will hangup at 2019-10-07 13:25:26.950 EDT.
    -- Executing [[email protected]:6] Log("SIP/fl.gg-00000016", "WARNING,"Rejecting unknown SIP connection from 147.75.65.193"") in new stack
[2019-10-07 13:25:11] WARNING[14544][C-00000025]: Ext. s:6 @ from-sip-external: "Rejecting unknown SIP connection from 147.75.65.193"
    -- Executing [[email protected]:7] Answer("SIP/fl.gg-00000016", "") in new stack
    -- Executing [[email protected]:8] Wait("SIP/fl.gg-00000016", "2") in new stack
       > 0x7f166002a110 -- Strict RTP switching to RTP target address 23.29.25.58:23346 as source
    -- Executing [[email protected]:9] Playback("SIP/fl.gg-00000016", "ss-noservice") in new stack
    -- <SIP/fl.gg-00000016> Playing 'ss-noservice.ulaw' (language 'en')
       > 0x7f166002a110 -- Strict RTP learning complete - Locking on source address 23.29.25.58:23346
    -- Executing [[email protected]:10] PlayTones("SIP/fl.gg-00000016", "congestion") in new stack
    -- Executing [[email protected]:11] Congestion("SIP/fl.gg-00000016", "5") in new stack
  == Spawn extension (from-sip-external, s, 11) exited non-zero on 'SIP/fl.gg-00000016'
    -- Executing [[email protected]:1] Hangup("SIP/fl.gg-00000016", "") in new stack
  == Spawn extension (from-sip-external, h, 1) exited non-zero on 'SIP/fl.gg-00000016'
Help?

Andrew
 

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
I’m much more concerned about the rejected.

That’s really the issue.

Help?
 

kenn10

A lesser geek
Joined
Dec 16, 2007
Messages
1,011
Reaction score
207
I just added a Flowroute DID and assigned it to US-East-VA and assigned it to route to one of my PBX's and it worked immediately. I've just had a call up on it for 10 minutes with no disconnect either.

That 23.29.16.0 - 23.29.31.255 address must be a border controller or a media server. I get the same IP address when the DID comes into me. As to the error message you're seeing, it seems to be something from PJSIP and not from chan_sip. Are you sure you'd completely turned off PJSIP?

Take a look at this post about Flowroute and PJSIP: https://community.freepbx.org/t/how-to-flowroute-trunk-with-proper-use-of-ip-auth-and-new-pops/54187?u=matthewljensen

If all else fails, I'd wipe the VM or server and reinstall. Leave the firewall at whatever is set by IncrediblePBX. Don't mess with anything. Add one extension, your Flowroute trunks, your DID and basic sip info. Then try a test call before doing anything else. Something is screwy either in your setup of FreePBX or possibly your router.
 
  • Like
Reactions: wardmundy

AndyInNYC

Active Member
Joined
May 23, 2013
Messages
622
Reaction score
83
Amazing what a reboot will do.

Somewhere, somehow, all the changes had 'something' hanging around in memory (I guess). I've done a reboot and now have 4 trunks of flowroute working (two mine, two my associate) properly and also bulkvs.com seems to be working.

seems bulkvs gives me 10 cents worth of free time. If I understand their billing, that's 333 minutes worth of time. Hopefully their call quality will be acceptable (can it at those prices?). It's funny that their minimum paypal buy is $25. That's 83K minutes. With my usage, I can't imagine doing a rebuy.

Thanks for everyone's help. I'll know in the next day or so if everything is actually working or if I'm still delusional.

Andrew
 

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,450
Messages
138,038
Members
14,613
Latest member
roshan2019