Hello,

  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:
context autodialer-local {
 _X. => {
  SipAddHeader(P-Asserted-Identity:
<sip:${CALLERID(num)}[email protected];user=phone>);
  Dial(SIP/trunk-out/${EXTEN},60,M(autodialer-playback^${PROMPT}));
  Hangup();
 };
}

extensions.conf:
[macro-autodialer-playback]
exten => s,1,Playback(${ARG1})


Originate Command would be:
Channel: Local/123...@autodialer-local
Context: autodialer-local
Exten: 123456
Priority: 1
Variable: PROMPT=music
Timeout: 60000


  Everything seems to be ok, but then B side hears prompt and hangsup,
Asterisk start again execute autodialer-local  context - makes a loop.
Maybe someone knows how to solve this or other way to do this?

Thanks

-- 
Pagarbiai  / Best Regards,
Giedrius Augys
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to