<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 19 Jan 2015, at 21:42, <a href="mailto:mail@sathees.co.uk">mail@sathees.co.uk</a> <<a href="mailto:mahan.sathees@gmail.com">mahan.sathees@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p class="MsoNormal" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span lang="EN-US" style="font-size: 10pt;">kamailio passing DDI to asterisk, but its sending to wrong context.</span></p><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span lang="EN-US" style="font-size: 10pt;"> </span><br class="webkit-block-placeholder"></div><p class="MsoNormal" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span lang="EN-US" style="font-size: 10pt;"> If any of the<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: Arial;">sip users is registered, the calls were sending to registered user context. If no sip user is online then calls has been send to kamailio-trunk. How can I get all DDI to kamailio-trunk?  How can I solve this problem?</span></p><br class="Apple-interchange-newline"></blockquote></div>THis is an Asterisk problem. Turn on SIP debugging in Asterisk and Asterisk will tell you how it matches an incoming request<div>to your list of peers and users, and selects incoming context based on that. Based on that you can fix your sip.conf to </div><div>always match the proper peer and thus get the calls to the context you want.</div><div><br></div><div>/Olle</div></body></html>