[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Aug 24 13:12:09 CDT 2010


branch "master" has been updated
       via  0cc8a3f0a384aed099383f2cec42115d086941b4 (commit)
       via  80c148d2d4327f6b2f3aa01ab5ca25b24ac91780 (commit)
       via  a27688ee8b03b3cf9c4ee11cc3f5db785835eb4f (commit)
      from  cc8b5223d7d4e1078bdd60e362f9b452cb951151 (commit)

Summary of changes:
 src/CMakeLists.txt  |    4 ++--
 src/SipEndpoint.cpp |   41 +++++++++++++++++++----------------------
 2 files changed, 21 insertions(+), 24 deletions(-)


- Log -----------------------------------------------------------------
commit 0cc8a3f0a384aed099383f2cec42115d086941b4
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Aug 24 15:24:15 2010 -0300

    Implement the 'ring' stub.

diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index 8a30674..e70df85 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -53,24 +53,12 @@ public:
 
 	void ring(const Core::Endpoint::V1::EndpointIdPtr& ep, const Ice::Current&)
 	{
-		//stub
-		//Look up SipSessionEndpoint
-		//Get PJSipManager, and get the pjsip_endpoint
-		//Get INVITE transaction and dialog
-		//	(pjsip_endpt_find_tsx)
-		//	(pjsip_tsx_get_dlg)
-		//Double check current INVITE state to be sure
-		//	it makes sense to send a ringing message
-		//Send 180 response
-		//  (pjsip_dlg_create_response)
-		//  (pjsip_dlg_send_response)
-		//In order to create response I have to have the
-		//rx_data from the incoming INVITE. I suppose I
-		//can save that in the transaction's mod_data?
-		//Actually, I'll probably have already sent a 100
-		//response when I received the INVITE, so I can
-		//just modify the previous transaction's tdata
-		//as shown in PJSIP developer's guide 10.3.1
+	   pjsip_tx_data *packet;
+
+	   if ((pjsip_inv_end_session(mEndpoint->getInviteSession(), 180, NULL, &packet)) == PJ_SUCCESS)
+	   {
+	      pjsip_inv_send_msg(mEndpoint->getInviteSession(), packet);
+	   }
 	}
 	void connected(const Core::Endpoint::V1::EndpointIdPtr& ep, const Ice::Current&)
 	{

commit 80c148d2d4327f6b2f3aa01ab5ca25b24ac91780
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Aug 24 15:20:01 2010 -0300

    Fill in 'busy' and 'congestion' stubs.

diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index c5fbd20..8a30674 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -97,13 +97,22 @@ public:
 	}
 	void busy(const Core::Endpoint::V1::EndpointIdPtr& ep, const Ice::Current&)
 	{
-		//stub
-		//Similar to ring, but send a 486
+	   pjsip_tx_data *packet;
+
+	   if ((pjsip_inv_end_session(mEndpoint->getInviteSession(), 486, NULL, &packet)) == PJ_SUCCESS)
+	   {
+	      pjsip_inv_send_msg(mEndpoint->getInviteSession(), packet);
+	   }
 	}
 	void congestion(const Core::Endpoint::V1::EndpointIdPtr& ep, const Hydra::Session::V1::ResponseCodePtr& response, const Ice::Current&)
 	{
-		//stub
-		//Similar to ring, but send a 500
+	   pjsip_tx_data *packet;
+
+	   // This should map the response code to its respective SIP response code instead of always using 500
+	   if ((pjsip_inv_end_session(mEndpoint->getInviteSession(), 500, NULL, &packet)) == PJ_SUCCESS)
+	   {
+	      pjsip_inv_send_msg(mEndpoint->getInviteSession(), packet);
+	   }
 	}
 	void hold(const Core::Endpoint::V1::EndpointIdPtr& ep, const Ice::Current&)
 	{

commit a27688ee8b03b3cf9c4ee11cc3f5db785835eb4f
Author: Joshua Colp <jcolp at digium.com>
Date:   Tue Aug 24 15:17:56 2010 -0300

    pjmedia is a requirement since the SDP parsing/generation lives there now.

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0b2c3f4..c0d23fd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -30,10 +30,10 @@ hydra_component_add_ice_libraries(SipChannelService IceStorm)
 hydra_component_add_boost_libraries(SipChannelService thread core)
 hydra_component_build_standalone(SipChannelService)
 
+pjproject_link(SipChannelService pjsip)
+pjproject_link(SipChannelService pjmedia)
 pjproject_link(SipChannelService pjlib-util)
 pjproject_link(SipChannelService pjlib)
-pjproject_link(SipChannelService pjsip)
-
 
 hydra_component_install(SipChannelService RUNTIME bin "SIP Channel Service" SipChannelService)
 

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list