<div> </div><div> </div><div>11.08.2017, 14:56, "Daniel Tryba" <d.tryba@pocos.nl>:</div><blockquote type="cite"><p><br />There is nothing special about this scenario, asterisk is an enduser for<br />kamailio. Have it register to kamailio and use for example the alias_db<br />module to send 7XXX numbers to the registered asterisk user. All this is<br />in the supplied example config kamailio-advanced.cfg.</p></blockquote><div> </div><div>Thanks!</div><div> </div><div>Using alias_db - 7XXX calls were succesfully aliased and routed to Asterisk through 4444 user (asterisk server did not accept connections to sip ports from Internet due to security reasons).</div><div>On asterisk side, all this calls had equal extension, configured in sip.conf "REGISTER =>.../exten" string.</div><div> </div><div>So I had to extract right exten from TO: header in dialplan like this:</div><div> </div><div><div>[from_kamailio]</div><div>exten => 4444,1,Noop(Call EXTEN:${EXTEN} TO:${SIP_HEADER(TO)})</div><div>same => n,Set(newext=${SIP_HEADER(To)})</div><div>same => n,Set(newext=${CUT(newext,@,1)})</div><div>same => n,Set(newext=${CUT(newext,:,2)})</div><div>same => n,Goto(from_kamailio,${newext},1)</div><div> </div><div>exten => _7XXX,1,Noop(Call to ${EXTEN})</div><div>same  => n,Dial(SIP/${EXTEN});</div><div>same  => n,Hangup()</div><div> </div><div> </div><div>One disadvantage with alias_db - is that i cant use regex to alias all 7XXX numbers with 4444 user, so i need to create aliases for every 7XXX user in dbaliases table using this scenario.</div><div> </div><div>Is the any other not very difficult way to route all 7XXX calls in Kamailio to Asterisk through 4444 user without creating alias dbrecords for every number?</div><div> </div><div> </div></div>