[asterisk-dev] Trying to do a transfer

David Jones david.jones at davidbrummy.com
Fri Jan 16 17:14:30 CST 2009


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.

exten => 9002,1,Transfer(SIP/${campaignNumber}@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: "Kadoink" <sip:+14158888888 at 209.34.91.75>;tag=as1e339e25^M
>> To: <sip:4159999999 at 209.34.91.74>;tag=gK028a94eb^M
>> Call-ID: 4b07e5ef5f04f5dc40ce7d6b4b002d5f at 209.34.91.75^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.

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

cheers,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090116/c10bbf1a/attachment.htm 


More information about the asterisk-dev mailing list