<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">I’ve connected freeswitch with an asterisk server via sip trunk with the following configuration in my test environment: </div><div class=""><br class=""></div><div class="">Freeswitch side:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #29f914" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><gateway</span> name="<a href="http://sip.testprovider.com" class="">sip.testprovider.com</a>"<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">></span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #29f914" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><param</span> name="username" value="MyCustomSipTrunk1"/<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">></span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #29f914" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><param</span> name="password" value="easy123"/<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">></span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #29f914" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><param</span> name="extension" value="trunk"/<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">></span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #29f914" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><param</span> name="register" value="true"/<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">></span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #29f914" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><param</span> name="from_domain" value="<a href="http://sip.testprovider.com" class="">sip.testprovider.com</a>"/<span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">></span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class=""> <span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""></gateway></span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class=""><br class=""></span></div><div class="">Asterisk side:</div><div class=""><br class=""></div><div class="">sip.conf</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class="">[MyCustomSipTrunk1]</div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(175, 173, 36); background-color: rgb(0, 0, 0);" class=""><span style="color: rgb(41, 249, 20);" class="">type</span><span style="color: rgb(52, 189, 38);" class="">=</span><span style="color: rgb(41, 249, 20);" class="">peer</span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(175, 173, 36); background-color: rgb(0, 0, 0);" class=""><span style="color: rgb(41, 249, 20);" class="">callerid</span><span style="color: rgb(52, 189, 38);" class="">=</span><span style="color: rgb(213, 59, 211);" class="">"MyCustomSipTrunk1"</span><span style="color: rgb(41, 249, 20);" class=""> </span><span style="color: rgb(52, 189, 38);" class=""><</span><span style="color: rgb(41, 249, 20);" class="">MyCustomSipTrunk1</span><span style="color: rgb(52, 189, 38);" class="">></span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class="">host<span style="color: rgb(52, 189, 38);" class="">=</span>dynamic </div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class="">nat<span style="color: rgb(52, 189, 38);" class="">=</span>no</div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(175, 173, 36); background-color: rgb(0, 0, 0);" class=""><span style="color: rgb(41, 249, 20);" class="">username</span><span style="color: rgb(52, 189, 38);" class="">=</span><span style="color: rgb(41, 249, 20);" class="">MyCustomSipTrunk1 </span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class="">fromdomain<span style="color: rgb(52, 189, 38);" class="">=</span><a href="http://sip.testprovider.com" class="">sip.testprovider.com</a></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(175, 173, 36); background-color: rgb(0, 0, 0);" class=""><span style="color: rgb(41, 249, 20);" class="">directmedia</span><span style="color: rgb(52, 189, 38);" class="">=</span><span style="color: rgb(41, 249, 20);" class="">no </span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class="">disallow<span style="color: rgb(52, 189, 38);" class="">=</span>all</div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(175, 173, 36); background-color: rgb(0, 0, 0);" class=""><span style="color: rgb(41, 249, 20);" class="">allow</span><span style="color: rgb(52, 189, 38);" class="">=</span><span style="color: rgb(41, 249, 20);" class="">gsm </span></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class="">allow<span style="color: rgb(52, 189, 38);" class="">=</span>ulaw</div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class="">allow<span style="color: rgb(52, 189, 38);" class="">=</span>alaw</div></div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(41, 249, 20); background-color: rgb(0, 0, 0);" class=""><div style="margin: 0px;" class="">secret<span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">=</span>easy123</div><div style="margin: 0px;" class="">context<span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">=</span>kamailio</div></div><div class=""><br class=""></div><div class="">extensions.conf</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(52, 189, 38); background-color: rgb(0, 0, 0);" class="">[kamailio]</div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(213, 59, 211); background-color: rgb(0, 0, 0);" class="">exten =><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""> _X.</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #5330e1" class="">1</span><span style="font-variant-ligatures: no-common-ligatures; color: #29f914" class="">,</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bbc7" class="">Dial</span><span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">(</span>SIP/<span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class="">${EXTEN}</span>@MyCustomSipTrunk1,60,tr<span style="font-variant-ligatures: no-common-ligatures; color: #34bd26" class="">)</span></div></div><div class=""><br class=""></div><div class="">If I send a call from asterisk to freeswitch, I can see the following in the log:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(175, 173, 36); background-color: rgb(0, 0, 0);" class="">2015-09-02 00:06:28.877729 [DEBUG] sofia.c:9001 IP 192.168.1.202 Rejected by acl "domains". Falling back to Digest auth.</div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(213, 59, 211); background-color: rgb(0, 0, 0);" class="">2015-09-02 00:06:28.877729 [WARNING] sofia_reg.c:2827 Can't find user [<a href="mailto:MyCustomSipTrunk1@sip.testprovider.com" class="">MyCustomSipTrunk1@sip.testprovider.com</a>] from 192.168.1.202</div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(213, 59, 211); background-color: rgb(0, 0, 0);" class="">You must define a domain called '<a href="http://sip.testprovider.com" class="">sip.testprovider.com</a>' in your directory and add a user with the id="MyCustomSipTrunk1" attribute</div><div style="margin: 0px; font-size: 14px; font-family: Menlo; color: rgb(213, 59, 211); background-color: rgb(0, 0, 0);" class="">and you must configure your device to use the proper domain in it's authentication credentials.</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">If I create the user in the directory for the domain, it works - but why do I need to create this user however the gateway is already already registered and authenticated with the asterisk server?</div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class="">Markus</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div></body></html>