[asterisk-commits] mmichelson: branch group/pimp_my_sip r380099 - in /team/group/pimp_my_sip: ch...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 25 10:25:51 CST 2013
Author: mmichelson
Date: Fri Jan 25 10:25:47 2013
New Revision: 380099
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380099
Log:
Add some helpful debug and error messages.
Modified:
team/group/pimp_my_sip/channels/chan_gulp.c
team/group/pimp_my_sip/res/res_sip.c
team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c
Modified: team/group/pimp_my_sip/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/channels/chan_gulp.c?view=diff&rev=380099&r1=380098&r2=380099
==============================================================================
--- team/group/pimp_my_sip/channels/chan_gulp.c (original)
+++ team/group/pimp_my_sip/channels/chan_gulp.c Fri Jan 25 10:25:47 2013
@@ -626,6 +626,7 @@
ast_sip_session_send_response(session, packet);
}
+ ast_log(LOG_ERROR, "Failed to allocate new GULP channel on incoming SIP INVITE\n");
return -1;
}
@@ -647,6 +648,8 @@
default:
break;
}
+
+ ast_debug(3, "Started PBX on new GULP channel %s\n", ast_channel_name(session->channel));
return (res == AST_PBX_SUCCESS) ? 0 : -1;
}
Modified: team/group/pimp_my_sip/res/res_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip.c?view=diff&rev=380099&r1=380098&r2=380099
==============================================================================
--- team/group/pimp_my_sip/res/res_sip.c (original)
+++ team/group/pimp_my_sip/res/res_sip.c Fri Jan 25 10:25:47 2013
@@ -49,6 +49,7 @@
static int sip_initialize_sorcery(void)
{
if (!(sip_sorcery = ast_sorcery_open())) {
+ ast_log(LOG_ERROR, "Failed to open SIP sorcery failed to open\n");
return -1;
}
@@ -56,6 +57,7 @@
ast_sorcery_apply_default(sip_sorcery, "endpoint", "config", "res_sip.conf,criteria=type=endpoint");
if (ast_sorcery_object_register(sip_sorcery, "endpoint", ast_sip_endpoint_alloc, NULL, NULL)) {
+ ast_log(LOG_ERROR, "Failed to register SIP endpoint object with sorcery\n");
ast_sorcery_unref(sip_sorcery);
sip_sorcery = NULL;
return -1;
Modified: team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c?view=diff&rev=380099&r1=380098&r2=380099
==============================================================================
--- team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c (original)
+++ team/group/pimp_my_sip/res/res_sip_endpoint_identifier_user.c Fri Jan 25 10:25:47 2013
@@ -41,7 +41,7 @@
return 0;
}
-static struct ast_sip_endpoint *constant_identify(pjsip_rx_data *rdata)
+static struct ast_sip_endpoint *username_identify(pjsip_rx_data *rdata)
{
char endpoint_name[64];
struct ast_sip_endpoint *endpoint;
@@ -49,11 +49,14 @@
return NULL;
}
endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", endpoint_name);
+ if (endpoint) {
+ ast_debug(3, "Retrieved endpoint %s\n", endpoint->name);
+ }
return endpoint;
}
static struct ast_sip_endpoint_identifier username_identifier = {
- .identify_endpoint = constant_identify,
+ .identify_endpoint = username_identify,
};
static int load_module(void)
More information about the asterisk-commits
mailing list