mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	res_pjsip_pidf_eyebeam_body_supplement: Correct status presentation
This change fixes PIDF content generation when the underlying device
state is considered in use. Previously it was incorrectly marked
as closed meaning they were offline/unavailable. The code now
correctly marks them as open.
Additionally:
  * Generate an XML element for our activity instead of a using a text
    node.
  * Consider every extension state other than "unavailable" to be 'open'
    status.
  * Update the XML namespaces and structure to reflect those
    documented in RFC 4480
  * Use 'on-the-phone' (defined in RFC 4880) instead of 'busy' as the
    "in use" activity. This change results in eyeBeam using the
    appropriate icon for the watched user.
This was tested on eyeBeam 1.5.20.2 build 59030 on Windows.
ASTERISK-26659 #close
Reported by: Abraham Liebsch
patches:
  ASTERISK-26659.diff submitted by snuffy (license 5024)
Change-Id: I6e5ad450f91106029fb30517b8c0ea0c2058c810
			
			
This commit is contained in:
		
				
					committed by
					
						 George Joseph
						George Joseph
					
				
			
			
				
	
			
			
			
						parent
						
							2a4283f3e7
						
					
				
				
					commit
					2be8d91c0f
				
			| @@ -89,7 +89,7 @@ void ast_sip_presence_exten_state_to_str(int state, char **statestring, char **p | ||||
| 	case AST_EXTENSION_RINGING: | ||||
| 		*statestring = "early"; | ||||
| 		*local_state = NOTIFY_INUSE; | ||||
| 		*pidfstate = "busy"; | ||||
| 		*pidfstate = "on-the-phone"; | ||||
| 		*pidfnote = "Ringing"; | ||||
| 		break; | ||||
| 	case (AST_EXTENSION_INUSE | AST_EXTENSION_RINGING): | ||||
| @@ -99,31 +99,31 @@ void ast_sip_presence_exten_state_to_str(int state, char **statestring, char **p | ||||
| 			*statestring = "confirmed"; | ||||
| 		} | ||||
| 		*local_state = NOTIFY_INUSE; | ||||
| 		*pidfstate = "busy"; | ||||
| 		*pidfstate = "on-the-phone"; | ||||
| 		*pidfnote = "Ringing"; | ||||
| 		break; | ||||
| 	case AST_EXTENSION_INUSE: | ||||
| 		*statestring = "confirmed"; | ||||
| 		*local_state = NOTIFY_INUSE; | ||||
| 		*pidfstate = "busy"; | ||||
| 		*pidfstate = "on-the-phone"; | ||||
| 		*pidfnote = "On the phone"; | ||||
| 		break; | ||||
| 	case AST_EXTENSION_BUSY: | ||||
| 		*statestring = "confirmed"; | ||||
| 		*local_state = NOTIFY_CLOSED; | ||||
| 		*pidfstate = "busy"; | ||||
| 		*local_state = NOTIFY_INUSE; | ||||
| 		*pidfstate = "on-the-phone"; | ||||
| 		*pidfnote = "On the phone"; | ||||
| 		break; | ||||
| 	case AST_EXTENSION_UNAVAILABLE: | ||||
| 		*statestring = "terminated"; | ||||
| 		*local_state = NOTIFY_CLOSED; | ||||
| 		*pidfstate = "away"; | ||||
| 		*pidfstate = "--"; | ||||
| 		*pidfnote = "Unavailable"; | ||||
| 		break; | ||||
| 	case AST_EXTENSION_ONHOLD: | ||||
| 		*statestring = "confirmed"; | ||||
| 		*local_state = NOTIFY_CLOSED; | ||||
| 		*pidfstate = "busy"; | ||||
| 		*local_state = NOTIFY_INUSE; | ||||
| 		*pidfstate = "on-the-phone"; | ||||
| 		*pidfnote = "On hold"; | ||||
| 		break; | ||||
| 	case AST_EXTENSION_NOT_INUSE: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user