gateway with ip

Status
Not open for further replies.

farhaadn

New Member
Sep 20, 2020
24
0
1
Hi,
How can I bridge outbound calls to IP and port without creating a gateway?
in outbound route I create the below row at the end of outbound route:
action bridge sofia/external/192.168.10.3:5060

I want to send call to 192.168.10.3 port 5060 , but didn't work, I create gateway name PBX and then put below at that outbound route, and everything work
action bridge sofia/gateway/PBX/${callee_id_number}

now, How can I bridge the outbound calls to IP and port without creating a gateway?
 

farhaadn

New Member
Sep 20, 2020
24
0
1
What is this for? And where can I use it?
I want to call 192.168.10.3 trunk on an outbound route when the number 7000 is dialed, for example
I don't know the correct string of that dialplan
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
Once you create a bridge record, it will appear in the destination select lists. Of course you can do the same thing in the dial plan instead of using the bridge record. The advantage is that if you use the same bridge statement many times you only need to maintain it in one place.
 
  • Like
Reactions: farhaadn

farhaadn

New Member
Sep 20, 2020
24
0
1
thank you, I can use this list only destionation?
i cant use on dial-plan of outbound route?
and my first question, how should I write code ? I found this below , is that right?
sofia/external/$1@192.168.10.2:5060

if that is right, what is $1?
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
Yes, that looks correct for a bridge statement - don't confuse with FusionPBX bridges:
https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools:+bridge

The $1 is a variable that represents the first capturing group from a regex, for example, if your dialplan entry started with the condition:
destination_number ^9([0-9]+)$ then $1 would contain the digits after the 9 because the brackets form a capturing group.

You may need to do a little more reading.
 
  • Like
Reactions: farhaadn
Status
Not open for further replies.