[asterisk-commits] transnexus: trunk r191300 - /trunk/apps/app_osplookup.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 30 02:21:03 CDT 2009
Author: transnexus
Date: Thu Apr 30 02:20:59 2009
New Revision: 191300
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=191300
Log:
Fixed not report source network ID and not export destination network ID issues.
Modified:
trunk/apps/app_osplookup.c
Modified: trunk/apps/app_osplookup.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/apps/app_osplookup.c?view=diff&rev=191300&r1=191299&r2=191300
==============================================================================
--- trunk/apps/app_osplookup.c (original)
+++ trunk/apps/app_osplookup.c Thu Apr 30 02:20:59 2009
@@ -849,6 +849,7 @@
* \param srcdev Source device of outbound call
* \param calling Calling number
* \param called Called number
+ * \param snetid Source network ID
* \param callidtypes Call ID types
* \param result Lookup results
* \return 1 Found , 0 No route, -1 Error
@@ -858,6 +859,7 @@
const char* srcdev,
const char* calling,
const char* called,
+ const char* snetid,
unsigned int callidtypes,
struct osp_result* result)
{
@@ -901,6 +903,10 @@
OSPPTransactionRecordFailure(result->inhandle, OSPC_FAIL_NORMAL_UNSPECIFIED);
}
return -1;
+ }
+
+ if (!ast_strlen_zero(snetid)) {
+ OSPPTransactionSetNetworkIds(result->outhandle, snetid, "");
}
callidnum = 0;
@@ -1414,7 +1420,7 @@
return -1;
}
- if ((res = osp_lookup(provider, srcdev, chan->cid.cid_num, args.exten, callidtypes, &result)) > 0) {
+ if ((res = osp_lookup(provider, srcdev, chan->cid.cid_num, args.exten, snetid, callidtypes, &result)) > 0) {
status = AST_OSP_SUCCESS;
} else {
result.tech[0] = '\0';
@@ -1445,6 +1451,8 @@
ast_debug(1, "OSPLookup: OSPCALLED '%s'\n", result.called);
pbx_builtin_setvar_helper(chan, "OSPCALLING", result.calling);
ast_debug(1, "OSPLookup: OSPCALLING '%s'\n", result.calling);
+ pbx_builtin_setvar_helper(chan, "OSPOUTNETWORKID", result.networkid);
+ ast_debug(1, "OSPLookup: OSPOUTNETWORKID '%s'\n", result.networkid);
pbx_builtin_setvar_helper(chan, "OSPOUTTOKEN", result.token);
ast_debug(1, "OSPLookup: OSPOUTTOKEN size '%zd'\n", strlen(result.token));
snprintf(buffer, sizeof(buffer), "%d", result.numresults);
@@ -1606,6 +1614,8 @@
ast_debug(1, "OSPNext: OSPCALLED'%s'\n", result.called);
pbx_builtin_setvar_helper(chan, "OSPCALLING", result.calling);
ast_debug(1, "OSPNext: OSPCALLING '%s'\n", result.calling);
+ pbx_builtin_setvar_helper(chan, "OSPOUTNETWORKID", result.networkid);
+ ast_debug(1, "OSPLookup: OSPOUTNETWORKID '%s'\n", result.networkid);
pbx_builtin_setvar_helper(chan, "OSPOUTTOKEN", result.token);
ast_debug(1, "OSPNext: OSPOUTTOKEN size '%zd'\n", strlen(result.token));
snprintf(buffer, sizeof(buffer), "%d", result.numresults);
More information about the asterisk-commits
mailing list