Hello,

On 7/11/13 1:50 PM, Tony Turner wrote:

Hi

 

I am fine with registered users sending and receiving calls from/to PSTN.


Now I route registered users calls to/from PSTN fine

Kamailailio<----->freeswitch<------------>IVR (PSTN)

 

Best Practice for routing Trusted peers (inbound) to IVR/PSTN (SIP Trunking Service)

Trusted peer1  -----> Kamailio -----> freeswitch ------------> IVR (PSTN)

 

Where do I/ how do I route calls from trusted peers not to users but down to PSTN IVR?

 

Say for example Trusted Peer 1 sends to my Kamailio IP sip:398998xxxx@xx.xx.xx.xx:5060

As I add a Trusted peer I would like to add a route and insert prefix for when it routes to freeswitch --->

 

Do I use carrier route or LCR  etc, I want to be able to add trusted peers but add routes without editing the config file and restarting Kamailio.

 

The reason I ask is I’d prefer to do it correct method at the start as it's a nightmare changing once I have lots of trusted peers.

one way to do it is to use permissions modules to match the trusted peers using the address table (with allow_source_address(...)). In the address table, you can set the tag column to a value that you check in config and decide what to do further with routing. For example, the tag can be the LCR id or dispatcher setid.

You don't need to restart with above solution, just issue mi/rpc reload commands for address and lcr/dispatcher whenever you change records in database.

Cheers,
Daniel
-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda