3cx / Asterisk Bridge

Status
Not open for further replies.

maguirej

Gold Partner
Basic Certified
Joined
Jan 22, 2020
Messages
28
Reaction score
4
I have a bridge established between 3cx (Master) and Asterisk (Slave) Outbound routing to a separate trunk works without issue. Likewise, extension dialing works without issue from Asterisk to 3cx. This is good enough, as extension dialing from 3cx is not needed (Special use bridge).

The issue I am having is routing traffic from the trunk to the bridge. Most documentation I have reviewed provides that a simple "forward to outside number" plus the extension bridge number should route the inbound calls. In testing I can see the call hit, but it does not provide a route.

Do I need an outbound prefix to hit the bridge even though it is assigned the bridge number? If so, what format does it need to be in? If the external [bridge] number is 10012, should I place 910012 as the external number?

07/20/2021 3:33:25 PM - [CM500002]: Unidentified incoming call. Review INVITE and adjust source identification: Invite-UNK Recv Req INVITE from 162.252.250.42:7000 tid=56fb.c0b40812b7026f71621b449b43c09f8a.0 Call-ID=458254b2-a466-4bcd-905d-d8bfca847814:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 162.252.250.42:7000;branch=z9hG4bK56fb.c0b40812b7026f71621b449b43c09f8a.0
Via: SIP/2.0/UDP 162.252.251.66:11000;received=162.252.251.66;rport=11000;branch=z9hG4bKrpegDmFS7KBDB
Max-Forwards: 48 Record-Route: <sip:162.252.250.42:7000;lr=on;ftag=avtK0ZKDSUygS>
Contact: <sip:[email protected]:11000>
To: <sip:[email protected]>
From: "CHAMPAIGN IL" <sip:[email protected]>;tag=avtK0ZKDSUygS
Call-ID: 458254b2-a466-4bcd-905d-d8bfca847814 CSeq: 38852810 INVITE
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
Content-Disposition: session
Content-Type: application/sdp
Supported: path, replaces
User-Agent: Atlas
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer
Privacy: none
P-Asserted-Identity: "CHAMPAIGN IL" <sip:[email protected]>
Content-Length: 275

v=0 o=FreeSWITCH 1626789265 1626789266 IN IP4 162.252.251.66
s=FreeSWITCH c=IN IP4 162.252.251.66
t=0 0 m=audio 23940 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16 a=silenceSupp:eek:ff - - - -
a=ptime:20
 
Just to get this straight....you are trying to route an incoming call, in 3CX, to the bridge trunk going to the Asterisk switch? If that is the case, you are not going to use the trunk number in any of the routing.

Using the outbound rules, you will require a prefix if the remaining digits are in conflict with anything else on the PBX. You can then strip the prefix, and send the remaining digits over the bridge. It is in the outbound rules where you select the bridge trunk route, not by using the trunk number.

You might want to provide a bit more detail, about what sort of call routing you are trying to achieve. Some scenarios ?
 
Provided that the SIP INVITE you posted is the one coming in from the Provider, the issue seems to actually be that the call was not accepted by the PBX in the first place due to a Source identification issue.

You might have to adjust your SIP Trunk's call source identification settings under "SIP Trunk >> Edit >> Inbound Parameters".

If this indeed is the case, you can read more about how 3CX handles Inbound Calls here: https://www.3cx.com/docs/sip-trunk-inbound-calls/
 
Just to get this straight....you are trying to route an incoming call, in 3CX, to the bridge trunk going to the Asterisk switch? If that is the case, you are not going to use the trunk number in any of the routing.

Using the outbound rules, you will require a prefix if the remaining digits are in conflict with anything else on the PBX. You can then strip the prefix, and send the remaining digits over the bridge. It is in the outbound rules where you select the bridge trunk route, not by using the trunk number.

You might want to provide a bit more detail, about what sort of call routing you are trying to achieve. Some scenarios ?
Just to get this straight....you are trying to route an incoming call, in 3CX, to the bridge trunk going to the Asterisk switch? If that is the case, you are not going to use the trunk number in any of the routing.

Using the outbound rules, you will require a prefix if the remaining digits are in conflict with anything else on the PBX. You can then strip the prefix, and send the remaining digits over the bridge. It is in the outbound rules where you select the bridge trunk route, not by using the trunk number.

You might want to provide a bit more detail, about what sort of call routing you are trying to achieve. Some scenarios ?
One ofthe initial threads is located here ->https://www.3cx.com/community/threads/forward-calls-to-bridge.45238/

I found that creating an oubound rule showed the list of trunks including the bridge number. I assigned the bridge number with the existing outbound prefix of 9. Since this was used by an existing outbound rule for the bridge, it tried to route the all back out the trunk. I then created a seperate prefix (8) that appears to be hitting the bridge, but not accepted by the bridge, but does show routing to the bridge.

I will check with the bridge owner later today and see if he can pickup the inboumd call on his side.

