Hey,

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 http://asterisk-java.org/ .

I was able to originate the call easily by doing a

String channel="SIP/" + phoneNumber + "@"+getSipPeer();
this.getAsteriskServer().originateToExtension(channel, getContext(), getExtension(), getPriority(), getTimeout(), getCallerId(), vars);

my extensions.conf file has this defined in it



exten => 9001,1,Agi(agi://127.0.0.1:4573/${campaign}.agi?campaign=$ {campaign})




A fast AGI script is then called and I can play the media.

My first option was at the end of the script to set the extension to continue at 9002

        
 channel.setContext("davidtest");
 channel.setExtension("9002");
 channel.setPriority("1");


exten => 9002,1,Transfer(SIP/${campaignnumb...@ser1)

When I tried this I got the following in the logs and the call would be dropped.

[Jan 8 23:33:35] VERBOSE[16163] logger.c: --- (8 headers 0 lines) ---
[Jan  8 23:33:39] VERBOSE[16163] logger.c:
<--- SIP read from 10.128.181.23:5060 --->
SIP/2.0 403 Forbidden^M
Via: SIP/2.0/UDP
209.34.91.75
:5060;received=10.128.181.21;branch=z9hG4bK6937f2b6;rport=5060^M
From: "companyname" <sip:[email protected]>;tag=as1e339e25^M
To: <sip:[email protected]>;tag=gK028a94eb^M
Call-ID: [email protected]^m
CSeq: 103 REFER^M
Content-Length: 0^Mites


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.


int reply = channel.exec("Transfer", "SIP/4159999...@ser1");

I am new to Asterisk and VOIP so any help would be appreciated,

cheers,
David

_______________________________________________
-- 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