Trunk to Singlewire

I have a Singlewire Informacast Bells and Paging server that I want to allow devices with a call button to be able to call an extension on FreePBX.

I setup a trunk on FreePBX and mapped outbound routing to map extensions to devices on Singlewire which is working - I can call the Outbound extension on 5160 and it works.

The problem is when I try to call from a Algo 8410 two way Sip enabled device; the call button is programmed to goto the FreePBX - its not getting there.

Singlewire explained that there is a need for a conversion from PJSIP 5160 (Algo) to 5060 (FreePBX) via the FreePBX trunk.

What appears in the Asterisk log when you push the call button? If nothing, run sngrep and report what appears there. If also nothing, use syslog on the Algo or a network capture tool to see where the request is going.

Stewart1, thanks for the reply. The Asterisk log didn’t show anything when pressing the call button. SNGrep shows only communication only on port 5060 to devices. It does see Singlewire but only communicating on 5060.

Here is the Algo log.
Feb 25 11:49:41 algo-main: [apua] (sip) send 10.200.64.93:5160, size = 781
Feb 25 11:49:41 algo-main: [apua] (sip) - REGISTER sip:10.200.64.93:5160 SIP/2.0Via: SIP/2.0/TCP 10.200.98.7:5060;branch=z9hG4bKf5e6623600ccb669;rportContact: sip:[email protected]:5060;transport=tcp;expires=60Max-Forwards: 70Authorization: Digest username=“2141085ab8”, realm=“InformaCast”, nonce=“1740502181/e67c92a3a171bf6233534beefa1199c6”, uri=“sip:10.200.64.93:5160”, response=“a75efd635fd7aa55081ca58ee215d78a”, algorithm=MD5, opaque=“6167517e2d2b0fb5”, cnonce=“ed12061716c7ad78”, qop=auth, nc=00000001To: sip:[email protected]:5160From: “Automatically added, name=0022ee180c11” sip:[email protected]:5160;tag=10552f3bad124adbCall-ID: 973378cb303cfe89CSeq: 44548 REGISTERUser-Agent: Algo-8410/5.5Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGEContent-Length: 0
Feb 25 11:49:41 algo-main: [apua] (sip) recv 10.200.64.93:5160, size = 465
Feb 25 11:49:41 algo-main: [apua] (sip) - SIP/2.0 200 OKVia: SIP/2.0/TCP 10.200.98.7:5060;rport=42388;received=10.200.98.7;branch=z9hG4bKf5e6623600ccb669Call-ID: 973378cb303cfe89From: “Automatically added, name=0022ee180c11” sip:[email protected];tag=10552f3bad124adbTo: sip:[email protected];tag=z9hG4bKf5e6623600ccb669CSeq: 44548 REGISTERDate: Tue, 25 Feb 2025 16:49:41 GMTContact: sip:[email protected]:5060;transport=tcp;expires=59Server: Asterisk PBX 20.7.0Content-Length: 0
Feb 25 11:49:41 algo-main: [apua] evlog: acctid = 0, evid = 1, ev = REG_OK, callid = -1, msg = ‘200 OK’
Feb 25 11:49:41 algo-main: [bridge] recv cmd: <uaev 0 1 -1 200 OK>

What it seems to look like is that Algo is trying to talk 5060 and 5160 and Asterisk is only listening on 5060.

Apart from the garbled layout, this shows a successful REGISTER transaction, which means the port numbers are being used correctly for requests originating from the device creating the logs.

Please show us logs for a transaction that is failing, preferably taken from the Asterisk side, as that is the one with which most people, here, are familiar, and newlines are logged correctly.

Also, if chan_pjsip is using 5160, you have set up FreePBX in a non-standard way. I believe it prefers 5060, even when chan_sip is present, and relegates chan_sip to 5160.

Yes - 5160 is non-standard. We do have it that way on the trunk. It was the only way to make the Algo 8410 slightly work. We can dial to the Algo with 5160 as the trunk port but not if we set the chan_pjsip to 5060. We never been able to dial from the Algo to Asterisk. How Singlewire explained it; we need to have the Asterisk Trunk configured for port 5060 and respond to port 5160 if that is at all possible.:slight_smile:

That suggest you are working round some other problem that you haven’t mentioned, such as a router with SIP ALG enabled.

As I said, you need a log of a failing case, preferably from the Asterisk point of view. The log you provided is of a successful case.

Here’s the log.

