Alexey Trizno wrote:
> Hello!
> 
> I have new problem. When my softphone trying call other party with wrong 
> address, I receive:
> CALLSTATE_DISCONNECTED::CALLSTATE_CAUSE_UNKNOWN
> 
> but real SIP response:
> 
> ----Remote Host:192.168.1.7---- Port: 5060----
> SIP/2.0 484 Address Incomplete
> Via: SIP/2.0/UDP 
> 192.168.0.158;branch=z9hG4bK-fa4591ad45c1;received=192.168.0.158
> From: <sip:[EMAIL PROTECTED]>;tag=1c30123
> To: sip:[EMAIL PROTECTED];tag=as726d6fd3
> Call-ID: s_2402_cab70f156c8c
> CSeq: 8216 INVITE
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Content-Length: 0
> ====================END====================
> 
> Can I receive some event, for "Address Incomplete"?
> CALLSTATE_CAUSE_UNKNOWN is very common event... 
> 
> --
> Best regards, 
> Alexey [ [EMAIL PROTECTED] ]
> 
> _______________________________________________
> sipxtapi-dev mailing list
> [email protected]
> List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/
> 

Try this patch.

Jaroslav Libak

Index: cp/SipConnection.cpp
===================================================================
--- cp/SipConnection.cpp        (revision 9198)
+++ cp/SipConnection.cpp        (working copy)
@@ -4720,6 +4720,11 @@
             setState(CONNECTION_FAILED, CONNECTION_REMOTE, cause);
             fireSipXEvent(CALLSTATE_DISCONNECTED, CALLSTATE_CAUSE_NO_RESPONSE);
         }
+        else if (responseCode == SIP_BAD_ADDRESS_CODE)
+        {
+           setState(CONNECTION_FAILED, CONNECTION_REMOTE, cause);
+           fireSipXEvent(CALLSTATE_DISCONNECTED, CALLSTATE_CAUSE_BAD_ADDRESS);
+        }
         else
         {
             setState(CONNECTION_FAILED, CONNECTION_REMOTE, cause);
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to