mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Add the ability to retrieve the source port of a SIP call.
This adds the ability to call CHANNEL(recvport) on chan_sip channels to see the port on which an INVITE was received. ASTERISK-24040 #close Reported by dtryba Patches: dialplan_functions.patch uploaded by dtryba (License #6628) Review: https://reviewboard.asterisk.org/r/3781 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -76,6 +76,8 @@ int sip_acf_channel_read(struct ast_channel *chan, const char *funcname, char *p | ||||
| 		ast_copy_string(buf, ast_sockaddr_isnull(&p->sa) ? "" : ast_sockaddr_stringify_addr(&p->sa), buflen); | ||||
| 	} else if (!strcasecmp(args.param, "recvip")) { | ||||
| 		ast_copy_string(buf, ast_sockaddr_isnull(&p->recv) ? "" : ast_sockaddr_stringify_addr(&p->recv), buflen); | ||||
| 	} else if (!strcasecmp(args.param, "recvport")) { | ||||
| 		ast_copy_string(buf, ast_sockaddr_isnull(&p->recv) ? "" : ast_sockaddr_stringify_port(&p->recv), buflen); | ||||
| 	} else if (!strcasecmp(args.param, "from")) { | ||||
| 		ast_copy_string(buf, p->from, buflen); | ||||
| 	} else if (!strcasecmp(args.param, "uri")) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user