AllStar Link SIP Trunk in FreePBX

I have a raspberry pi running FreePBX/Asterisk with a VOIP mesh network. The internal extensions and Google voice trunk are working properly. I have an outgoing dial plan configured so that 70 (should go to interactive menu), 7xxxx or 7xxxxx (xxxx and xxxxx are node numbers) will dial the AllStar Link SIP trunk. The outgoing calls will ring the AllStar trunk and often, but not always, the call connects. If it connects, it usually does not have received audio. If there is audio, then when I enter node numbers, etc it appears the DTMF tones are not recognized. I say this because every node number I enter is "invalid".

I can dial the AllStar access number, 763-230-0000, from the same phone over the Google voice trunk and everything works fine. I can also connect to the AllStar Link SIP directly using a software phone on my same LAN and it works fine.

I'm assuming I am doing something wrong in the trunk configuration. Any help would be great. Thanks- James

Ā·Ā·Ā·

---------------------
I have it configured in FreePBX as follows:
Trunk Name: AllStar Link

PEER Details:
username=1
fromuser=1
secret=allstar
host=sip.allstarlink.org
fromdomain=sip.allstarlink.org
type=friend
context=from-trunk
insecure=port,invite
trustrpid=yes
directmedia=no
keepalive=45
nat=yes
dtmfmode=rfc2833
disallow=all
allow=g711&ulaw

USER Context: (no entry)
USER Details: (no entry)
Register String: 1:allstar@sip.allstarlink.org

James,
You didnā€™t mention if you have the Asterisk client running at both ends to check for errors??? If not that could be helpful.
73 Doug
WA3DSP
WA3DSP Amateur Radio Resources

Ā·Ā·Ā·

From: james@lyljtlabs.com
To: app_rpt-users@ohnosec.org
Date: Tue, 17 Feb 2015 22:59:56 -0500
Subject: [App_rpt-users] AllStar Link SIP Trunk in FreePBX

I have a raspberry pi running FreePBX/Asterisk with a VOIP mesh network. The internal extensions and Google voice trunk are working properly. I have an outgoing dial plan configured so that 70 (should go to interactive menu), 7xxxx or 7xxxxx (xxxx and xxxxx are node numbers) will dial the AllStar Link SIP trunk. The outgoing calls will ring the AllStar trunk and often, but not always, the call connects. If it connects, it usually does not have received audio. If there is audio, then when I enter node numbers, etc it appears the DTMF tones are not recognized. I say this because every node number I enter is ā€œinvalidā€.

I can dial the AllStar access number, 763-230-0000, from the same phone over the Google voice trunk and everything works fine. I can also connect to the AllStar Link SIP directly using a software phone on my same LAN and it works fine.

Iā€™m assuming I am doing something wrong in the trunk configuration. Any help would be great. Thanks- James

I have it configured in FreePBX as follows:
Trunk Name: AllStar Link

PEER Details:
username=1
fromuser=1
secret=allstar
host=sip.allstarlink.org
fromdomain=sip.allstarlink.org
type=friend
context=from-trunk
insecure=port,invite
trustrpid=yes
directmedia=no
keepalive=45
nat=yes
dtmfmode=rfc2833
disallow=all
allow=g711&ulaw

USER Context: (no entry)
USER Details: (no entry)
Register String: 1:allstar@sip.allstarlink.org


App_rpt-users mailing list
App_rpt-users@ohnosec.org
http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users

To unsubscribe from this list please visit http://ohnosec.org/cgi-bin/mailman/listinfo/app_rpt-users and scroll down to the bottom of the page. Enter your email address and press the ā€œUnsubscribe or edit options buttonā€
You do not need a password to unsubscribe, you can do it via email confirmation. If you have trouble unsubscribing, please send a message to the list detailing the problem.

Doug,

