SOLVED BRI-gateway setup

Status
Not open for further replies.

guidot

New Member
Feb 22, 2018
4
1
3
I set up a BRI-gateway (BeroNet) and just wanted to make sure I am doing it the freeswitch way (instead of working against it).

Inbound
I created an extension for the Berofix in the public context, which seems to work.
Did I do it right?

Outbound
I set up a new gateway for it:
  • Proxy: berofix.example.org
  • Register: disabled
  • Everything else: default values
The outbound rule is basically the same as my general one for the SIP-gateway with the added caller_id_name-condition:
  • condition: destination_number ^\+?(\d{3,17})$
  • condition: caller_id_name SomeExt
  • action: set sip_h_X-accountcode=fusionpbx.example.org
  • action: set call_direction=outbound
  • action: unset call_timeout
  • action: set hangup_after_bridge=true
  • action: set effective_caller_id_name=${outbound_caller_id_name}
  • action: set effective_caller_id_number=${outbound_caller_id_number}
  • action: set inherit_codec=true
  • action: set ignore_display_updates=true
  • action: set callee_id_number=$1
  • action: set continue_on_fail=true
  • action: bridge sofia/gateway/Berofix/$1
to only route SomeExt that way.

Somehow in this rule $1 does not get replaced by the destination number, so I changed the last entry to
  • action: bridge sofia/gateway/Berofix/${destination_number}
which works, but I don't understand why my other outgoing rule works without that change.

So, what is the right thing to do here?
Should I make the same change for callee_id_number ($1 -> ${destination_number})?

Guido
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,045
566
113
I am only guessing but if you swap the order of the two conditions you may find that $1 works
 

guidot

New Member
Feb 22, 2018
4
1
3
According to your hit rate in the many other threads I found you must be very good at guessing. Have you tried using that talent at the lottery?

And, of course, you were right once more. Thanks!
 
Status
Not open for further replies.