Discussion:
[Freeswitch-users] Could this be a bug in the SIP registry?
Mitchel Constantin
2009-07-01 04:11:36 UTC
Permalink
Hello,
I'm experiencing a bug that I've been working on most of today. I can not
call between two SIP phones that register successfully. In order to diagnose
it, I have removed my FreeSWITCH server out of the NAT/firewall to try and
eliminate any such issues with these things.

Here is how I ran into the issue:

1. Started from sample configs
2. Enabled xml_curl and wrote the associated script to generate XML and had
the phones authenticating but was forced to use the IP address of the server
as the domain in my directory XML.
3. I tested calls and they worked using this syntax: originate
sofia/internal/mythicalbox%205.134.225.20 (the server's ip)
sofia/internal/johndoe%205.134.225.20
4. Next to remove the "limit" on using only the IP as the domain for users,
I commented out force-register-domain and force-register-db-domain in
internal.xml.
5. My phones now register using the correct domain name (i.e. weavver.com)
instead of the IP address (205.134.225.20) as the domain.
6. Now the problem... My originate command no longer works using the new
syntax: originate sofia/internal/mythicalbox%weavver.comsofia/internal/johndoe%
weavver.com

The phones do show up as registered when I type "sofia status profile
internal":

API CALL [sofia(status profile internal)] output:
=================================================================================================
Name internal
Domain Name N/A
DBName sofia_reg_internal
Pres Hosts
Dialplan XML
Context public
Challenge Realm auto_from
RTP-IP 205.134.225.20
SIP-IP 205.134.225.20
URL sip:mod_sofia at 205.134.225.20:5060
BIND-URL sip:mod_sofia at 205.134.225.20:5060
HOLD-MUSIC local_stream://moh
OUTBOUND-PROXY N/A
CODECS G7221 at 32000h,G7221 at 16000h,G722,PCMU,PCMA,GSM
TEL-EVENT 101
DTMF-MODE rfc2833
CNG 13
SESSION-TO 0
MAX-DIALOG 0
NOMEDIA false
LATE-NEG false
PROXY-MEDIA false
AGGRESSIVENAT true
STUN-ENABLED true
STUN-AUTO-DISABLE false
CALLS-IN 9
FAILED-CALLS-IN 3
CALLS-OUT 8
FAILED-CALLS-OUT 18

Registrations:
=================================================================================================
Call-ID: ZWQ3NjRhZWI3MDc4ZDhjNTdhZDU2ZGVkM2JmYjg3NTc.
User: mythicalbox at weavver.com
Contact: "mythicalbox" <sip:mythicalbox at 64.183.110.250:65438
;rinstance=e632b810dbf91486;transport=TCP;fs_nat=yes;fs_path=sip%3Amythicalbox%4064.183.110.250%3A65438%3Brinstance%3De632b810dbf91486%3Btransport%3DTCP>
Agent: eyeBeam release 1102u stamp 52344
Status: Registered(TCP-NAT)(unknown) EXP(2009-06-30 22:43:47)
Host: duck.weavver.com
IP: 64.183.110.250
Port: 65438
Auth-User: mythicalbox
Auth-Realm: weavver.com

Call-ID: Y2E0NWZiZWZjOTYxYjVhNmQ5ZDkyMzJjMzUxYWM0ZGM.
User: johndoe at weavver.com
Contact: "johndoe" <sip:johndoe at 64.183.110.250:65512
;rinstance=ce0823faf2aba98a;transport=TCP;fs_nat=yes;fs_path=sip%3Ajohndoe%4064.183.110.250%3A65512%3Brinstance%3Dce0823faf2aba98a%3Btransport%3DTCP>
Agent: eyeBeam release 1102u stamp 52344
Status: Registered(TCP-NAT)(unknown) EXP(2009-06-30 22:47:37)
Host: duck.weavver.com
IP: 64.183.110.250
Port: 65512
Auth-User: johndoe
Auth-Realm: weavver.com

=================================================================================================

FYI, FreeSWITCH is on a public IP address on the 'nets and the phones are
behind the same firewall on a different public IP address on the internet.

Thank you in advance for any help! :)
--
Mitchel Constantin
Weavver, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090630/43fe93c4/attachment.html
Mitchel Constantin
2009-07-01 04:11:36 UTC
Permalink
Hello,
I'm experiencing a bug that I've been working on most of today. I can not
call between two SIP phones that register successfully. In order to diagnose
it, I have removed my FreeSWITCH server out of the NAT/firewall to try and
eliminate any such issues with these things.

