Trunk to trunk port forwarding

Status
Not open for further replies.

B.Fluehmann

Customer
Joined
Jan 7, 2017
Messages
27
Reaction score
1
Hi,
Our 3CX pbx has a trunk which is connected to a public sip provider and a second trunk which is connected to our legacy pbx.
Public calls from 3CX clients are working, as well as internal calls between 3cx and the legacy pbx in both directions.

What I am trying to setup now is that public calls from the legacy pbx to the sip provider via the 3cx pbx. Unfortunately trunk to
trunk calls seem not to be supported. Thus I have setup a bridge to the legacy pbx instead of a trunk. Same results.

Does anybody know what is the right way to do this?

Regards
Bernhard
 
The setup is not officially supported or tested by 3CX so there's no guarantee it would work, that being said however there is a chance you could get it to work via a bridge rather than trunks.

If you take a look at this guide as an example, https://www.3cx.com/docs/ you will see there at the bottom the kind of SIP messages our PBX would expect to see. If you can make the legacy system match this it might be possible to get outgoing calls too with some work.
 
  • Like
Reactions: B.Fluehmann
If you "send" an outbound call, from the other PBX to 3CX, including any required outbound prefix digit, what error/failure shows for that call in the 3CX Activity Log? Is it blocked because of incorrect digits, or another reason?
 
  • Like
Reactions: B.Fluehmann
Thank you for the answers.
@JohnS_3CX I have configured a bridge as described in the Asterisk example. Working for internal calls but still not for outbound calls. Additionally, using the bridge cause problems with caller-id, since the legacy pbx does not support remote-party-id (supported are p-asserted-id, p-preferred-id).

@leejor Thank you for the question. I did tests with bridge and trunk configurations. I used Wireshark for debugging. In both cases I see the same 3cx responses:
  • Legacy pbx to 3cx, internal calls: Call ok, WITHOUT authentication request from PBX
  • Legacy pbx to 3cx, outbound calls: Unknown user

Bridge configured as master (registrar). Trunk configured as authenticatipn incomming only calls (Authentication without register).

User-ID of calls from legacy-pbx 10003@3cx-ip, same for authentication username

As far as I understand what should do the trick is to use authentication-/bridge-id as user-id in the from header and the real caller-id in the p-asserted-id or remote-party-id (not supported by legacy pbx) right?

What about inbound rules? I could not find a way on how to configure something different than extensions or fixed forward numbers in inbound rules. Is there a way to configure some sort of pattern for this? Or should it apply to outbound rules directly?

If you need more information, please let me know.

Kind regards
Berrnhard
 
As a debug test, go to your 3CX outbound rules for your trunk towards the provider, and make the rules more loose (i.e. Calls from extension groups should be empty, calls from Extensions should be empty, Number length should be empty) like my example below. This is just for testing purposes, don't forget to change your rules again accordingly to restrict any calls you don't want to allow.

9666
 
Done. Results still the same.


In the meantime I have found the following document: https://www.3cx.com/docs/sip-trunk-inbound-calls/

With call source identification set to map from:user-part to authentication-id I was able to reach the right
trunk.

Now, incomming calls to outbound numbers are routed to the voicemail of the default trunk extension :).

How do I forward them to the outgoing trunk?
 
Hi Fluehmann,

We can make and receive calls with a bridge connected to Asterisk without any problems. I was just curious if presence or BLF is possible between 3CX and Asterisk.

Here some code form our Extensions.conf:
#################
OUTBOUNDTRUNKNAME1=SIP/3cx
TRUNKMSD=0

exten => _20.,n,NoOp(${EXTEN})
exten => _20.,n,SipAddHeader(Remote-Party-ID:"${CALLERID(name)}" <sip:${CALLERID(num)}@IPASTERISK>\;party=calling\;privacy=off\;screen=no)
exten => _20.,n,Dial(${OUTBOUNDTRUNKNAME1}/${EXTEN:${TRUNKMSD}})

exten => _0.,1,Dial(${OUTBOUNDTRUNKNAME1}/${EXTEN:${TRUNKMSD}})
################

_20. can route calls over the bridge (asterisk trunk) with phones starting with 20x (ex. 201,202 etc.)
_0. can route calls starting with 0 (normal external numbers)

the SipAddHeader is needed for correct internal names

The OUTBOUNDTRUNKNAME1 is in sip.conf:

[3cx]
host=IP3CX
port=5060
username=10001
fromuser=10001
secret=xxxxxxx
fromdomain=IPASTERISK
senrpid=yes
trustrpid=yes
qualify=5000
type=friend
context=inbound-local
trunk=yes
insecure=invite,port
canreinvite=no


Does anyone know if precense is possible with Asterisk connected to 3CX?
 
Does anyone know if precense is possible with Asterisk connected to 3CX?

My understanding, is that Presence is limited to 3CX PBXs (proprietary) although I may be wrong.
 
Status
Not open for further replies.

Members Online Now

Forum statistics

Threads
111,832
Messages
589,285
Members
164,662
Latest member
DejanMDS