Author Topic: Can't make a call connected  (Read 10599 times)

kbasbilen

  • Newbie
  • *
  • Posts: 3
    • View Profile
Can't make a call connected
« on: March 06, 2013, 06:59:07 AM »
Hi,

I a new Yate user.
I installed Yate SIP server (on windows) and made some configurations according to the documentation.
I am trying to make a SIP call from a Yate client to another Yate client.
One client and server are on the same machine (192.168.6.37). The other client is on another machine (192.168.6.225).
I also installed a postgresql server and jabberserver database (I will also use xmpp messaging)

Actually I am not sure that I need a call routing, because I want to make a direct call. But I tried to do what I saw in the examples.
Using register.conf I am writing $data to user table on database with a similar sql in default conf.
During call.route I am reading the location from database with a similar sql in default conf.
The targets adressed is read as sip:mydomainuser105@192.168.6.225:62465 (which is connected to servers 5060 port)
But I got an invalid address error with code=500

The output log of the SIP server is below.
What is wrong and what do I have to do to make a direct SIP call from a client to another client.

------
<sip:INFO> 'tcp:192.168.6.37:5060-192.168.6.37:2853' received 941 bytes SIP message [013BB2B0]
------
INVITE sip:mydomainuser105@mydomain.com SIP/2.0
Max-Forwards: 20
Via: SIP/2.0/TCP 192.168.6.37:2853;alias;rport;branch=z9hG4bK1451336399
From: <sip:mydomainuser110@mydomain.com>;tag=519794192
To: <sip:mydomainuser105@mydomain.com>
Call-ID: 942795349@mydomain.com
CSeq: 3 INVITE
User-Agent: YATE/4.3.0
Contact: <sip:mydomainuser110@192.168.6.37:2853>
Allow: ACK, INVITE, BYE, CANCEL, OPTIONS, INFO
Content-Type: application/sdp
Content-Length: 504

v=0
o=yate 1362572042 1362572042 IN IP4 192.168.6.37
s=SIP Call
c=IN IP4 192.168.6.37
t=0 0
m=audio 22124 RTP/AVP 0 8 3 11 98 97 102 103 104 105 106 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:11 L16/8000
a=rtpmap:98 iLBC/8000
a=fmtp:98 mode=20
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:102 SPEEX/8000
a=rtpmap:103 SPEEX/16000
a=rtpmap:104 SPEEX/32000
a=rtpmap:105 iSAC/16000
a=rtpmap:106 iSAC/32000
a=rtpmap:101 telephone-event/8000
a=ptime:30
------
<sip/1:ALL> YateSIPConnection::YateSIPConnection(013FB6A8,013FD7D0) [013ACFE0]
<sip/1:ALL> NAT address is '(null)' [013ACFE0]
<register:INFO> On account 'jabberserver' performing query 'SELECT password FROM users WHERE username='' OR username='@mydomain.com'' expects results
<pgsqldb:ALL> Performing query "SELECT password FROM users WHERE username='' OR username='@mydomain.com'" for 'jabberserver'
<pgsqldb:ALL> Query for 'jabberserver.1' returned 0 rows, 0 affected [013BE400]
<INFO> Classifying caller 'mydomainuser110' in context 'mydomain' in 0 usec
<sip:INFO> 'tcp:192.168.6.37:5060-192.168.6.37:2853' sending code 100 013FC880 [013BB2B0]
------
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 192.168.6.37:2853;alias;rport=2853;branch=z9hG4bK1451336399;received=192.168.6.37
From: <sip:mydomainuser110@mydomain.com>;tag=519794192
To: <sip:mydomainuser105@mydomain.com>
Call-ID: 942795349@mydomain.com
CSeq: 3 INVITE
Server: YATE/4.3.0
Content-Length: 0

------
<INFO> Could not route call to 'mydomainuser105' in context 'mydomain', wasted 0 usec
<register:INFO> On account 'jabberserver' performing query 'SELECT location,(CASE WHEN location IS NULL THEN 'offline' ELSE NULL END) AS error FROM users WHERE
username='mydomainuser105' OR username='mydomainuser105@mydomain.com'' expects results
<pgsqldb:ALL> Performing query "SELECT location,(CASE WHEN location IS NULL THEN 'offline' ELSE NULL END) AS error FROM users WHERE username='mydomainuser105' OR u
sername='mydomainuser105@mydomain.com'" for 'jabberserver'
<pgsqldb:ALL> Query for 'jabberserver.1' returned 1 rows, 0 affected [013BE400]
<sip/1:ALL> NAT address is '(null)' [013ACFE0]
<sip/2:ALL> YateSIPConnection::YateSIPConnection(013F7DA8,'sip:mydomainuser105@192.168.6.225:62465') [013AC8A8]
<sip/2:WARN> Could not create party for 'sip:mydomainuser105@192.168.6.225:62465' [013AC8A8]
<sip/2:ALL> YateSIPConnection::hangup() state=1 trans=00000000 error='failure' code=500 reason='Invalid address: sip:mydomainuser105@192.168.6.225:62465' [013AC8A8
]
<sip/2:ALL> YateSIPConnection::~YateSIPConnection() [013AC8A8]
<cdrbuild:INFO> Got message 'chan.hangup' for untracked id 'sip/2'
<sip/1:MILD> Call rejected error='noconn' reason='Invalid address: sip:mydomainuser105@192.168.6.225:62465' [013ACFE0]
<sip/1:ALL> YateSIPConnection::hangup() state=0 trans=013FD7D0 error='noconn' code=503 reason='Invalid address: sip:mydomainuser105@192.168.6.225:62465' [013ACFE0]