The initial design was for the inbound trunk (one of many) to hit an ivr menu and depending on election route across the bridge. I do not believe this will ultimetly work unless I can prefix the bridge number.
 
It did route appropriately, but since I am using an outbound prefix and number for the bridge, it is passing that information along in the to field. I can route the calls to the bridge, but the bridge has no idea what the calling party dialed.
 
In the same way you dial any outside call...

What the calling party dialled, will be the digits after the prefix, (the prefix being stripped in the outbound rules), with the remaining digits being sent over the bridge trunk.
 
Last edited:
  • Like
Reactions: ChrisC_3CX
If so, what format does it need to be in? If the external [bridge] number is 10012, should I place 910012 as the external number?
It's as leejor said, but, to avoid any confusion, if what you have set in 3CX as the external number for this forwarding is the "prefix + the bridge's virtual extension" then this is what is sent as the dialed number. If, as leejor mentioned, you are stripping the prefix on your 3CX's Outbound rule, then all that is sent as the dialed number is the bridge's virtual extension. If this number cannot be recognized by your bridged PBX(Asterisk) then change it to something else that will be. It does not need to be the virtual extension, as long as it reaches the Outbound Rule, it will then be routed to the bridged PBX.
 
Thank you for your response. I came to the same understanding as well.

In light of this, would there be any value in discussing outbound source pattern to apply the prefix for the bridge. In this scenario, could you replace nothing and prepend the 9 needed for the outbound rule to hit the bridge? The bridge number would not be used as dialed number then.

If this is feasible, I do not know how to write the outgoing caller id reformatting.

I do have several inbound trunks, and the ones needed for the bridge are separated on one trunks. There would be no conflicts.
 
In light of this, would there be any value in discussing outbound source pattern to apply the prefix for the bridge
What do you mean by this? Are you talking about the caller id? If yes that has nothing to do with the dialed number. The caller id has to do with the number of who is calling.

If this is feasible, I do not know how to write the outgoing caller id reformatting.
Caller ID reformatting again has to do with the caller id so it has nothing to do with the dialed number.

Are you perhaps talking about the dialed number as dialed by the original caller? Do you want to keep that number and send it to the Asterisk PBX?

So lets say caller calls the 3CX PBX on number 123, do you want 123 to be sent to the Asterisk PBX as the dialed number?

If not, could you please explain what the problem is with a full example of a call flow?
 
Unless I am mistaken, documentation I read allows you to re-write numbers (example below) to fit choice patterns. Instead of re-writing the entire number, I am proposing prepending 9.
  • (XXX) – Where X can be any digit from 0-9. Example if a number is 02031234567 and you put (0203) this means that the PBX will search for a string that matches 0203 exactly.
 
Yes but this is from the Caller ID reformatting documentation which, as the name suggests, involves the Caller ID.

Do you want this to apply this to the Caller ID (FROM number) or to the dialed number(TO number)?
 
I would assume it would need to be in the "to" number for prefix routing to occur.
 
I would assume it would need to be in the "to" number for prefix routing to occur.
That is correct, the Outbound Rule will route the call depending on the dialed (TO number).

That said, what is the current situation and issue? Are the calls not being routed to the Asterisk PBX at all? If yes, how have you determined this, if not, what is the issue exactly?
 
To sum up my experience and close the thread.

I found no good way to forwad incomming call from the inbound sip trunks to the bridge. Inbound routes to the bidge was set as "forward to ouside number" with the bridge prefix and bridge number. In this case, the dialed numbers would always show the bridge number. The goal was to pass dialed numbers so the bridge connection would know what did the call came in from. [Not achieved]

To those that may run into similar circumstances:
I set the bridge prefix and bridge number. Routed outbound calls with another outbound rule to the correct trunk. I then etablished inbound connection by extension (Astrisk would not authenticate outbound sip extension) that had the specific did attached. For did 1 in would ring extension 1, for did 2 it would ring extension 2. All ountbound was routed through the bridge and out the designated sip trunk.

Thanks to all that replied!
 
  • Like
Reactions: ChrisC_3CX
I found no good way to forwad incomming call from the inbound sip trunks to the bridge. Inbound routes to the bidge was set as "forward to ouside number" with the bridge prefix and bridge number. In this case, the dialed numbers would always show the bridge number. The goal was to pass dialed numbers so the bridge connection would know what did the call came in from. [Not achieved]
Before closing this thread I'd like to mention that you could have all your 3CX DID Inbound Rules route to the same DID + the prefix. For instance, an inbound rule for DID 123456789 can route the call to "Outside Number" 9123456789, the bridge Outbound rule will match this call since it starts with 9 (prefix). It will then strip the 9 and send it to the Asterisk PBX as 123456789 which is the exact DID. Just do this same configuration for all DID Inbound Rules you are routing to the Asterisk PBX.

Hope this helps!
 
Status
Not open for further replies.

Forum statistics

Threads
111,992
Messages
590,171
Members
164,929
Latest member
Cloudstar