<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hey,<div><br></div><div>I am trying to work through a use case requirement where a user listens to a some advertisement and then if at the end off it they press a key they press a 1 key they get transfered to a pre-defined number. I am using the asterisk java library at <a href="http://asterisk-java.org/">http://asterisk-java.org/</a>.</div><div><br></div><div>I was able to originate the call easily by doing a </div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">String channel=<span style="color: #2a00ff">"SIP/"</span> + phoneNumber + <span style="color: #2a00ff">"@"</span>+getSipPeer();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><span class="Apple-tab-span" style="white-space:pre">                        </span><span style="color: #7f0055">this</span>.getAsteriskServer().originateToExtension(channel, getContext(), getExtension(), getPriority(), getTimeout(), getCallerId(), vars);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; ">my extensions.conf file has this defined in it</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><blockquote type="cite"><span class="Apple-style-span" style="font-family: Helvetica; font-size: 12px; "><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">exten => 9001,1,Agi(agi://127.0.0.1:4573/${campaign}.agi?campaign=${campaign})<br></blockquote><br><blockquote type="cite"><br></blockquote></span></blockquote></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; "><br></div></div><div>A fast AGI script is then called and I can play the media. </div><div><br></div><div>My first option was at the end of the script to set the extension to continue at 9002</div></div></blockquote><div><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(42, 0, 255); "><span class="Apple-style-span" style="color: rgb(0, 0, 0); "> <span class="Apple-tab-span" style="white-space:pre">        </span></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "><span style="color: #000000"> </span>channel.setContext("<span style="text-decoration: underline">davidtest</span>");</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "><span style="color: #000000"> </span>channel.setExtension("9002");</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "><span style="color: #000000"> </span>channel.setPriority("1");</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(63, 127, 95); "><br></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>exten => 9002,1,Transfer(SIP/${campaignNumber}@SER1)</div><div><br></div><div>When I tried this I got the following in the logs and the call would be dropped.</div><div><br></div><div><blockquote type="cite"><blockquote type="cite">[Jan 8 23:33:35] VERBOSE[16163] logger.c: --- (8 headers 0 lines) ---<br></blockquote><blockquote type="cite">[Jan 8 23:33:39] VERBOSE[16163] logger.c:<br></blockquote><blockquote type="cite"><--- SIP read from 10.128.181.23:5060 ---><br></blockquote><blockquote type="cite">SIP/2.0 403 Forbidden^M<br></blockquote><blockquote type="cite">Via: SIP/2.0/UDP<br></blockquote><blockquote type="cite">209.34.91.75<br></blockquote><blockquote type="cite">:5060;received=10.128.181.21;branch=z9hG4bK6937f2b6;rport=5060^M<br></blockquote><blockquote type="cite">From: "companyname" <sip:<a href="mailto:+14154981000@209.34.91.75">+14158888888@209.34.91.75</a>>;tag=as1e339e25^M<br></blockquote><blockquote type="cite">To: <sip:<a href="mailto:4157865776@209.34.91.74">4159999999@209.34.91.74</a>>;tag=gK028a94eb^M<br></blockquote><blockquote type="cite">Call-ID: <a href="mailto:4b07e5ef5f04f5dc40ce7d6b4b002d5f@209.34.91.75">4b07e5ef5f04f5dc40ce7d6b4b002d5f@209.34.91.75</a>^M<br></blockquote><blockquote type="cite">CSeq: 103 REFER^M<br></blockquote><blockquote type="cite">Content-Length: 0^Mites</blockquote></blockquote><br></div><div><br></div><div>I did try to execute the Transfer command directly in the Fast AGI script. The call would not drop but it did not connect. I saw no errors in the logs.</div><div><br></div></div></blockquote><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(42, 0, 255); "><span style="color: #7f0055">int</span><span style="color: #000000"> reply = channel.exec(</span>"Transfer"<span style="color: #000000">, </span>"SIP/4159999999@SER1"<span style="color: #000000">);</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Monaco; color: rgb(42, 0, 255); "><font class="Apple-style-span" color="#000000"><br></font></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I am new to Asterisk and VOIP so any help would be appreciated,</div><div><br></div><div>cheers,</div><div>David</div></div></blockquote></div><br></body></html>