[asterisk-bugs] [Asterisk 0009239]: [patch] sip attended transfer - xfersound

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Jul 31 23:37:12 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=9239 
====================================================================== 
Reported By:                sunder
Assigned To:                oej
====================================================================== 
Project:                    Asterisk
Issue ID:                   9239
Category:                   Channels/chan_sip/Transfers
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     feedback
Asterisk Version:            1.2.15 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        Yes 
Request Review:              
====================================================================== 
Date Submitted:             03-08-2007 12:42 CST
Last Modified:              07-31-2007 23:37 CDT
====================================================================== 
Summary:                    [patch] sip attended transfer - xfersound
Description: 
I have had multiple requests for asterisk to play an xfersound sound when
the call is bridged during a attend transfer, from our customers. So I sat
down it wrote it. I works great so far, but I had to make some changes to
channel.c, channel.h, and chan_sip.so. The code that I wrote is mainly a
proof of concept. 
I would like everyone to review the code real quick to see if this I will
break anything else,  if I am going about it the wrong way, or if i need to
change something. The way that I wrote this, it will easily be able to move
the code over to other channels, especially IAX. I have developed this on
asterisk-1.2.15, since I am the most familiar with 1.2, and have not
touched 1.4 yet. After I get thing nailed down and working properly I will
get it working in the trunk version and then submit it to bugs.digium.com.


Plays a ?beep? only on the phone that is receiving the transferred call.

Related bug tracker item http://bugs.digium.com/view.php?id=3819 , I found
this after I wrote the code.


How it works.
File: channels.h
	Added xfersound variable to the ast_channel structure

File: Chan_sip.c
	Added xfersound variable to the ast_channel structure


	If there is a attend transfer request set sip_pvt->xfersound to 1
	Then the function attempt_transfer() is call to try and bridge the
channels.
		If the sip_pvt->xfersound flag is set to 1 
Then set ast_channel->xfersound to 1

File: Channels.c
	During ast_generic_bridge()
	During the infinite ?for(;;)? loop
		If the xfersound flag is set in the ast_channel structure of either
peer. 
                       Bridge_playfile(?beep?)
		




======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0003819 [request] xfersound = beep   for SIP tr...
====================================================================== 

---------------------------------------------------------------------- 
 sunder - 07-31-07 23:37  
---------------------------------------------------------------------- 
Here is a patch for trunk: xfersound-r1.patch

It is untested.................

It complies.....................

I will test when i am back at the office.....

When you apply this patch, xfersound always turn on no matter want. After
i verify this, i will create a setting in general to turn on and off the
xfersound, and choose what file is to be played. Right now it just plays
"beep" 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-31-07 23:37  sunder         Note Added: 0068183                          
======================================================================




More information about the asterisk-bugs mailing list