23223 [2025-02-25 09:12:47] VERBOSE[31756] app_amd.c: AMD defaults: initialSilence [2500] greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [3] silenceThreshold [256] maximumWordLength [5000]
23224 [2025-02-25 09:12:47] VERBOSE[31756] loader.c: Reloading module ‘app_playback.so’ (Sound File Playback Application)
23225 [2025-02-25 09:12:47] VERBOSE[31756] loader.c: Reloading module ‘app_voicemail.so’ (Comedian Mail (Voicemail System))
23226 [2025-02-25 09:12:47] WARNING[31756] app_voicemail.c: maxsilence should be less than minsecs or you may get empty messages
23227 [2025-02-25 09:12:47] VERBOSE[31756] loader.c: Reloading module ‘codec_dahdi.so’ (Generic DAHDI Transcoder Codec Translator)
23228 [2025-02-25 09:12:47] VERBOSE[31756] loader.c: Reloading module ‘app_flite.so’ (Flite TTS Interface)
23229 [2025-02-25 09:12:47] WARNING[31756] app_flite.c: Flite: Unable to read config file flite.conf. Using default settings
23230 [2025-02-25 09:12:47] VERBOSE[31756] loader.c: Reloading module ‘codec_ast18_g729.so’ (Digium G.729 Annex A Codec (optimized for x86_64)
23231 [2025-02-25 09:12:47] VERBOSE[31756] loader.c: Reloading module ‘app_queue.so’ (True Call Queueing)
23232 [2025-02-25 09:12:47] NOTICE[31756] app_queue.c: queuerules.conf has not changed since it was last loaded. Not taking any action.
23233 [2025-02-25 09:12:47] VERBOSE[31756] asterisk.c: Remote UNIX connection disconnected
23234 [2025-02-25 09:13:16] VERBOSE[10400] res_pjsip/pjsip_configuration.c: Endpoint 4001 is now Reachable
23235 [2025-02-25 09:13:16] VERBOSE[10400] res_pjsip/pjsip_options.c: Contact 4001/sip:[email protected]:5062 is now Reachable. RTT: 7.708 msec


Got this from sngrep set to 5160

Another successful transaction.

For the log, make sure verbosity is set to, at least, 5, and “pjsip set logger on” has been issued, via the CLI, since Asterisk was started. Please provide failing transaction, at this logging level, and provide the logging from /var/log/asterisk/full.

Turned on Verbose logging and pjsip but I don’t see anything coming from the IP address of the ALGO. The ALGO is currently setup to connect to Singlewire as 5160 which I think is wrong. Does anyone know the proper way to connect to Singlewire? I’ve tested the ALGO to FreePBX without issue.

Hi @andyo64,

If it is an internal extension(of FreePBX) being dialed from the algo, does an inbound route need to be built(even if its the same four numbers as the extension)to route it?

I think a network diagram is needed.

I think both the ALGO line and Singlewire are not products which many, if any, people, who normally answer here will be familiar.

So we finally got it working! The fix was to have 2 x trunks pointing at Singlewire one for Chan-sip 5160 and Chan-PJSIP port 5060. On both trunks we enabled 0.0.0.0-TCP. You would think someone would have tried to connect the servers together but I’m glad to document it for the future.

1 Like

Actually talked too soon. We’re still having an issue which I think I finally captured. We’re further along than before but still have an issue when we call a Algo 8410 clock / Speaker / Mic / call button. It connects and answers but the mic won’t send analog sound back to the phone. How singlewire explained it is it sends request on 5060 and the responds on 5160. Here is a screen shot of the SIP Wireshark data.

The cursor is on the wrong packet, and you are not displaying all the headers,

In any case, I don’t think FreePBX will generate 302 without custom dialplan. Are you sure that this is coming from FreePBX? If so you need to tell us your customisations.

Yes - Here is more. The issue is when dialing the 8004 extension the Algo Clock picks up but the mic doesn’t work on the clock. I can use the dial button on the clock to call a pre programmed FreePBX extension and I have good 2 way communication. Its only when FreePBX dials Singlewire and ultimately the Algo Clock that the clock mic doesn’t work.





Please provide the contents of /var/log/asterisk/full, as plain text, with verbosity at least 5, and with “pjsip set logger on” or “sip set debug on”, as appropriate, in effect. I’m not going to look at wireshark one line summaries, mixed in with irrelevant traffic.

In particular, I suspect full details of the SDP are going to be required.

Also, if at all possible, generalise this, as at the moment, it is difficult for someone to answer who doesn’t have both in depth knowledge of the Algo product line, and singlewire.

Here is the link to the log file. Its on my google drive / read only.

Look for x4002 at line 13955 and the x8004.

4002 is the phone and 8004 is the Algo.