Here is how I ran into the issue:

1. Started from sample configs
2. Enabled xml_curl and wrote the associated script to generate XML and had
the phones authenticating but was forced to use the IP address of the server
as the domain in my directory XML.
3. I tested calls and they worked using this syntax: originate
sofia/internal/mythicalbox%205.134.225.20 (the server's ip)
sofia/internal/johndoe%205.134.225.20
4. Next to remove the "limit" on using only the IP as the domain for users,
I commented out force-register-domain and force-register-db-domain in
internal.xml.
5. My phones now register using the correct domain name (i.e. weavver.com)
instead of the IP address (205.134.225.20) as the domain.
6. Now the problem... My originate command no longer works using the new
syntax: originate sofia/internal/mythicalbox%weavver.comsofia/internal/johndoe%
weavver.com

The phones do show up as registered when I type "sofia status profile
internal":

API CALL [sofia(status profile internal)] output:
=================================================================================================
Name internal
Domain Name N/A
DBName sofia_reg_internal
Pres Hosts
Dialplan XML
Context public
Challenge Realm auto_from
RTP-IP 205.134.225.20
SIP-IP 205.134.225.20
URL sip:mod_sofia at 205.134.225.20:5060
BIND-URL sip:mod_sofia at 205.134.225.20:5060
HOLD-MUSIC local_stream://moh
OUTBOUND-PROXY N/A
CODECS G7221 at 32000h,G7221 at 16000h,G722,PCMU,PCMA,GSM
TEL-EVENT 101
DTMF-MODE rfc2833
CNG 13
SESSION-TO 0
MAX-DIALOG 0
NOMEDIA false
LATE-NEG false
PROXY-MEDIA false
AGGRESSIVENAT true
STUN-ENABLED true
STUN-AUTO-DISABLE false
CALLS-IN 9
FAILED-CALLS-IN 3
CALLS-OUT 8
FAILED-CALLS-OUT 18

Registrations:
=================================================================================================
Call-ID: ZWQ3NjRhZWI3MDc4ZDhjNTdhZDU2ZGVkM2JmYjg3NTc.
User: mythicalbox at weavver.com
Contact: "mythicalbox" <sip:mythicalbox at 64.183.110.250:65438
;rinstance=e632b810dbf91486;transport=TCP;fs_nat=yes;fs_path=sip%3Amythicalbox%4064.183.110.250%3A65438%3Brinstance%3De632b810dbf91486%3Btransport%3DTCP>
Agent: eyeBeam release 1102u stamp 52344
Status: Registered(TCP-NAT)(unknown) EXP(2009-06-30 22:43:47)
Host: duck.weavver.com
IP: 64.183.110.250
Port: 65438
Auth-User: mythicalbox
Auth-Realm: weavver.com

Call-ID: Y2E0NWZiZWZjOTYxYjVhNmQ5ZDkyMzJjMzUxYWM0ZGM.
User: johndoe at weavver.com
Contact: "johndoe" <sip:johndoe at 64.183.110.250:65512
;rinstance=ce0823faf2aba98a;transport=TCP;fs_nat=yes;fs_path=sip%3Ajohndoe%4064.183.110.250%3A65512%3Brinstance%3Dce0823faf2aba98a%3Btransport%3DTCP>
Agent: eyeBeam release 1102u stamp 52344
Status: Registered(TCP-NAT)(unknown) EXP(2009-06-30 22:47:37)
Host: duck.weavver.com
IP: 64.183.110.250
Port: 65512
Auth-User: johndoe
Auth-Realm: weavver.com

=================================================================================================

FYI, FreeSWITCH is on a public IP address on the 'nets and the phones are
behind the same firewall on a different public IP address on the internet.

Thank you in advance for any help! :)
--
Mitchel Constantin
Weavver, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090630/43fe93c4/attachment-0002.html
Jason White
2009-07-01 08:23:32 UTC
Permalink
Post by Mitchel Constantin
5. My phones now register using the correct domain name (i.e. weavver.com)
instead of the IP address (205.134.225.20) as the domain.
6. Now the problem... My originate command no longer works using the new
syntax: originate sofia/internal/mythicalbox%weavver.comsofia/internal/johndoe%
weavver.com
The phones do show up as registered when I type "sofia status profile
What happens if you use the following syntax?

originate user/phone at domain extension