This is an Asterisk/FreePBX server on my end. And Iā€™m trying to connect into the AllStar Link networkā€™s direct SIP/public telephone portal (https://allstarlink.org/support.html#telephoneportal) not another node I have control over. I donā€™t have any access to the AllStar Link network side of this call. The public access portal should let me dial node numbers once I connect. But Iā€™m just dialing in as a user. I might be configuring my Asterisk box wrong and shouldnā€™t be using a trunk?

Thanks,

James

James,
Here is what I have to dial sip to Allstarlinkā€¦
In sip.conf
[allstar]
type=peer
host=sip.allstarlink.org
username=1
disallow=all
allow=ulaw
dtmfmode=rfc2833
nat=yes
In extensionsā€¦
exten => 549,1,Dial(SIP/@allstar,120,WT)
exten => 549,2,Hangup()
This is in my PBX system. When I dial 549 it rings and I get the voice prompts. You have enter several things node number, mode, pin number. This works fine for me but I am using standard old version Asterisk for my PBX on a PC.
Are you trying to automatically enter the node, etc to the attendant? If so it might be a timing issue. I have never used FreePBX but I would think you could open a ssh session to a Linux prompt and enter the Asterisk client and be able to see some info that might be helpful during call progress.
73 Doug
WA3DSP
http://www.crompton.com/hamradio

Ā·Ā·Ā·

From: james@lyljtlabs.com
To: doug@crompton.com
CC: app_rpt-users@ohnosec.org
Date: Tue, 17 Feb 2015 23:58:23 -0500
Subject: RE: [App_rpt-users] AllStar Link SIP Trunk in FreePBX

Doug,

This is an Asterisk/FreePBX server on my end. And Iā€™m trying to connect into the AllStar Link networkā€™s direct SIP/public telephone portal (https://allstarlink.org/support.html#telephoneportal) not another node I have control over. I donā€™t have any access to the AllStar Link network side of this call. The public access portal should let me dial node numbers once I connect. But Iā€™m just dialing in as a user. I might be configuring my Asterisk box wrong and shouldnā€™t be using a trunk?

Thanks,

James

Just curious if this issue was ever resolved?
I am trying to do the same thing with current version of freepbx

Thank You

James

Personally, I havenā€™t been able to get this working since it stopped working circa 2016-2017.

I moved on to IAXRPT stanzas, IAX2 trunking between PBX and Node(s) and it works great from handsets/softphones within the PBX. I just donā€™t have the ā€œdial into the telephone portal over SIPā€ aspect.

But I can use the IAXRPT client or phones themselves on the PBX to basically do the same thing.

(After IAXRPT stanzas go in, added some IAX2-Trunking between the PBX/FreePBX side and my Allstarlink Nodes, and some dial plans that accept the node number as-dialed from my ā€œPBXā€ side, takes appropriate Outbound route into the ASL Node of choice, then Iā€™m easily dial into the trunked Allstarlink nodes.)

Regards,
Byron

Ha, I just realized I may have replied to the wrong thread topicā€¦

Iā€™ll leave my post above just in case Iā€™m wrong about that. Someone will set me straight.

Byron

So how did you setup the IAX trunk in freepbx to talk back to your node box?

Hereā€™s a long reply comingā€¦

  1. setup a stanza ā€¦ i.e. [pbxtrunk] in your iax.conf file on your ASL node.
    fill it like so:

[pbxtrunk]
type=friend
username=someusername
secret=somesecretpassword!#
context=radio-control
host=dynamic
disallow=all
allow=ulaw

  1. make sure you have a [radio-control] stanza defined in your extensions.conf file on your node.
    fill it like so:
    [radio-control]
    ;Used with Stanza for FreePBX node/radio control
    exten => 10000,1,Authenticate(1234,custom/enter-password)
    exten => 10000,n,Playback(connecting)
    exten => 10000,n,Playback(rpt/node)
    exten => 10000,n,Playback(digits/1)
    exten => 10000,n,Playback(digits/0)
    exten => 10000,n,Playback(digits/0)
    exten => 10000,n,Playback(digits/0)
    exten => 10000,n,Playback(digits/0)
    exten => 10000,n,Rpt,10000|P|${CALLERID(name)}

a) replace the ā€˜10000ā€™ references with your NODE number, replace the digits/# references with single digits of your NODE number
b) notice the ā€˜1234ā€™ sequence, thatā€™s a password protection for anyone that dials the node from your PBX, remove if you donā€™t want it, change to your desired PIN as desiredā€¦ etc.

  1. restart your node and these changes go into effect.

  2. In your FREEPBX config side, add a new Trunk.
    fill fields like so:

[Outgoing Settings]

Trunk Name : name-of-your-trunk (Change as desired)

PEER Details:
username=Set to same username value as in iax.rpt [pbxtrunk] stanza
type=peer
secret=Set to same secret value as in iax.rpt [pbxtrunk] stanza
host=set to the IP or FQDN of your ASL node

if youā€™re not running on standard IAX port 4569, you may have to provide a :xxxx at the end of host= with your actual IAX port #

[Incoming Settings]

USER Context and USER Details - LEAVE BLANK

Register String:
username:secret@ASLnodeIP-OR-FQDNhostname/pbxtrunk

i.e. user:secret@1.2.3.4/pbxtrunk

  1. Save the Trunk.

  2. Create a new Outbound Route.

Call it ā€œto-my-ASL-nodeā€ or something useful

For Dial patterns, use anything you want here (I suggest your ASL node number)

(No prepend, no prefix, just enter the node number digits in ā€œmatch patternā€ box if you have one)

For ā€œTrunk Sequenceā€ pick your new Trunk you just made, by itā€™s name.

Save the new Outbound Route.

  1. FreePBX should be nagging at you to Apply Config update the changes. Do it.

  2. Test your work.

