<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>Is it possible to set up Kamailio 5.4.1 to use IF to determine
how calls are proxied depending on the source of the request?</p>
<p>For example, <b><u>if</u></b> calls originate from <i>pstn.us1.twilio.com</i>
then <u><i>$du = "sip01.example.com:5060"</i></u>, wheres <u><b>if</b></u>
calls originate from <i>pstn.us2.twilio.com</i> then <u><i>$du =
"sip01.example.com:5060"</i></u>.</p>
<p>Additionally, would this also be possible based on numbers? For
example, <u><b>if</b></u> calls are to number +1-800-777-8888
then <i>$du = "sip01.example.com:5060"</i>, or if calls are to
number +1-800-777-9999 then <i>$du = "sip02.example.com:5060"</i>.</p>
<p>To be clear, I don't expect both examples above to work in the
same Kamailio instance but IF and AND clauses are possible, such
as <u><b>if</b></u> calls are to number +1-800-777-8888 AND from
<i>pstn.us1.twilio.com</i> then <u><i>$du =
"sip01.example.com:5060"</i></u>, it'd be great to test this
too.</p>
<p>I'm not sure if I'm allowed to ask such specific questions on
this mailing list and I hope I'm not asking too much.</p>
<p>Many thanks,</p>
<p>Conrad<br>
</p>
</body>
</html>