e.g.
originate user/1000 at example.com 3000
to connext user at example.com to extension 3000.

My other advice would be to read the FreeSWITCH log files carefully. Also, use
the sofia_contact command to find out how the registered users will be called
when the syntax mentioned above is used. Make sure that everything will go
where you want it.
Jason White
2009-07-01 08:45:47 UTC
Permalink
Post by Jason White
originate user/1000 at example.com 3000
to connext user at example.com to extension 3000.
That should read "to connect 1000 at example.com to extension 3000".
mitcheloc
2009-07-01 17:04:03 UTC
Permalink
Jason,

Thanks for the reply. I tried the commands as suggested:

freeswitch at internal> originate user/mythicalbox at weavver.com 3000
-ERR SUBSCRIBER_ABSENT

2009-07-01 09:43:16 [ERR] switch_xml.c:1555 switch_xml_locate() Error[[error
near line 1]: root tag missing]
freeswitch at internal> 2009-07-01 09:43:16 [WARNING] mod_dptools.c:2364
user_outgoing_channel() Can't find user [mythicalbox at weavver.com]
2009-07-01 09:43:16 [ERR] switch_ivr_originate.c:1494 switch_ivr_originate()
Cannot create outgoing channel of type [user] cause: [SUBSCRIBER_ABSENT]
2009-07-01 09:43:16 [DEBUG] switch_ivr_originate.c:2101
switch_ivr_originate() Originate Resulted in Error Cause: 20
[SUBSCRIBER_ABSENT]

Trying the sofia_contact function:

freeswitch at internal> expand echo ${sofia_contact(profile/
mythicalbox at weavver.com)}
error/facility_not_subscribed

Here is some output to show that parts of FreeSWITCH do think that the phone
is registered:

freeswitch at internal> sofia status profile internal
=================================================================================================
Name internal
Domain Name N/A
DBName sofia_reg_internal
Pres Hosts
Dialplan XML
Context public
Challenge Realm auto_from
RTP-IP 205.134.225.20
SIP-IP 205.134.225.20
URL sip:mod_sofia at 205.134.225.20:5060
BIND-URL sip:mod_sofia at 205.134.225.20:5060
HOLD-MUSIC local_stream://moh
OUTBOUND-PROXY N/A
CODECS G7221 at 32000h,G7221 at 16000h,G722,PCMU,PCMA,GSM
TEL-EVENT 101
DTMF-MODE rfc2833
CNG 13
SESSION-TO 0
MAX-DIALOG 0
NOMEDIA false
LATE-NEG false
PROXY-MEDIA false
AGGRESSIVENAT true
STUN-ENABLED true
STUN-AUTO-DISABLE false
CALLS-IN 9
FAILED-CALLS-IN 3
CALLS-OUT 8
FAILED-CALLS-OUT 18

Registrations:
=================================================================================================

Call-ID: ZDg4NDU3MjI2ODVlZmZiNGYzZDYzNmRkOTYxMmNhMDY.
User: mythicalbox at weavver.com
Contact: "mythicalbox" <sip:mythicalbox at 64.183.110.250:8443
;rinstance=1185dccb166fae31;transport=TCP;fs_nat=yes;fs_path=sip%3Amythicalbox%4064.183.110.250%3A8443%3Brinstance%3D1185dccb166fae31%3Btransport%3DTCP>
Agent: eyeBeam release 1102u stamp 52344
Status: Registered(TCP-NAT)(unknown) EXP(2009-07-01 11:33:18)
Host: duck.weavver.com
IP: 64.183.110.250
Port: 8443
Auth-User: mythicalbox
Auth-Realm: weavver.com

=================================================================================================


FreeSWITCH and my Softphone (eyeBeam) shows me as registered when polling
for registrations but when trying to connect the call FreeSWITCH is not
seeing it as registered.

Any more ideas?


Thanks again!
Post by Jason White
Post by Jason White
originate user/1000 at example.com 3000
to connext user at example.com to extension 3000.
That should read "to connect 1000 at example.com to extension 3000".
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Mitchel Constantin
Weavver, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090701/540613b6/attachment.html
Michael Collins
2009-07-01 17:10:46 UTC
Permalink
Post by mitcheloc
Jason,
freeswitch at internal> originate user/mythicalbox at weavver.com 3000
-ERR SUBSCRIBER_ABSENT
2009-07-01 09:43:16 [ERR] switch_xml.c:1555 switch_xml_locate()
Error[[error near line 1]: root tag missing]
Can you confirm the XML that is getting read?
-MC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090701/1c8eae8e/attachment.html
Brian West
2009-07-01 17:14:17 UTC
Permalink
What does 'sofia status' say?