<sip/1:ALL> YateSIPConnection::~YateSIPConnection() [013ACFE0]
<sip:INFO> 'tcp:192.168.6.37:5060-192.168.6.37:2853' sending code 503 013F5810 [013BB2B0]
------
SIP/2.0 503 Invalid address: sip:mydomainuser105@192.168.6.225:62465
Via: SIP/2.0/TCP 192.168.6.37:2853;alias;rport=2853;branch=z9hG4bK1451336399;received=192.168.6.37
From: <sip:mydomainuser110@mydomain.com>;tag=519794192
To: <sip:mydomainuser105@mydomain.com>
Call-ID: 942795349@mydomain.com
CSeq: 3 INVITE
Server: YATE/4.3.0
Contact: <sip:mydomainuser105@192.168.6.37:5060>
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO
Content-Length: 0

------
<sip:INFO> 'tcp:192.168.6.37:5060-192.168.6.37:2853' received 350 bytes SIP message [013BB2B0]
------
ACK sip:mydomainuser105@mydomain.com SIP/2.0
Via: SIP/2.0/TCP 192.168.6.37:2853;alias;rport;branch=z9hG4bK1451336399
From: <sip:mydomainuser110@mydomain.com>;tag=519794192
To: <sip:mydomainuser105@mydomain.com>
Call-ID: 942795349@mydomain.com
CSeq: 3 ACK
Max-Forwards: 20
Contact: <sip:mydomainuser110@192.168.6.37:2853>
User-Agent: YATE/4.3.0
Content-Length: 0

------

Diana Cionoiu

  • Administrator
  • Jr. Member
  • *****
  • Posts: 71
    • View Profile
Re: Can't make a call connected
« Reply #1 on: March 06, 2013, 02:14:52 PM »
SELECT location,(CASE WHEN location IS NULL THEN 'offline' ELSE NULL END) AS error FROM users WHERE
username='mydomainuser105' OR username='mydomainuser105@mydomain.com

can you please give us the result of this query?

Diana

kbasbilen

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Can't make a call connected
« Reply #2 on: March 08, 2013, 01:20:38 AM »

The result oft of the query is "sip\sip:mydomainuser105@192.168.6.225:62465".
I think the SIP server removes the first "sip\". You can see in the log it says:

<sip/2:WARN> Could not create party for 'sip:mydomainuser105@192.168.6.225:62465' [013AC8A8]
<sip/2:ALL> YateSIPConnection::hangup() state=1 trans=00000000 error='failure' code=500 reason='Invalid address: sip:mydomainuser105@192.168.6.225:62465' [013AC8A8
]

vankooch

  • Administrator
  • Newbie
  • *****
  • Posts: 49
    • View Profile
Re: Can't make a call connected
« Reply #3 on: March 11, 2013, 06:26:42 AM »
The return value is wrong....

Code: [Select]
"sip\sip:mydomainuser105@192.168.6.225:62465" -> wrong
"sip/sip:mydomainuser105@192.168.6.225:62465" -> correct

As you can see in your log it is / and not \ after the channel type.

Code: [Select]
<sip/2:WARN> Could not create party for 'sip:mydomainuser105@192.168.6.225:62465' [013AC8A8]

kbasbilen

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Can't make a call connected
« Reply #4 on: March 12, 2013, 01:55:53 AM »
It's my mistake. It's certainly  "sip/sip:mydomainuser105@192.168.6.225:62465".
There is no problem with the location string.

So, what is the problem in that application.

Anyone to help me for getting rid of that problem?

Thanks.
« Last Edit: March 12, 2013, 01:58:45 AM by kbasbilen »

marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: Can't make a call connected
« Reply #5 on: April 09, 2013, 01:34:04 AM »
Hi,

If you user is registered using tcp you must save the connection id also when registered and return it when routing (you must add the field to the database also):
register.conf:

[user.register]
query=UPDATE users SET location='${data},expires=CURRENT_TIMESTAMP + INTERVAL '${expires} s',oconnection_id=${oconnection_id} WHERE username='${username}'

[call.route]
query=SELECT location,oconnection_id,(CASE WHEN location IS NULL THEN 'offline' ELSE NULL END) AS error FROM users WHERE username='${called}' OR username='${called}@mydomain.com'

If you have other setup please attach a sniffer log for call.route/call.execute messages and the ysipchan.conf and register.conf files.