[OpenSIPS-Users] CANCEL and INVITE Routing issues

osiris123d duane.larson at gmail.com
Tue Oct 13 23:52:05 CEST 2009


I am noticing two issues that I think are due to myself using Multiple
Domains for users

1.  When a user calls someone via a SIP trunk and cancels the call the SIP
proxy never sends the CANCEL message to the SIP Trunk provider.  In my Main
Route I have the following code so I should be handling the CANCEL message
just fine.
        #CANCEL processing
        if (is_method("CANCEL")) {
                if (t_check_trans()) {
                        end_media_session();
                        t_relay();
                };
                exit;
        }

2.  When a user calls someone via a SIP trunk the invite is sent to the SIP
trunk provider but also to an IP address that resolves to the Caller's
domain.  I only want the SIP proxy to send the INVITE to the SIP Trunk
Provider since there is no SIP proxy at the @domain.com site.

For testing purposes the irock.com domain is used for one of the users (I
don't own irock.com I am just using that for testing).  When
9x12x32xx9 at irock.com calls 9x18x13182 the following is performed in the
config
t_relay("udp:pt1.vitelity.net:5060");
So the invite that gets sent out to my SIP Trunk provider is this 

U 6x.80.xxx.14:5060 -> 64.2.142.93:5060 
INVITE sip:9x18x13182 at irock.com SIP/2.0. 
Record-Route: <sip:6x.80.xxx.14;lr=on;ftag=2f27602c;nat=yes;did=535.18b17>. 
Via: SIP/2.0/UDP 6x.80.xxx.14;branch=z9hG4bK0de8.b68a49e7.0. 
Via: SIP/2.0/UDP
192.168.100.80:22894;received=192.251.125.xx;branch=z9hG4bK-d8754z-02edb391ba5fad01-1---d8754z-;rport=10076. 
Max-Forwards: 69. 
Contact: <sip:9x12x32009 at 192.251.125.xx:10076;transport=udp>. 
To: <sip:19x18x13182 at irock.com>. 
From: "Duane"<sip:9x12x32009 at irock.com>;tag=2f27602c. 
Call-ID: OTkwYTc4MjY0NTU0NjFhMGU2YjgxNDQ5N2JjYjg5YmE.. 
CSeq: 2 INVITE. 
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE,
INFO. 
Content-Type: application/sdp. 
User-Agent: Bria release 2.5.4 stamp 53956. 
Content-Length: 258. 
P-hint: route(3)|setflag7,forcerport,fix_contact. 
P-hint: inbound->outbound . 
P-hint: Route[6]: mediaproxy . 
. 
v=0. 
o=- 9 2 IN IP4 192.168.100.80. 
s=CounterPath Bria. 
c=IN IP4 6x.80.xxx.13. 
t=0 0. 
m=audio 10854 RTP/AVP 107 0 8 18 101. 
a=sendrecv. 
a=rtpmap:107 BV32/16000. 
a=rtpmap:18 G729/8000. 
a=fmtp:18 annexb=yes. 
a=rtpmap:101 telephone-event/8000. 
a=fmtp:101 0-15. 


I think the issue is the domain part in the INVITE part of that SIP message
(INVITE sip:9018313182 at irock.com SIP/2.0.) because when the softphone user
9x12x32xx9 at irock.com cancels the call I see the following SIP messages 


U 192.251.125.xx:10076 -> 6x.80.xxx.14:5060 
CANCEL sip:19x18x13182 at irock.com SIP/2.0. 
Via: SIP/2.0/UDP
192.168.100.80:22894;branch=z9hG4bK-d8754z-02edb391ba5fad01-1---d8754z-;rport. 
Max-Forwards: 70. 
To: <sip:19x18x13182 at irock.com>. 
From: "Duane"<sip:9x12x32009 at irock.com>;tag=2f27602c. 
Call-ID: OTkwYTc4MjY0NTU0NjFhMGU2YjgxNDQ5N2JjYjg5YmE.. 
CSeq: 2 CANCEL. 
Proxy-Authorization: Digest
username="9x12x32009",realm="irock.com",nonce="4acfa38a0000000243e104b0d51fed793230657dae910da5",uri="si 
p:19x18x13182 at irock.com",response="7364463734bed01be73dc4cd92742fc1",cnonce="2f2d71fe87bfdcd1325e1cb15210d1ef",nc=00000002,qop=auth, 
algorithm=MD5. 
User-Agent: Bria release 2.5.4 stamp 53956. 
Content-Length: 0. 
. 


U 6x.80.xxx.14:5060 -> 192.251.125.xx:10076 
SIP/2.0 200 canceling. 
Via: SIP/2.0/UDP
192.168.100.80:22894;branch=z9hG4bK-d8754z-02edb391ba5fad01-1---d8754z-;rport=10076;received=192.251.125.xx. 
To: <sip:19x18x13182 at irock.com>;tag=d733b86164332c9143cd163ddc2dfbf1-6635. 
From: "Duane"<sip:9x12x32009 at irock.com>;tag=2f27602c. 
Call-ID: OTkwYTc4MjY0NTU0NjFhMGU2YjgxNDQ5N2JjYjg5YmE.. 
CSeq: 2 CANCEL. 
Server: . 
Content-Length: 0. 
. 


U 6x.80.xxx.14:5060 -> 192.251.125.xx:10076 
SIP/2.0 487 Request Terminated. 
Via: SIP/2.0/UDP
192.168.100.80:22894;branch=z9hG4bK-d8754z-02edb391ba5fad01-1---d8754z-;rport=10076;received=192.251.125.xx. 
To: <sip:19x18x13182 at irock.com>;tag=d733b86164332c9143cd163ddc2dfbf1-6635. 
From: "Duane"<sip:9x12x32009 at irock.com>;tag=2f27602c. 
Call-ID: OTkwYTc4MjY0NTU0NjFhMGU2YjgxNDQ5N2JjYjg5YmE.. 
CSeq: 2 INVITE. 
Server: . 
Content-Length: 0. 
. 


U 192.251.125.xx:10076 -> 6x.80.xxx.14:5060 
ACK sip:19x18x13182 at irock.com SIP/2.0. 
Via: SIP/2.0/UDP
192.168.100.80:22894;branch=z9hG4bK-d8754z-02edb391ba5fad01-1---d8754z-;rport. 
Max-Forwards: 70. 
To: <sip:19x18x13182 at irock.com>;tag=d733b86164332c9143cd163ddc2dfbf1-6635. 
From: "Duane"<sip:9x12x32009 at irock.com>;tag=2f27602c. 
Call-ID: OTkwYTc4MjY0NTU0NjFhMGU2YjgxNDQ5N2JjYjg5YmE.. 
CSeq: 2 ACK. 
Content-Length: 0. 
. 


U 6x.80.xxx.14:5060 -> 192.251.125.xx:10076 
SIP/2.0 487 Request Terminated. 
Via: SIP/2.0/UDP
192.168.100.80:22894;branch=z9hG4bK-d8754z-02edb391ba5fad01-1---d8754z-;rport=10076;received=192.251.125.xx. 
To: <sip:19x18x13182 at irock.com>;tag=d733b86164332c9143cd163ddc2dfbf1-6635. 
From: "Duane"<sip:9x12x32009 at irock.com>;tag=2f27602c. 
Call-ID: OTkwYTc4MjY0NTU0NjFhMGU2YjgxNDQ5N2JjYjg5YmE.. 
CSeq: 2 INVITE. 
Server: . 
Content-Length: 0. 


So my SIP Proxy is never telling the SIP Trunk provider that a CANCEL was
issued.  The domain part of the INVITE has to be the issue because if I add
the following command 
rewritehostport("pt1.vitelity.net:5060"); 
It fixes the CANCEL issue but breaks the BYE SIP message from the PSTN user 
And if I change the rewritehostport to the following 
rewritehostport("IP Address of my Proxy:5060"); 
it fixes the CANCEL issue but breaks the BYE SIP message from the Softphone
user. 


The other problem I am seeing because of the domain issue is that when
9x12x32xx9 at irock.com calls someone an INVITE is not only sent to my SIP
Trunk provider but also to 97.74.144.17:5060 which is the IP address that
irock.com resolves too.

-- 
View this message in context: http://n2.nabble.com/CANCEL-and-INVITE-Routing-issues-tp3819215p3819215.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list