expand echo ${sofia_contact(internal/mythicalbox at weavver.com)} <--
notice I put the profile name instead of the word "profile"

/b
Post by mitcheloc
Jason,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090701/afea5400/attachment-0001.html
mitcheloc
2009-07-01 18:07:54 UTC
Permalink
Brian,
Oh yay! Good catch.. it gave me output this time, and I could make a call
using it:

sofia/internal/sip:mythicalbox at 64.183.110.250:9136
;rinstance=24c9b78f5fc6c759;transport=TCP;fs_nat=yes;fs_path=sip%3Amythicalbox%4064.183.110.250%3A9136%3Brinstance%3D24c9b78f5fc6c759%3Btransport%3DTCP

That is definitely not what I'd been trying!

Here is sofia status in case you still want it:

freeswitch at internal> sofia status
Name Type Data
State
=================================================================================================
internal profile
sip:mod_sofia at 205.134.225.20:5060 RUNNING (0)
external profile
sip:mod_sofia at 205.134.225.20:5080 RUNNING (0)
example.com gateway
sip:joeuser at example.com<sip%3Ajoeuser at example.com> NOREG
internal-ipv6 profile sip:mod_sofia@[::1]:5060
RUNNING (0)
default alias internal
ALIASED
nat alias external
ALIASED
outbound alias external
ALIASED
205.134.225.20 alias external
ALIASED
=================================================================================================
3 profiles 4 aliases


Thank you!!
Post by Brian West
What does 'sofia status' say?
expand echo ${sofia_contact(internal/mythicalbox at weavver.com)} <-- notice
I put the profile name instead of the word "profile"
/b
Jason,
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Mitchel Constantin
Weavver, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090701/a715a368/attachment.html
mitcheloc
2009-07-01 18:07:54 UTC
Permalink
Brian,
Oh yay! Good catch.. it gave me output this time, and I could make a call
using it:

sofia/internal/sip:mythicalbox at 64.183.110.250:9136
;rinstance=24c9b78f5fc6c759;transport=TCP;fs_nat=yes;fs_path=sip%3Amythicalbox%4064.183.110.250%3A9136%3Brinstance%3D24c9b78f5fc6c759%3Btransport%3DTCP

That is definitely not what I'd been trying!

Here is sofia status in case you still want it:

freeswitch at internal> sofia status
Name Type Data
State
=================================================================================================
internal profile
sip:mod_sofia at 205.134.225.20:5060 RUNNING (0)
external profile
sip:mod_sofia at 205.134.225.20:5080 RUNNING (0)
example.com gateway
sip:joeuser at example.com<sip%3Ajoeuser at example.com> NOREG
internal-ipv6 profile sip:mod_sofia@[::1]:5060
RUNNING (0)
default alias internal
ALIASED
nat alias external
ALIASED
outbound alias external
ALIASED
205.134.225.20 alias external
ALIASED
=================================================================================================
3 profiles 4 aliases


Thank you!!
Post by Brian West
What does 'sofia status' say?
expand echo ${sofia_contact(internal/mythicalbox at weavver.com)} <-- notice
I put the profile name instead of the word "profile"
/b
Jason,
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Mitchel Constantin
Weavver, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090701/a715a368/attachment-0002.html
Michael Collins
2009-07-01 17:10:46 UTC
Permalink
Post by mitcheloc
Jason,
freeswitch at internal> originate user/mythicalbox at weavver.com 3000
-ERR SUBSCRIBER_ABSENT
2009-07-01 09:43:16 [ERR] switch_xml.c:1555 switch_xml_locate()
Error[[error near line 1]: root tag missing]
Can you confirm the XML that is getting read?
-MC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090701/1c8eae8e/attachment-0002.html
Brian West
2009-07-01 17:14:17 UTC
Permalink
What does 'sofia status' say?

expand echo ${sofia_contact(internal/mythicalbox at weavver.com)} <--
notice I put the profile name instead of the word "profile"

/b
Post by mitcheloc
Jason,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090701/afea5400/attachment-0002.html
mitcheloc
2009-07-01 17:04:03 UTC
Permalink
Jason,

Thanks for the reply. I tried the commands as suggested:

freeswitch at internal> originate user/mythicalbox at weavver.com 3000
-ERR SUBSCRIBER_ABSENT