If it doesnā€™t work, run asterisk -r on BOTH your ASL node and your FreePBX box, set debugging level.

e.g. ā€˜core set verbose 5ā€™

Watch the logs as you try. Good luck. Hopefully I didnā€™t leave an important step out.

And if someone replies with a doc that has already captured all thisā€¦ shame on you :smiley:

Byron

Great, Thank You very Much Byron,
That did the TRICK, ITā€™s ALIVE :sunglasses: :sunglasses: :sunglasses:

I have been playing with this for quite some time now

73
James

1 Like

I love it when a 5 year old post gets resurrected and resolves a problem. Good job all!

1 Like

I got a follow-up question Byron,

I repeated the same process on the same freepbx box to try and dial into a second Node I have.
I am getting this errer: NOTICE[563]: chan_iax2.c:6839 register_verify: No registration for peer ā€˜phoneā€™ (from 192.x.x.x1) on the new link I setup to a second node on my server.

I am getting this errer: NOTICE[565]: chan_iax2.c:6839 register_verify: No registration for peer ā€˜phoneā€™ (from 192.x.x.x0) On the original node that I setup and is working great when I dial it. Not sure why when I dial the second Node number it also tires to connect to the original.

On the second node set up I used the :xxx to point to the second node that has a different port number and still same issues. I tried the :xxx on end of IP on both incoming and outgoing stanza in freepbx but same issues.

And also I noticed the second Outgoing setup as in section ā€˜6ā€™ of your instructions dose not give a green symbol on the ā€˜intra-company routeā€™ symbol as the first setup route dose.

Looks to me like it is not registering properly as when In ā€˜CLIā€™ I type a ā€œiax2 show peersā€ there is no IP shown for the new route?

Also I have the second node setup as an ā€œanalog to DMR Bridgeā€

Any Ideas?

Thank You

James

Any ideas?

For those interested I finally got the second AllStar node Trunk working on my freepbx setup:

OK finaly figured it out :upside_down_face: :upside_down_face:

On your line for freepbx trunk:

iax settings>>> Outgoing

Trunk Name? pbxtrunk

Peer Details? host=x.x.x.x
port=456X
username=pbxtrunk
secret=1234
type=peer

iax settings>>> Incoming

Register String? pbxtrunk:1234@x.x.x.x/pbxtrunk

I found that if using a different port than the 4569, if added to the end of the host ā€œx.x.x.x:456Xā€
was giving me the errors that I was seeing.
By adding the line ā€œport=456Xā€ in the outgoing Peer settings then everything started to work and you could see both iax2 peers registered on each system under ā€˜CLIā€™ using the ā€˜iax2 show peersā€™ command. It showed the iax2 peer name, and IP address where as before it would not show the IP address.

James VE1JCS

James ā€“ Sorryā€¦ I did not check the forum much last week.

I see that you arrived at same conclusion I did on testing this out. Good stuff.

I have multi-node setup working well between PBX and Node here.

Byron

Sorry to bring this back upā€¦I am attempting to do this, I have duplicated the entries as far as I can tellā€¦

It didnā€™t work, it seems the trunks (allstar and freepbx) need the usernames to match the opposite trunk and vice versaā€¦Unless I missed it in your instructions. I kept getting couldnā€™t find errors in the Freepbx box.

I followed these instructions instead.

Thanks,
Mike

Take a look at the Asterisk CLI asterisk -rvvv and look for message that might give a hint whatā€™s up. Also use the iax2 commands to check your configuration. Keep at it and bang you head against the wall some moreā€¦ youā€™ll figure it out and we can help. But we need more information than ā€œit doesnā€™t workā€.

hey, I was trying to follow your steps but getting the response ā€œAll circuits are busy, try again laterā€ when dialing from freepbx to asl nodeā€¦ Am I missing something?
Is there something we need to do with register statement on iax.conf in ASL?
what should be the bindaddr on ASL?
I just need to recieve the call on ASL node from freepbx to talk to my radio using *99 and # keys.
No need of outbound call from ASL to freepbx.
please help!!!

When you register the connection, there must be a user/peer of the same string you are using on the other box.

So, if you attemp the connect and it is not authorized, it will reply rejected / all busy etc.

Your registration becomes the user at the other box and need the proper credentials to be authorized to use it.

Name
Secret
and/or perhaps IP/netmask if you are limiting it further for security

So, from the asl box in iax.conf, something like (not exact depending on all your config)ā€¦

[freepbxbox]
type=peer
host=192.168.1.209
username=555
secret=RadioPBX3
context=radio-control

on the freepbx box, the registration string needs to match this above user.

user:secret@192.168.1.209

The ā€˜contextā€™ will steer the inbound call in extensions.conf and the dialing string will need to be found in that context or it will not work.