[Asterisk-cvs] asterisk/channels chan_iax2.c,1.358,1.359
jim
jim
Wed Oct 19 14:25:36 CDT 2005
- Previous message: [Asterisk-cvs] asterisk/apps app_adsiprog.c, 1.16,
1.17 app_alarmreceiver.c, 1.16, 1.17 app_authenticate.c, 1.16,
1.17 app_cdr.c, 1.8, 1.9 app_chanisavail.c, 1.23,
1.24 app_chanspy.c, 1.26, 1.27 app_controlplayback.c, 1.14,
1.15 app_curl.c, 1.12, 1.13 app_cut.c, 1.15, 1.16 app_db.c,
1.14, 1.15 app_dial.c, 1.171, 1.172 app_dictate.c, 1.6,
1.7 app_directed_pickup.c, 1.4, 1.5 app_directory.c, 1.46,
1.47 app_disa.c, 1.35, 1.36 app_dumpchan.c, 1.11,
1.12 app_enumlookup.c, 1.22, 1.23 app_eval.c, 1.8,
1.9 app_externalivr.c, 1.10, 1.11 app_festival.c, 1.34,
1.35 app_groupcount.c, 1.22, 1.23 app_hasnewvoicemail.c, 1.18,
1.19 app_ices.c, 1.9, 1.10 app_image.c, 1.9,
1.10 app_intercom.c, 1.24, 1.25 app_ivrdemo.c, 1.9,
1.10 app_macro.c, 1.29, 1.30 app_math.c, 1.14, 1.15 app_md5.c,
1.9, 1.10 app_meetme.c, 1.113, 1.114 app_milliwatt.c, 1.13,
1.14 app_mp3.c, 1.28, 1.29 app_muxmon.c, 1.3, 1.4 app_nbscat.c,
1.13, 1.14 app_osplookup.c, 1.11, 1.12 app_page.c, 1.6,
1.7 app_parkandannounce.c, 1.17, 1.18 app_playback.c, 1.21,
1.22 app_queue.c, 1.171, 1.172 app_random.c, 1.9,
1.10 app_read.c, 1.23, 1.24 app_readfile.c, 1.9,
1.10 app_realtime.c, 1.13, 1.14 app_record.c, 1.38,
1.39 app_senddtmf.c, 1.12, 1.13 app_sendtext.c, 1.10,
1.11 app_setcallerid.c, 1.11, 1.12 app_setcdruserfield.c, 1.10,
1.11 app_setcidname.c, 1.12, 1.13 app_setcidnum.c, 1.13,
1.14 app_setrdnis.c, 1.8, 1.9 app_settransfercapability.c, 1.8,
1.9 app_skel.c, 1.14, 1.15 app_sms.c, 1.28,
1.29 app_softhangup.c, 1.10, 1.11 app_sql_postgres.c, 1.14,
1.15 app_striplsd.c, 1.8, 1.9 app_substring.c, 1.13,
1.14 app_system.c, 1.19, 1.20 app_talkdetect.c, 1.14,
1.15 app_test.c, 1.13, 1.14 app_transfer.c, 1.15,
1.16 app_txtcidname.c, 1.19, 1.20 app_url.c, 1.12,
1.13 app_userevent.c, 1.8, 1.9 app_verbose.c, 1.7,
1.8 app_voicemail.c, 1.252, 1.253 app_waitforring.c, 1.8,
1.9 app_waitforsilence.c, 1.10, 1.11 app_while.c, 1.11,
1.12 app_zapateller.c, 1.11, 1.12 app_zapbarge.c, 1.11,
1.12 app_zapras.c, 1.14, 1.15
- Next message: [Asterisk-cvs] asterisk/apps app_dial.c,1.172,1.173
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv15338/channels
Modified Files:
chan_iax2.c
Log Message:
Allow for obtaining IAX2 call peer (endpoint) IP address with IAXPEER(CURRENTCHAN) function
Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.358
retrieving revision 1.359
diff -u -d -r1.358 -r1.359
--- chan_iax2.c 17 Oct 2005 22:26:33 -0000 1.358
+++ chan_iax2.c 19 Oct 2005 18:19:22 -0000 1.359
@@ -9133,6 +9133,13 @@
return ret;
}
+ /* if our channel, return the IP address of the endpoint of current channel */
+ if (!strcmp(peername,"CURRENTCHANNEL")) {
+ unsigned short callno = PTR_TO_CALLNO(chan->tech_pvt);
+ ast_copy_string(buf, iaxs[callno]->addr.sin_addr.s_addr ? ast_inet_ntoa(iabuf, sizeof(iabuf), iaxs[callno]->addr.sin_addr) : "", len);
+ return buf;
+ }
+
if ((colname = strchr(peername, ':'))) {
*colname = '\0';
colname++;
@@ -9181,9 +9188,9 @@
struct ast_custom_function iaxpeer_function = {
.name = "IAXPEER",
.synopsis = "Gets IAX peer information",
- .syntax = "IAXPEER(<peername>[:item])",
+ .syntax = "IAXPEER(<peername|CURRENTCHANNEL>[:item])",
.read = function_iaxpeer,
- .desc = "Valid items are:\n"
+ .desc = "If peername specified, valid items are:\n"
"- ip (default) The IP address.\n"
"- mailbox The configured mailbox.\n"
"- context The configured context.\n"
@@ -9194,6 +9201,8 @@
"- codecs The configured codecs.\n"
"- codec[x] Preferred codec index number 'x' (beginning with zero).\n"
"\n"
+ "If CURRENTCHANNEL specified, returns IP address of current channel\n"
+ "\n"
};
- Previous message: [Asterisk-cvs] asterisk/apps app_adsiprog.c, 1.16,
1.17 app_alarmreceiver.c, 1.16, 1.17 app_authenticate.c, 1.16,
1.17 app_cdr.c, 1.8, 1.9 app_chanisavail.c, 1.23,
1.24 app_chanspy.c, 1.26, 1.27 app_controlplayback.c, 1.14,
1.15 app_curl.c, 1.12, 1.13 app_cut.c, 1.15, 1.16 app_db.c,
1.14, 1.15 app_dial.c, 1.171, 1.172 app_dictate.c, 1.6,
1.7 app_directed_pickup.c, 1.4, 1.5 app_directory.c, 1.46,
1.47 app_disa.c, 1.35, 1.36 app_dumpchan.c, 1.11,
1.12 app_enumlookup.c, 1.22, 1.23 app_eval.c, 1.8,
1.9 app_externalivr.c, 1.10, 1.11 app_festival.c, 1.34,
1.35 app_groupcount.c, 1.22, 1.23 app_hasnewvoicemail.c, 1.18,
1.19 app_ices.c, 1.9, 1.10 app_image.c, 1.9,
1.10 app_intercom.c, 1.24, 1.25 app_ivrdemo.c, 1.9,
1.10 app_macro.c, 1.29, 1.30 app_math.c, 1.14, 1.15 app_md5.c,
1.9, 1.10 app_meetme.c, 1.113, 1.114 app_milliwatt.c, 1.13,
1.14 app_mp3.c, 1.28, 1.29 app_muxmon.c, 1.3, 1.4 app_nbscat.c,
1.13, 1.14 app_osplookup.c, 1.11, 1.12 app_page.c, 1.6,
1.7 app_parkandannounce.c, 1.17, 1.18 app_playback.c, 1.21,
1.22 app_queue.c, 1.171, 1.172 app_random.c, 1.9,
1.10 app_read.c, 1.23, 1.24 app_readfile.c, 1.9,
1.10 app_realtime.c, 1.13, 1.14 app_record.c, 1.38,
1.39 app_senddtmf.c, 1.12, 1.13 app_sendtext.c, 1.10,
1.11 app_setcallerid.c, 1.11, 1.12 app_setcdruserfield.c, 1.10,
1.11 app_setcidname.c, 1.12, 1.13 app_setcidnum.c, 1.13,
1.14 app_setrdnis.c, 1.8, 1.9 app_settransfercapability.c, 1.8,
1.9 app_skel.c, 1.14, 1.15 app_sms.c, 1.28,
1.29 app_softhangup.c, 1.10, 1.11 app_sql_postgres.c, 1.14,
1.15 app_striplsd.c, 1.8, 1.9 app_substring.c, 1.13,
1.14 app_system.c, 1.19, 1.20 app_talkdetect.c, 1.14,
1.15 app_test.c, 1.13, 1.14 app_transfer.c, 1.15,
1.16 app_txtcidname.c, 1.19, 1.20 app_url.c, 1.12,
1.13 app_userevent.c, 1.8, 1.9 app_verbose.c, 1.7,
1.8 app_voicemail.c, 1.252, 1.253 app_waitforring.c, 1.8,
1.9 app_waitforsilence.c, 1.10, 1.11 app_while.c, 1.11,
1.12 app_zapateller.c, 1.11, 1.12 app_zapbarge.c, 1.11,
1.12 app_zapras.c, 1.14, 1.15
- Next message: [Asterisk-cvs] asterisk/apps app_dial.c,1.172,1.173
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list