2009-07-01 09:43:16 [ERR] switch_xml.c:1555 switch_xml_locate() Error[[error
near line 1]: root tag missing]
freeswitch at internal> 2009-07-01 09:43:16 [WARNING] mod_dptools.c:2364
user_outgoing_channel() Can't find user [mythicalbox at weavver.com]
2009-07-01 09:43:16 [ERR] switch_ivr_originate.c:1494 switch_ivr_originate()
Cannot create outgoing channel of type [user] cause: [SUBSCRIBER_ABSENT]
2009-07-01 09:43:16 [DEBUG] switch_ivr_originate.c:2101
switch_ivr_originate() Originate Resulted in Error Cause: 20
[SUBSCRIBER_ABSENT]

Trying the sofia_contact function:

freeswitch at internal> expand echo ${sofia_contact(profile/
mythicalbox at weavver.com)}
error/facility_not_subscribed

Here is some output to show that parts of FreeSWITCH do think that the phone
is registered:

freeswitch at internal> sofia status profile internal
=================================================================================================
Name internal
Domain Name N/A
DBName sofia_reg_internal
Pres Hosts
Dialplan XML
Context public
Challenge Realm auto_from
RTP-IP 205.134.225.20
SIP-IP 205.134.225.20
URL sip:mod_sofia at 205.134.225.20:5060
BIND-URL sip:mod_sofia at 205.134.225.20:5060
HOLD-MUSIC local_stream://moh
OUTBOUND-PROXY N/A
CODECS G7221 at 32000h,G7221 at 16000h,G722,PCMU,PCMA,GSM
TEL-EVENT 101
DTMF-MODE rfc2833
CNG 13
SESSION-TO 0
MAX-DIALOG 0
NOMEDIA false
LATE-NEG false
PROXY-MEDIA false
AGGRESSIVENAT true
STUN-ENABLED true
STUN-AUTO-DISABLE false
CALLS-IN 9
FAILED-CALLS-IN 3
CALLS-OUT 8
FAILED-CALLS-OUT 18

Registrations:
=================================================================================================

Call-ID: ZDg4NDU3MjI2ODVlZmZiNGYzZDYzNmRkOTYxMmNhMDY.
User: mythicalbox at weavver.com
Contact: "mythicalbox" <sip:mythicalbox at 64.183.110.250:8443
;rinstance=1185dccb166fae31;transport=TCP;fs_nat=yes;fs_path=sip%3Amythicalbox%4064.183.110.250%3A8443%3Brinstance%3D1185dccb166fae31%3Btransport%3DTCP>
Agent: eyeBeam release 1102u stamp 52344
Status: Registered(TCP-NAT)(unknown) EXP(2009-07-01 11:33:18)
Host: duck.weavver.com
IP: 64.183.110.250
Port: 8443
Auth-User: mythicalbox
Auth-Realm: weavver.com

=================================================================================================


FreeSWITCH and my Softphone (eyeBeam) shows me as registered when polling
for registrations but when trying to connect the call FreeSWITCH is not
seeing it as registered.

Any more ideas?


Thanks again!
Post by Jason White
Post by Jason White
originate user/1000 at example.com 3000
to connext user at example.com to extension 3000.
That should read "to connect 1000 at example.com to extension 3000".
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Mitchel Constantin
Weavver, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090701/540613b6/attachment-0002.html
Jason White
2009-07-01 08:45:47 UTC
Permalink
Post by Jason White
originate user/1000 at example.com 3000
to connext user at example.com to extension 3000.
That should read "to connect 1000 at example.com to extension 3000".
Jason White
2009-07-01 08:23:32 UTC
Permalink
Post by Mitchel Constantin
5. My phones now register using the correct domain name (i.e. weavver.com)
instead of the IP address (205.134.225.20) as the domain.
6. Now the problem... My originate command no longer works using the new
syntax: originate sofia/internal/mythicalbox%weavver.comsofia/internal/johndoe%
weavver.com
The phones do show up as registered when I type "sofia status profile
What happens if you use the following syntax?

originate user/phone at domain extension

e.g.
originate user/1000 at example.com 3000
to connext user at example.com to extension 3000.

My other advice would be to read the FreeSWITCH log files carefully. Also, use
the sofia_contact command to find out how the registered users will be called
when the syntax mentioned above is used. Make sure that everything will go
where you want it.
Continue reading on narkive:
Loading...