[Freeswitch-svn] [commit] r2262 - freeswitch/branches/bennylp/src/mod/endpoints/mod_pjsip

Freeswitch SVN bennylp at freeswitch.org
Fri Aug 11 14:49:24 EDT 2006


Author: bennylp
Date: Fri Aug 11 14:49:23 2006
New Revision: 2262

Modified:
   freeswitch/branches/bennylp/src/mod/endpoints/mod_pjsip/mod_pjsip.c

Log:
Fixed destination number unset in mod_pjsip

Modified: freeswitch/branches/bennylp/src/mod/endpoints/mod_pjsip/mod_pjsip.c
==============================================================================
--- freeswitch/branches/bennylp/src/mod/endpoints/mod_pjsip/mod_pjsip.c	(original)
+++ freeswitch/branches/bennylp/src/mod/endpoints/mod_pjsip/mod_pjsip.c	Fri Aug 11 14:49:23 2006
@@ -963,8 +963,9 @@
 		if (PJSIP_URI_SCHEME_IS_SIP(rxdata->msg_info.to->uri)) {
 			pjsip_sip_uri *sip_uri;
 
-			sip_uri = pjsip_uri_get_uri(rxdata->msg_info.from->uri);
+			sip_uri = pjsip_uri_get_uri(rxdata->msg_info.to->uri);
 			pj_strdup_with_null( dialog->pool, &destination, &sip_uri->user);
+			PJ_LOG(3,(dialog->obj_name, "Destination set to %s", destination.ptr));
 		} else {
 			destination = pj_str("unknown");
 		}
@@ -994,7 +995,8 @@
 		/* Send 100 Trying */
 		status = pjsip_inv_initial_answer( tech_pvt->sip_invite, rxdata, 100, NULL, NULL, &txdata );
 		if( status != PJ_SUCCESS ) {
-			perror_(tech_pvt->sip_invite->dlg->obj_name, "Error in pjsip_inv_initial_answer", status);
+			perror_(tech_pvt->sip_invite->dlg->obj_name, 
+				"Error in pjsip_inv_initial_answer", status);
 
 			pjsip_dlg_respond(dialog, rxdata, 500, NULL, NULL, NULL);
 			pjsip_inv_terminate(tech_pvt->sip_invite, 500, PJ_FALSE);



More information about the Freeswitch-svn mailing list