<div>Hello,</div>
<div> </div>
<div> I want originate a call to some destination, and when B side answes to play a prompt. Asterisk version is 1.6.0.5. But also I need to insert a SIP header to Invite, that's why I'm using Local Channel. This is my extension.ael:<br clear="all">
context autodialer-local {<br> _X. => {<br> SipAddHeader(P-Asserted-Identity: <sip:${CALLERID(num)}@xxx.xxx.xxx.xxx;user=phone>);<br> Dial(SIP/trunk-out/${EXTEN},60,M(autodialer-playback^${PROMPT}));<br> Hangup();<br>
};</div>
<div>}</div>
<div> </div>
<div>extensions.conf:</div>
<div>[macro-autodialer-playback]<br>exten => s,1,Playback(${ARG1})</div>
<div> </div>
<div> </div>
<div>Originate Command would be:</div>
<div>Channel: <a href="mailto:Local/123456@autodialer-local">Local/123456@autodialer-local</a><br>Context: autodialer-local<br>Exten: 123456<br>Priority: 1<br>Variable: PROMPT=music<br>Timeout: 60000</div>
<div> </div>
<div> </div>
<div> Everything seems to be ok, but then B side hears prompt and hangsup, Asterisk start again execute autodialer-local context - makes a loop.</div>
<div>Maybe someone knows how to solve this or other way to do this?</div>
<div> </div>
<div>Thanks</div>
<div><br>-- <br>Pagarbiai / Best Regards,<br>Giedrius Augys<br></div>