The FluentStream infrastructure supports custom routing of inbound calls based on a set of match rules.  This allows customization of routing outside of the my.fluentcloud.com portal for on-demand changes required for certain setups.


The match rules are based on pre-defined custom headers placed in the SIP Invite sent to our system.  When a match is found, the call is sent to the context desired as defined in the match rule.  For assistance in setting this up, please contact FluentStream support at support@fluentstream.com.  The most common use case is to send calls directly to extensions with no additional call processing via the fc-extension context.


Example for Twilio - Create a match rule for your Twilio AccountSID to modify routing on calls coming from Twilio system.


Match Rule:

Headername - X-Twilio-AccountSid

Headervalue - youraccountid

context - fc-extension

tenant - Example


INVITE sip:100-Example@mediaserver.fluentcloud.com SIP/2.0

From: "+11234567891" <sip:+11234567891@sip.twilio.com>

To: <sip:100-Example@mediaserver.fluentcloud.com> 

CSeq: 102 INVITE

Max-Forwards: 68

Date: Fri, 01 Jan 3099 00:00:01 GMT

P-Asserted-Identity: "+11234567891" <sip:+11234567891@sip.twilio.com> 

Call-ID: callid@0.0.0.0

Contact: "+11234567891" <sip:+11234567891@1.2.3.4:5060;transport=udp> 

Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY,INFO

Supported:

User-Agent: Twilio Gateway

X-Twilio-AccountSid: youraccountid       -----------    This header is added to our match list, and will change routing for any incoming calls with the specific AccountSID defined

X-Twilio-ApiVersion: 2010-04-01

X-Alert-Info: RingAnswer

Content-Type: application/sdp

X-Twilio-CallSid: callid

Content-Length: 260

v=0

o=- 659503768 659503768 IN IP4 1.2.3.4

s=Twilio Media Gateway

c=IN IP4 1.2.3.4

t=0 0

m=audio 10050 RTP/AVP 0 101

a=rtpmap:0 PCMU/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=silenceSupp:off - - - -

a=ptime:20

a=sendrecv