<div>Assuming a sip client lands calls in a context named 'from-sip', I would have following sort of logic in dialplan.</div><div><br></div><div>[from-sip]</div><div>exten => _X.,1,Noop(${EXTEN},${UNIQUEID})</div>
<div>same => n,System(echo -e "Channel:Local/s@specific-number/n\\nContext:external\\nExtension:s\\npriority:1\\nSet: external_num=${EXTEN}" >/tmp/${UNIQUEID}.call)</div><div>same => n,System(/bin/mv /tmp/${UNIQUEID}.call /var/spool/asterisk/outgoing/)</div>
<div>same => n,Hangup()</div><div><br></div><div>[specific-number]</div><div>exten => s,1,Noop()</div><div>same => n,Dial(DAHDI/g0/XXXXXXXXXX,30)</div><div><br></div><div>[external]</div><div>exten => s,1,Noop()</div>
<div>same => n,Dial(DAHDI/g0/${external_num},30)</div><div><br></div><div>You can also use Asterisk application 'originate' in place of callfiles. I normally prefer local channels in Callfiles or Originate so that I can have better call control through dialplan.</div>
<div><br></div><div>--Satish Barot</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 3, 2012 at 3:08 PM, bilal ghayyad <span dir="ltr"><<a href="mailto:bilmar_gh@yahoo.com" target="_blank">bilmar_gh@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All;<br>
<br>
How I can acheive the following:<br>
<br>
>From sip client softphone (from the iPhone for example), if I dialed a number that I need to call it, then a call to be initated to a specific number through DAHDI channel and another call to be initiated for the destination number (the number that I dialed it from the softphone) and these two calls to be linked togethor (to call each other directly). So the call from the softphone just to important in the begining to trigger this scenario.<br>
<br>
How this settings to be done?<br>
<br>
Regards<br>
Bilal<br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</blockquote></div><br></div>