Hangup problem/SIP BYE lacking authentication
Hangups do not work for me under certain circumstances. Here is the background information: * Our carrier uses a Metaswitch server with Acme Packet in front as a proxy/SBC. Only the Acme Packet machine is publicly visible (64.115.128.6). * Our Freeswitch server is at 216.57.23.143. * For calls originating from Freeswitch and terminating on Metaswitch (216.57.23.143 -> 64.115.128.6), Freeswitch authenticates with Metaswitch and everything works hunky-dorey. Either side can hang up and the other side will automatically hang up without requiring a manual hang-up. Now the problem: For calls originating from Metaswitch to Freeswitch (64.115.128.6 -> 216.57.23.143), Metaswitch does not authenticate with Freeswitch. Metaswitch also does not use the existing authenticated registration that our Freeswitch server initiates with Metaswitch upon startup of Freeswitch. Metaswitch just begins a new (unauthenticated) session and we have configured Freeswitch to allow any inbound calls from 64.115.128.6 without requiring authentication. We receive inbound calls (Metaswitch to Freeswitch, 64.115.128.6 -> 216.57.23.143) just fine. The phone rings and we can have a normal conversation. If the caller (the endpoint attached to Metaswitch) hangs up, both sides hang up. If I hang up (remember, I'm at the endpoint attached to Freeswitch), the caller's line remains attached forever. I have recorded a packet trace. Look at freeswitch_2.cap in the ZIP file, and you want to graph the first call starting at 21.202 and ending 53.798. If you go to time 53.087, you can see that my Freeswitch server sends a BYE to Metaswitch. This is a result of me hanging up my phone. At time 53.089, you see Metaswitch responding with 401 Unauthorized. Later at time 53.777, you see a BYE from Metaswitch to Freeswitch, but you should ignore this because that was a result of the caller (the guy hooked up to Metaswitch) manually hanging up. If he had not hung up his phone, the BYE from Metaswitch to Freeswitch would not have been issued and his phone would just stay on the line forever. Also, when I hang up my phone, I see the following at the Freeswitch console: 2008-10-29 23:03:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found I presume that Freeswitch emits this error because it got the 401 Unauthorized from Metaswitch. I also asked our carrier for a packet trace of a successful hangup on the Aastra platform (the engineer at the carrier says it is an Asterisk derivative -- I'm not sure about that). Look at Aastra_authentication_test.cap in the ZIP file. Graph the first call starting at 43.633 and ending 93.156. If you go to 93.118, you'll see that the Aastra server sends a BYE. Just like our Freeswitch scenario, Metaswitch sends back a 401 Unauthorized, but in response to the 401 Unauthorized, Aastra then sends back another BYE with the difference that the second BYE is authenticated. Metaswitch gets the second BYE and responds with 200 OK. I am pretty sure that if Freeswitch were to send back a second BYE (but with authentication), it would work fine. Now my question is how can I do this? I am not sure if this divergence of behavior is caused by: (a) my own error in configuring Freeswitch, (b) Metaswitch lacking standard SIP support (maybe it's not supposed to send the 401 Unauthorized), or (c) Freeswitch lacking standard SIP support (maybe it's supposed to send back a second BYE with authentication automatically). I don't know the SIP standards (or Freeswitch) well enough to know whether this problem is caused by me or by a deficiency in one of the two products (Metaswitch or Freeswitch). Can you provide some pointers? The ZIP file with the packet traces can be downloaded here: http://216.57.23.143/hangup_problem.zip
just setup a gateway in fs that has reg=false and the proper credentials to pass the challenge. On Thu, Oct 30, 2008 at 2:49 PM, Wellie Chao <wchao@yahoo.com> wrote:
Hangups do not work for me under certain circumstances. Here is the background information:
* Our carrier uses a Metaswitch server with Acme Packet in front as a proxy/SBC. Only the Acme Packet machine is publicly visible (64.115.128.6).
* Our Freeswitch server is at 216.57.23.143.
* For calls originating from Freeswitch and terminating on Metaswitch (216.57.23.143 -> 64.115.128.6), Freeswitch authenticates with Metaswitch and everything works hunky-dorey. Either side can hang up and the other side will automatically hang up without requiring a manual hang-up.
Now the problem:
For calls originating from Metaswitch to Freeswitch (64.115.128.6 -> 216.57.23.143), Metaswitch does not authenticate with Freeswitch. Metaswitch also does not use the existing authenticated registration that our Freeswitch server initiates with Metaswitch upon startup of Freeswitch. Metaswitch just begins a new (unauthenticated) session and we have configured Freeswitch to allow any inbound calls from 64.115.128.6 without requiring authentication.
We receive inbound calls (Metaswitch to Freeswitch, 64.115.128.6 -> 216.57.23.143) just fine. The phone rings and we can have a normal conversation. If the caller (the endpoint attached to Metaswitch) hangs up, both sides hang up. If I hang up (remember, I'm at the endpoint attached to Freeswitch), the caller's line remains attached forever.
I have recorded a packet trace. Look at freeswitch_2.cap in the ZIP file, and you want to graph the first call starting at 21.202 and ending 53.798. If you go to time 53.087, you can see that my Freeswitch server sends a BYE to Metaswitch. This is a result of me hanging up my phone. At time 53.089, you see Metaswitch responding with 401 Unauthorized. Later at time 53.777, you see a BYE from Metaswitch to Freeswitch, but you should ignore this because that was a result of the caller (the guy hooked up to Metaswitch) manually hanging up. If he had not hung up his phone, the BYE from Metaswitch to Freeswitch would not have been issued and his phone would just stay on the line forever. Also, when I hang up my phone, I see the following at the Freeswitch console:
2008-10-29 23:03:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
I presume that Freeswitch emits this error because it got the 401 Unauthorized from Metaswitch.
I also asked our carrier for a packet trace of a successful hangup on the Aastra platform (the engineer at the carrier says it is an Asterisk derivative -- I'm not sure about that). Look at Aastra_authentication_test.cap in the ZIP file. Graph the first call starting at 43.633 and ending 93.156. If you go to 93.118, you'll see that the Aastra server sends a BYE. Just like our Freeswitch scenario, Metaswitch sends back a 401 Unauthorized, but in response to the 401 Unauthorized, Aastra then sends back another BYE with the difference that the second BYE is authenticated. Metaswitch gets the second BYE and responds with 200 OK.
I am pretty sure that if Freeswitch were to send back a second BYE (but with authentication), it would work fine. Now my question is how can I do this? I am not sure if this divergence of behavior is caused by: (a) my own error in configuring Freeswitch, (b) Metaswitch lacking standard SIP support (maybe it's not supposed to send the 401 Unauthorized), or (c) Freeswitch lacking standard SIP support (maybe it's supposed to send back a second BYE with authentication automatically). I don't know the SIP standards (or Freeswitch) well enough to know whether this problem is caused by me or by a deficiency in one of the two products (Metaswitch or Freeswitch).
Can you provide some pointers?
The ZIP file with the packet traces can be downloaded here: http://216.57.23.143/hangup_problem.zip
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Here is what I have: <include> <gateway name="broadview"> <param name="username" value="MY_USERNAME"/> <param name="password" value="MY_PASSWORD"/> <param name="realm" value="64.115.128.6"/> <param name="proxy" value="64.115.128.6"/> <param name="register" value="false"/> </gateway> </include> Whether register is true or false doesn't seem to make a difference (except that Freeswitch then comes up with broadview in NOREG state). On calls from Metaswitch to Freeswitch, it's the same problem, and I get the same message in the Freeswitch logs: 2008-10-30 17:39:04 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found I presume this is the same thing with the 401 Unauthorized packet being sent by Metaswitch in response to Freeswitch's BYE message. Note that the call itself goes just fine. I pick up, both sides can hear each other. Just the hangup gets messed up and for some reason Metaswitch expects an authenticated BYE message even though the connection was not authenticated in the beginning when Metaswitch initiated it. The packet trace shows this and it's very odd. Is that what you meant when you said set up a gateway in Freeswitch that has reg=false and the proper credentials? On Thu, 30 Oct 2008, Anthony Minessale wrote:
Date: Thu, 30 Oct 2008 16:10:58 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
just setup a gateway in fs that has reg=false and the proper credentials to pass the challenge.
On Thu, Oct 30, 2008 at 2:49 PM, Wellie Chao <wchao@yahoo.com> wrote: Hangups do not work for me under certain circumstances. Here is the background information:
* Our carrier uses a Metaswitch server with Acme Packet in front as a proxy/SBC. Only the Acme Packet machine is publicly visible (64.115.128.6).
* Our Freeswitch server is at 216.57.23.143.
* For calls originating from Freeswitch and terminating on Metaswitch (216.57.23.143 -> 64.115.128.6), Freeswitch authenticates with Metaswitch and everything works hunky-dorey. Either side can hang up and the other side will automatically hang up without requiring a manual hang-up.
Now the problem:
For calls originating from Metaswitch to Freeswitch (64.115.128.6 -> 216.57.23.143), Metaswitch does not authenticate with Freeswitch. Metaswitch also does not use the existing authenticated registration that our Freeswitch server initiates with Metaswitch upon startup of Freeswitch. Metaswitch just begins a new (unauthenticated) session and we have configured Freeswitch to allow any inbound calls from 64.115.128.6 without requiring authentication.
We receive inbound calls (Metaswitch to Freeswitch, 64.115.128.6 -> 216.57.23.143) just fine. The phone rings and we can have a normal conversation. If the caller (the endpoint attached to Metaswitch) hangs up, both sides hang up. If I hang up (remember, I'm at the endpoint attached to Freeswitch), the caller's line remains attached forever.
I have recorded a packet trace. Look at freeswitch_2.cap in the ZIP file, and you want to graph the first call starting at 21.202 and ending 53.798. If you go to time 53.087, you can see that my Freeswitch server sends a BYE to Metaswitch. This is a result of me hanging up my phone. At time 53.089, you see Metaswitch responding with 401 Unauthorized. Later at time 53.777, you see a BYE from Metaswitch to Freeswitch, but you should ignore this because that was a result of the caller (the guy hooked up to Metaswitch) manually hanging up. If he had not hung up his phone, the BYE from Metaswitch to Freeswitch would not have been issued and his phone would just stay on the line forever. Also, when I hang up my phone, I see the following at the Freeswitch console:
2008-10-29 23:03:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
I presume that Freeswitch emits this error because it got the 401 Unauthorized from Metaswitch.
I also asked our carrier for a packet trace of a successful hangup on the Aastra platform (the engineer at the carrier says it is an Asterisk derivative -- I'm not sure about that). Look at Aastra_authentication_test.cap in the ZIP file. Graph the first call starting at 43.633 and ending 93.156. If you go to 93.118, you'll see that the Aastra server sends a BYE. Just like our Freeswitch scenario, Metaswitch sends back a 401 Unauthorized, but in response to the 401 Unauthorized, Aastra then sends back another BYE with the difference that the second BYE is authenticated. Metaswitch gets the second BYE and responds with 200 OK.
I am pretty sure that if Freeswitch were to send back a second BYE (but with authentication), it would work fine. Now my question is how can I do this? I am not sure if this divergence of behavior is caused by: (a) my own error in configuring Freeswitch, (b) Metaswitch lacking standard SIP support (maybe it's not supposed to send the 401 Unauthorized), or (c) Freeswitch lacking standard SIP support (maybe it's supposed to send back a second BYE with authentication automatically). I don't know the SIP standards (or Freeswitch) well enough to know whether this problem is caused by me or by a deficiency in one of the two products (Metaswitch or Freeswitch).
Can you provide some pointers?
The ZIP file with the packet traces can be downloaded here: http://216.57.23.143/hangup_problem.zip
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
Turn on the TPORT_LOG=1 ./freeswitch and let me see the challenge packet. /b On Oct 30, 2008, at 4:45 PM, Wellie Chao wrote:
Here is what I have:
<include> <gateway name="broadview"> <param name="username" value="MY_USERNAME"/> <param name="password" value="MY_PASSWORD"/> <param name="realm" value="64.115.128.6"/> <param name="proxy" value="64.115.128.6"/> <param name="register" value="false"/> </gateway> </include>
Whether register is true or false doesn't seem to make a difference (except that Freeswitch then comes up with broadview in NOREG state). On calls from Metaswitch to Freeswitch, it's the same problem, and I get the same message in the Freeswitch logs:
2008-10-30 17:39:04 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
I presume this is the same thing with the 401 Unauthorized packet being sent by Metaswitch in response to Freeswitch's BYE message. Note that the call itself goes just fine. I pick up, both sides can hear each other. Just the hangup gets messed up and for some reason Metaswitch expects an authenticated BYE message even though the connection was not authenticated in the beginning when Metaswitch initiated it. The packet trace shows this and it's very odd.
Is that what you meant when you said set up a gateway in Freeswitch that has reg=false and the proper credentials?
make sure realm matches the realm in the challenge packet from the other device. On Thu, Oct 30, 2008 at 5:11 PM, Brian West <brian@freeswitch.org> wrote:
Turn on the TPORT_LOG=1 ./freeswitch and let me see the challenge packet.
/b
On Oct 30, 2008, at 4:45 PM, Wellie Chao wrote:
Here is what I have:
<include> <gateway name="broadview"> <param name="username" value="MY_USERNAME"/> <param name="password" value="MY_PASSWORD"/> <param name="realm" value="64.115.128.6"/> <param name="proxy" value="64.115.128.6"/> <param name="register" value="false"/> </gateway> </include>
Whether register is true or false doesn't seem to make a difference (except that Freeswitch then comes up with broadview in NOREG state). On calls from Metaswitch to Freeswitch, it's the same problem, and I get the same message in the Freeswitch logs:
2008-10-30 17:39:04 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
I presume this is the same thing with the 401 Unauthorized packet being sent by Metaswitch in response to Freeswitch's BYE message. Note that the call itself goes just fine. I pick up, both sides can hear each other. Just the hangup gets messed up and for some reason Metaswitch expects an authenticated BYE message even though the connection was not authenticated in the beginning when Metaswitch initiated it. The packet trace shows this and it's very odd.
Is that what you meant when you said set up a gateway in Freeswitch that has reg=false and the proper credentials?
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
If I change the realm, I will not be able to make outgoing calls because the realm must be 64.115.128.6 in order to register with Metaswitch for outbound calls. Are you suggesting I create two gateway entries, one for outbound and one for inbound? Will Freeswitch respond with an authenticated BYE message even if the session was initiated in an authenticated fashion by Metaswitch? It's a little frustrating because Metaswitch is initiating the call to Freeswitch without authentication, yet it expects Freeswitch to reply with an authenticated BYE message in order to end the call. It really should be smart enough to realize that since it initiated the call to a particular Freeswitch instance at A.B.C.D IP address, it should allow unauthenticated BYE messages from that IP address. On Thu, 30 Oct 2008, Anthony Minessale wrote:
Date: Thu, 30 Oct 2008 18:54:34 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
make sure realm matches the realm in the challenge packet from the other device.
On Thu, Oct 30, 2008 at 5:11 PM, Brian West <brian@freeswitch.org> wrote: Turn on the TPORT_LOG=1 ./freeswitch and let me see the challenge packet.
/b
On Oct 30, 2008, at 4:45 PM, Wellie Chao wrote:
Here is what I have:
<include> <gateway name="broadview"> <param name="username" value="MY_USERNAME"/> <param name="password" value="MY_PASSWORD"/> <param name="realm" value="64.115.128.6"/> <param name="proxy" value="64.115.128.6"/> <param name="register" value="false"/> </gateway> </include>
Whether register is true or false doesn't seem to make a difference (except that Freeswitch then comes up with broadview in NOREG state). On calls from Metaswitch to Freeswitch, it's the same problem, and I get the same message in the Freeswitch logs:
2008-10-30 17:39:04 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
I presume this is the same thing with the 401 Unauthorized packet being sent by Metaswitch in response to Freeswitch's BYE message. Note that the call itself goes just fine. I pick up, both sides can hear each other. Just the hangup gets messed up and for some reason Metaswitch expects an authenticated BYE message even though the connection was not authenticated in the beginning when Metaswitch initiated it. The packet trace shows this and it's very odd.
Is that what you meant when you said set up a gateway in Freeswitch that has reg=false and the proper credentials?
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
Just to correct an error, I asked below "Will Freeswitch respond with an authenticated BYE message even if the session was initiated in an authenticated fashion by Metaswitch?" and I meant "even if the session was initiated in an UNauthenticated fashion". Also, to expound on the problem, I don't see how changing the realm will help because the problem is not that Freeswitch is sending the wrong realm, but that Freeswitch is not responding with an authenticated BYE message at all -- it's only sending an unauthenticated BYE message. The realm, while possibly important later, assumes that Freeswitch is using authentication in the BYE message it sends to Metaswitch. Right now it's not. From an intuitive point of view, it makes sense: Freeswitch is thinking, "well Metaswitch, you called me, why do I need to authenticate myself to you". The Aastra softswitch (in the other packet trace in the ZIP file I sent in a previous email to this list) deals with this by sending an authenticated BYE when the unauthenticated BYE fails with 401 Unauthorized. Is there some way I can configure Freeswitch to do the same? On Thu, 30 Oct 2008, Wellie Chao wrote:
Date: Thu, 30 Oct 2008 20:55:37 -0400 (EDT) From: Wellie Chao <wchao@yahoo.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
If I change the realm, I will not be able to make outgoing calls because the realm must be 64.115.128.6 in order to register with Metaswitch for outbound calls.
Are you suggesting I create two gateway entries, one for outbound and one for inbound? Will Freeswitch respond with an authenticated BYE message even if the session was initiated in an authenticated fashion by Metaswitch? It's a little frustrating because Metaswitch is initiating the call to Freeswitch without authentication, yet it expects Freeswitch to reply with an authenticated BYE message in order to end the call. It really should be smart enough to realize that since it initiated the call to a particular Freeswitch instance at A.B.C.D IP address, it should allow unauthenticated BYE messages from that IP address.
On Thu, 30 Oct 2008, Anthony Minessale wrote:
Date: Thu, 30 Oct 2008 18:54:34 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
make sure realm matches the realm in the challenge packet from the other device.
On Thu, Oct 30, 2008 at 5:11 PM, Brian West <brian@freeswitch.org> wrote: Turn on the TPORT_LOG=1 ./freeswitch and let me see the challenge packet.
/b
On Oct 30, 2008, at 4:45 PM, Wellie Chao wrote:
Here is what I have:
<include> <gateway name="broadview"> <param name="username" value="MY_USERNAME"/> <param name="password" value="MY_PASSWORD"/> <param name="realm" value="64.115.128.6"/> <param name="proxy" value="64.115.128.6"/> <param name="register" value="false"/> </gateway> </include>
Whether register is true or false doesn't seem to make a difference (except that Freeswitch then comes up with broadview in NOREG state). On calls from Metaswitch to Freeswitch, it's the same problem, and I get the same message in the Freeswitch logs:
2008-10-30 17:39:04 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
I presume this is the same thing with the 401 Unauthorized packet being sent by Metaswitch in response to Freeswitch's BYE message. Note that the call itself goes just fine. I pick up, both sides can hear each other. Just the hangup gets messed up and for some reason Metaswitch expects an authenticated BYE message even though the connection was not authenticated in the beginning when Metaswitch initiated it. The packet trace shows this and it's very odd.
Is that what you meant when you said set up a gateway in Freeswitch that has reg=false and the proper credentials?
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
Here is the BYE from Freeswitch to Metaswitch: send 683 bytes to udp/[64.115.128.6]:5060 at 00:44:46.607025: ------------------------------------------------------------------------ BYE sip:9172388084@64.115.128.6:5060;transport=udp SIP/2.0 Via: SIP/2.0/UDP 216.57.23.143;rport;branch=z9hG4bKNa693jZ8SD54D Max-Forwards: 70 From: <sip:2675379325@216.57.23.143>;tag=r4yBmtX3U0Hrr To: <sip:9172388084@64.115.128.6:5060;transport=udp>;tag=Broadview1+1+25f76f+cc3ba534 Call-ID: CEB9027F@Broadview1 CSeq: 106588607 BYE Contact: <sip:mod_sofia@216.57.23.143:5060;transport=udp> User-Agent: FreeSWITCH-mod_sofia/1.0.1-9171 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH Supported: 100rel, timer, precondition, path, replaces Reason: Q.850;cause=16;text="NORMAL_CLEARING" Content-Length: 0 ------------------------------------------------------------------------ Metaswitch is not so happy with the BYE message: recv 491 bytes from udp/[64.115.128.6]:5060 at 00:44:46.630445: ------------------------------------------------------------------------ SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 216.57.23.143;received=216.57.23.143;branch=z9hG4bKNa693jZ8SD54D;rport=5060 From: <sip:2675379325@216.57.23.143>;tag=r4yBmtX3U0Hrr To: <sip:9172388084@64.115.128.6:5060;transport=udp>;tag=Broadview1+1+25f76f+cc3ba534 Call-ID: CEB9027F@Broadview1 CSeq: 106588607 BYE WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth" Server: DC-SIP/2.0 Organization: Supported: 100rel Content-Length: 0 ------------------------------------------------------------------------ Right after receiving the 401 Unauthorized message from Metaswitch, Freeswitch emits the following error on the console: 2008-10-30 20:44:46 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found At this point, the caller (the endpoint connected to Metaswitch) just remains on the line, never having received the BYE. Did you take a look at the packet traces I captured? The carrier gave me a packet trace for an Aastra PBX/softswitch, and it had the same interaction, but immediately upon receiving the 401 Unauthorized from Metaswitch, the Aastra machine then sent a second BYE, this time with authentication. Is there some way I can tell Freeswitch to do the same? Regards, Wellie On Thu, 30 Oct 2008, Brian West wrote:
Date: Thu, 30 Oct 2008 17:11:04 -0500 From: Brian West <brian@freeswitch.org> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
Turn on the TPORT_LOG=1 ./freeswitch and let me see the challenge packet.
/b
On Oct 30, 2008, at 4:45 PM, Wellie Chao wrote:
Here is what I have:
<include> <gateway name="broadview"> <param name="username" value="MY_USERNAME"/> <param name="password" value="MY_PASSWORD"/> <param name="realm" value="64.115.128.6"/> <param name="proxy" value="64.115.128.6"/> <param name="register" value="false"/> </gateway> </include>
Whether register is true or false doesn't seem to make a difference (except that Freeswitch then comes up with broadview in NOREG state). On calls from Metaswitch to Freeswitch, it's the same problem, and I get the same message in the Freeswitch logs:
2008-10-30 17:39:04 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
I presume this is the same thing with the 401 Unauthorized packet being sent by Metaswitch in response to Freeswitch's BYE message. Note that the call itself goes just fine. I pick up, both sides can hear each other. Just the hangup gets messed up and for some reason Metaswitch expects an authenticated BYE message even though the connection was not authenticated in the beginning when Metaswitch initiated it. The packet trace shows this and it's very odd.
Is that what you meant when you said set up a gateway in Freeswitch that has reg=false and the proper credentials?
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
They really shouldn't be challenging the bye like that because not every device can answer the challenge properly. Either case it doesn't matter if you have a proper domain 206.57.23.143 in your user directory with the proper user and realm set to meet this challenge. We have a setting in FreeSWITCH to auth all packets and when we did that we found out that some devices just do not work properly when doing that. I need to see your original gateway XML. You can email it off list if you like and let me try to solve this. /b On Oct 30, 2008, at 7:52 PM, Wellie Chao wrote:
Here is the BYE from Freeswitch to Metaswitch:
send 683 bytes to udp/[64.115.128.6]:5060 at 00:44:46.607025:
------------------------------------------------------------------------ BYE sip:9172388084@64.115.128.6:5060;transport=udp SIP/2.0 Via: SIP/2.0/UDP 216.57.23.143;rport;branch=z9hG4bKNa693jZ8SD54D Max-Forwards: 70 From: <sip:2675379325@216.57.23.143>;tag=r4yBmtX3U0Hrr To: <sip: 9172388084@64.115.128.6:5060;transport=udp>;tag=Broadview1+1+25f76f +cc3ba534 Call-ID: CEB9027F@Broadview1 CSeq: 106588607 BYE Contact: <sip:mod_sofia@216.57.23.143:5060;transport=udp> User-Agent: FreeSWITCH-mod_sofia/1.0.1-9171 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH Supported: 100rel, timer, precondition, path, replaces Reason: Q.850;cause=16;text="NORMAL_CLEARING" Content-Length: 0
------------------------------------------------------------------------
Metaswitch is not so happy with the BYE message:
recv 491 bytes from udp/[64.115.128.6]:5060 at 00:44:46.630445:
------------------------------------------------------------------------ SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 216.57.23.143 ;received=216.57.23.143;branch=z9hG4bKNa693jZ8SD54D;rport=5060 From: <sip:2675379325@216.57.23.143>;tag=r4yBmtX3U0Hrr To: <sip: 9172388084@64.115.128.6:5060;transport=udp>;tag=Broadview1+1+25f76f +cc3ba534 Call-ID: CEB9027F@Broadview1 CSeq: 106588607 BYE WWW-Authenticate: Digest realm ="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth" Server: DC-SIP/2.0 Organization: Supported: 100rel Content-Length: 0
------------------------------------------------------------------------
Right after receiving the 401 Unauthorized message from Metaswitch, Freeswitch emits the following error on the console:
2008-10-30 20:44:46 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
At this point, the caller (the endpoint connected to Metaswitch) just remains on the line, never having received the BYE.
Did you take a look at the packet traces I captured? The carrier gave me a packet trace for an Aastra PBX/softswitch, and it had the same interaction, but immediately upon receiving the 401 Unauthorized from Metaswitch, the Aastra machine then sent a second BYE, this time with authentication. Is there some way I can tell Freeswitch to do the same?
Regards, Wellie
See what they said in the challenge? WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth" Since this is a spontaneous challenge (which i think is somewhat silly since it lets you talk on the phone for 40 minutes then makes you authenticate to hangup but *shrug*) FS does not know which gateway to use for credentials. The realm they sent was SipLocal so FS is looking in its configuration for a gateway with that name. The 2nd thing it tries is the host from the To: header (64.115.128.6). if there was a gateway with either of those names, it would find it. So try naming your gateway SipLocal or 64.115.128.6 or you can try setting the variable sip_use_gateway=<whatever> on the channel which can give it a hint which gateway to use. On Thu, Oct 30, 2008 at 8:42 PM, Brian West <brian@freeswitch.org> wrote:
They really shouldn't be challenging the bye like that because not every device can answer the challenge properly. Either case it doesn't matter if you have a proper domain 206.57.23.143 in your user directory with the proper user and realm set to meet this challenge. We have a setting in FreeSWITCH to auth all packets and when we did that we found out that some devices just do not work properly when doing that. I need to see your original gateway XML. You can email it off list if you like and let me try to solve this. /b
On Oct 30, 2008, at 7:52 PM, Wellie Chao wrote:
Here is the BYE from Freeswitch to Metaswitch:
send 683 bytes to udp/[64.115.128.6]:5060 at 00:44:46.607025:
------------------------------------------------------------------------ BYE sip:9172388084@64.115.128.6:5060;transport=udp SIP/2.0 Via: SIP/2.0/UDP 216.57.23.143;rport;branch=z9hG4bKNa693jZ8SD54D Max-Forwards: 70 From: <sip:2675379325@216.57.23.143>;tag=r4yBmtX3U0Hrr To: <sip:9172388084@64.115.128.6:5060;transport=udp
;tag=Broadview1+1+25f76f+cc3ba534 Call-ID: CEB9027F@Broadview1 CSeq: 106588607 BYE Contact: <sip:mod_sofia@216.57.23.143:5060;transport=udp> User-Agent: FreeSWITCH-mod_sofia/1.0.1-9171 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH Supported: 100rel, timer, precondition, path, replaces Reason: Q.850;cause=16;text="NORMAL_CLEARING" Content-Length: 0
------------------------------------------------------------------------
Metaswitch is not so happy with the BYE message:
recv 491 bytes from udp/[64.115.128.6]:5060 at 00:44:46.630445:
------------------------------------------------------------------------ SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 216.57.23.143;received=216.57.23.143 ;branch=z9hG4bKNa693jZ8SD54D;rport=5060 From: <sip:2675379325@216.57.23.143>;tag=r4yBmtX3U0Hrr To: <sip:9172388084@64.115.128.6:5060;transport=udp
;tag=Broadview1+1+25f76f+cc3ba534 Call-ID: CEB9027F@Broadview1 CSeq: 106588607 BYE WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth" Server: DC-SIP/2.0 Organization: Supported: 100rel Content-Length: 0
------------------------------------------------------------------------
Right after receiving the 401 Unauthorized message from Metaswitch, Freeswitch emits the following error on the console:
2008-10-30 20:44:46 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
At this point, the caller (the endpoint connected to Metaswitch) just remains on the line, never having received the BYE.
Did you take a look at the packet traces I captured? The carrier gave me a packet trace for an Aastra PBX/softswitch, and it had the same interaction, but immediately upon receiving the 401 Unauthorized from Metaswitch, the Aastra machine then sent a second BYE, this time with authentication. Is there some way I can tell Freeswitch to do the same?
Regards, Wellie
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Where do you recommend I put the sip_use_gateway=broadview action? I have tried in the conf/dialplan/public.xml like so: <extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension> I've also tried in conf/dialplan/extensions/7_inbound.xml (a file I created that is pulled in via an include pre-processor directive): <extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension> I have a gateway named broadview in conf/sip_profiles/external. In both cases, I still get the following error on the Freeswitch console: 2008-10-31 10:37:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 08:04:23 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
See what they said in the challenge?
WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth"
Since this is a spontaneous challenge (which i think is somewhat silly since it lets you talk on the phone for 40 minutes then makes you authenticate to hangup but *shrug*) FS does not know which gateway to use for credentials.
The realm they sent was SipLocal so FS is looking in its configuration for a gateway with that name. The 2nd thing it tries is the host from the To: header (64.115.128.6). if there was a gateway with either of those names, it would find it.
So try naming your gateway SipLocal or 64.115.128.6 or you can try setting the variable sip_use_gateway=<whatever> on the channel which can give it a hint which gateway to use.
try using "export" instead of "set" or add it to the dial string directly that calls it {sip_use_gateway=broadview}sofia/....... On Fri, Oct 31, 2008 at 9:42 AM, Wellie Chao <wchao@yahoo.com> wrote:
Where do you recommend I put the sip_use_gateway=broadview action?
I have tried in the conf/dialplan/public.xml like so:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
I've also tried in conf/dialplan/extensions/7_inbound.xml (a file I created that is pulled in via an include pre-processor directive):
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
I have a gateway named broadview in conf/sip_profiles/external. In both cases, I still get the following error on the Freeswitch console:
2008-10-31 10:37:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 08:04:23 -0500
From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
See what they said in the challenge?
WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth"
Since this is a spontaneous challenge (which i think is somewhat silly since it lets you talk on the phone for 40 minutes then makes you authenticate to hangup but *shrug*) FS does not know which gateway to use for credentials.
The realm they sent was SipLocal so FS is looking in its configuration for a gateway with that name. The 2nd thing it tries is the host from the To: header (64.115.128.6). if there was a gateway with either of those names, it would find it.
So try naming your gateway SipLocal or 64.115.128.6 or you can try setting the variable sip_use_gateway=<whatever> on the channel which can give it a hint which gateway to use.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
I tried the following in conf/dialplan/extensions/7_inbound.xml: <extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension> Also tried the following in conf/dialplan/public.xml: <extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension> Neither helped. When you say add it to the dial string directly that calls it, I'm not sure what you mean (I know the general format of {var_name=var_value}, so that's not my question). Do you mean add it in front of the 1001 as the target of the transfer? By the way, hangup DOES work properly if I create another gateway and name it 64.115.128.6. However, I'd love to get it working without having to create a duplicate gateway with a non-intuitive name. It's definitely a lot better than nothing to do it that way, but I'd prefer to have it work with the sip_use_gateway scheme you mention. I'm assuming I'm just doing something wrong with how sip_use_gateway should be specified in the XML configuration files. Can you tell what I am doing wrong? On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 09:49:18 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
try using "export" instead of "set" or add it to the dial string directly that calls it
{sip_use_gateway=broadview}sofia/.......
On Fri, Oct 31, 2008 at 9:42 AM, Wellie Chao <wchao@yahoo.com> wrote: Where do you recommend I put the sip_use_gateway=broadview action?
I have tried in the conf/dialplan/public.xml like so:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
I've also tried in conf/dialplan/extensions/7_inbound.xml (a file I created that is pulled in via an include pre-processor directive):
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
I have a gateway named broadview in conf/sip_profiles/external. In both cases, I still get the following error on the Freeswitch console:
2008-10-31 10:37:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 08:04:23 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
See what they said in the challenge?
WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth"
Since this is a spontaneous challenge (which i think is somewhat silly since it lets you talk on the phone for 40 minutes then makes you authenticate to hangup but *shrug*) FS does not know which gateway to use for credentials.
The realm they sent was SipLocal so FS is looking in its configuration for a gateway with that name. The 2nd thing it tries is the host from the To: header (64.115.128.6). if there was a gateway with either of those names, it would find it.
So try naming your gateway SipLocal or 64.115.128.6 or you can try setting the variable sip_use_gateway=<whatever> on the channel which can give it a hint which gateway to use.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
Yes i mean add it to the dial string inside the {} it only will work if the channel with the variable set is tied to the FS session obj. sofia_reg.c 1122 is where it all happens so if session is null there the var code won't work. you can add some debug code there and try to figure out what's wrong. On Fri, Oct 31, 2008 at 10:06 AM, Wellie Chao <wchao@yahoo.com> wrote:
I tried the following in conf/dialplan/extensions/7_inbound.xml:
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
Also tried the following in conf/dialplan/public.xml:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
Neither helped. When you say add it to the dial string directly that calls it, I'm not sure what you mean (I know the general format of {var_name=var_value}, so that's not my question). Do you mean add it in front of the 1001 as the target of the transfer?
By the way, hangup DOES work properly if I create another gateway and name it 64.115.128.6. However, I'd love to get it working without having to create a duplicate gateway with a non-intuitive name. It's definitely a lot better than nothing to do it that way, but I'd prefer to have it work with the sip_use_gateway scheme you mention. I'm assuming I'm just doing something wrong with how sip_use_gateway should be specified in the XML configuration files. Can you tell what I am doing wrong?
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 09:49:18 -0500
From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
try using "export" instead of "set" or add it to the dial string directly that calls it
{sip_use_gateway=broadview}sofia/.......
On Fri, Oct 31, 2008 at 9:42 AM, Wellie Chao <wchao@yahoo.com> wrote: Where do you recommend I put the sip_use_gateway=broadview action?
I have tried in the conf/dialplan/public.xml like so:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
I've also tried in conf/dialplan/extensions/7_inbound.xml (a file I created that is pulled in via an include pre-processor directive):
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
I have a gateway named broadview in conf/sip_profiles/external. In both cases, I still get the following error on the Freeswitch console:
2008-10-31 10:37:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 08:04:23 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
See what they said in the challenge?
WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth"
Since this is a spontaneous challenge (which i think is somewhat silly since it lets you talk on the phone for 40 minutes then makes you authenticate to hangup but *shrug*) FS does not know which gateway to use for credentials.
The realm they sent was SipLocal so FS is looking in its configuration for a gateway with that name. The 2nd thing it tries is the host from the To: header (64.115.128.6). if there was a gateway with either of those names, it would find it.
So try naming your gateway SipLocal or 64.115.128.6 or you can try setting the variable sip_use_gateway=<whatever> on the channel which can give it a hint which gateway to use.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
I added some debug code and determined that session is null in sofia_reg.c in the sofia_reg_handle_sip_r_challenge function, which is called by sofia_event_callback in sofia.c. I added further debug code and found that sofia_event_callback only sets session if sofia_private->uuid exists. The strange thing is that during the call setup for a call from Metaswitch to Freeswitch (which is unauthenticated, remember), sofia_private->uuid exists and is a valid call ID, and session is also set to a valid value, but when I hang up from the Freeswitch side, sofia_private->uuid is null in that particular call to sofia_event_callback (and thus session is obviously left null). On the call setup, there are two legs (Metaswitch to Freeswitch, then Freeswitch to the extension). The call hangup is being performed by the extension. The session initiated by Metaswitch is unauthenticated, as I mentioned. I can look into this further, but I wanted to see if you had any quick pointers before delving in more deeply. On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 10:16:25 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
Yes i mean add it to the dial string inside the {} it only will work if the channel with the variable set is tied to the FS session obj.
sofia_reg.c 1122 is where it all happens so if session is null there the var code won't work.
you can add some debug code there and try to figure out what's wrong.
On Fri, Oct 31, 2008 at 10:06 AM, Wellie Chao <wchao@yahoo.com> wrote: I tried the following in conf/dialplan/extensions/7_inbound.xml:
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
Also tried the following in conf/dialplan/public.xml:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
Neither helped. When you say add it to the dial string directly that calls it, I'm not sure what you mean (I know the general format of {var_name=var_value}, so that's not my question). Do you mean add it in front of the 1001 as the target of the transfer?
By the way, hangup DOES work properly if I create another gateway and name it 64.115.128.6. However, I'd love to get it working without having to create a duplicate gateway with a non-intuitive name. It's definitely a lot better than nothing to do it that way, but I'd prefer to have it work with the sip_use_gateway scheme you mention. I'm assuming I'm just doing something wrong with how sip_use_gateway should be specified in the XML configuration files. Can you tell what I am doing wrong?
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 09:49:18 -0500
From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
try using "export" instead of "set" or add it to the dial string directly that calls it
{sip_use_gateway=broadview}sofia/.......
On Fri, Oct 31, 2008 at 9:42 AM, Wellie Chao <wchao@yahoo.com> wrote: Where do you recommend I put the sip_use_gateway=broadview action?
I have tried in the conf/dialplan/public.xml like so:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
I've also tried in conf/dialplan/extensions/7_inbound.xml (a file I created that is pulled in via an include pre-processor directive):
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
I have a gateway named broadview in conf/sip_profiles/external. In both cases, I still get the following error on the Freeswitch console:
2008-10-31 10:37:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 08:04:23 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
See what they said in the challenge?
WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth"
Since this is a spontaneous challenge (which i think is somewhat silly since it lets you talk on the phone for 40 minutes then makes you authenticate to hangup but *shrug*) FS does not know which gateway to use for credentials.
The realm they sent was SipLocal so FS is looking in its configuration for a gateway with that name. The 2nd thing it tries is the host from the To: header (64.115.128.6). if there was a gateway with either of those names, it would find it.
So try naming your gateway SipLocal or 64.115.128.6 or you can try setting the variable sip_use_gateway=<whatever> on the channel which can give it a hint which gateway to use.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
can you try latest trunk. I added a way to save the string into sofia_private so even after it's too late to get session you can get the name from there instead. On Sun, Nov 2, 2008 at 11:40 PM, Wellie Chao <wchao@yahoo.com> wrote:
I added some debug code and determined that session is null in sofia_reg.c in the sofia_reg_handle_sip_r_challenge function, which is called by sofia_event_callback in sofia.c. I added further debug code and found that sofia_event_callback only sets session if sofia_private->uuid exists. The strange thing is that during the call setup for a call from Metaswitch to Freeswitch (which is unauthenticated, remember), sofia_private->uuid exists and is a valid call ID, and session is also set to a valid value, but when I hang up from the Freeswitch side, sofia_private->uuid is null in that particular call to sofia_event_callback (and thus session is obviously left null). On the call setup, there are two legs (Metaswitch to Freeswitch, then Freeswitch to the extension). The call hangup is being performed by the extension. The session initiated by Metaswitch is unauthenticated, as I mentioned.
I can look into this further, but I wanted to see if you had any quick pointers before delving in more deeply.
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 10:16:25 -0500
From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
Yes i mean add it to the dial string inside the {} it only will work if the channel with the variable set is tied to the FS session obj.
sofia_reg.c 1122 is where it all happens so if session is null there the var code won't work.
you can add some debug code there and try to figure out what's wrong.
On Fri, Oct 31, 2008 at 10:06 AM, Wellie Chao <wchao@yahoo.com> wrote: I tried the following in conf/dialplan/extensions/7_inbound.xml:
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
Also tried the following in conf/dialplan/public.xml:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
Neither helped. When you say add it to the dial string directly that calls it, I'm not sure what you mean (I know the general format of {var_name=var_value}, so that's not my question). Do you mean add it in front of the 1001 as the target of the transfer?
By the way, hangup DOES work properly if I create another gateway and name it 64.115.128.6. However, I'd love to get it working without having to create a duplicate gateway with a non-intuitive name. It's definitely a lot better than nothing to do it that way, but I'd prefer to have it work with the sip_use_gateway scheme you mention. I'm assuming I'm just doing something wrong with how sip_use_gateway should be specified in the XML configuration files. Can you tell what I am doing wrong?
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 09:49:18 -0500
From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
try using "export" instead of "set" or add it to the dial string directly that calls it
{sip_use_gateway=broadview}sofia/.......
On Fri, Oct 31, 2008 at 9:42 AM, Wellie Chao <wchao@yahoo.com> wrote: Where do you recommend I put the sip_use_gateway=broadview action?
I have tried in the conf/dialplan/public.xml like so:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
I've also tried in conf/dialplan/extensions/7_inbound.xml (a file I created that is pulled in via an include pre-processor directive):
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
I have a gateway named broadview in conf/sip_profiles/external. In both cases, I still get the following error on the Freeswitch console:
2008-10-31 10:37:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 08:04:23 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
See what they said in the challenge?
WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth"
Since this is a spontaneous challenge (which i think is somewhat silly since it lets you talk on the phone for 40 minutes then makes you authenticate to hangup but *shrug*) FS does not know which gateway to use for credentials.
The realm they sent was SipLocal so FS is looking in its configuration for a gateway with that name. The 2nd thing it tries is the host from the To: header (64.115.128.6). if there was a gateway with either of those names, it would find it.
So try naming your gateway SipLocal or 64.115.128.6 or you can try setting the variable sip_use_gateway=<whatever> on the channel which can give it a hint which gateway to use.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
OK, I retrieved the latest trunk and compiled and now I am having different problems. I noticed the configuration files changed somewhat, but I tried to carry over my configuration from version 1.0.1. It wasn't too hard, but I may have messed some things up. In any case, here is what is happening now: * I can make outbound calls from my snom 320 (configured to register on extension 1001 on Freeswitch). I can hang up my snom 320 phone and the other side (an external POTS line) will also get the signal to hang up and does so properly. However, if I hang up the other side first (the external POTS line), my snom 320 phone waits on the line forever -- it seems it's not receiving a hangup. This is the reverse of the problem I had before! * I can receive inbound calls to the IVR, but not to my extension (1001, the snom 320 phone). Here is what the Freeswitch log says: 2008-11-09 15:59:58 [INFO] mod_dialplan_xml.c:233 dialplan_hunt() Processing 9172388084->2675379325 in context public 2008-11-09 15:59:58 [NOTICE] switch_ivr.c:1116 switch_ivr_session_transfer() Transfer sofia/internal/9172388084@64.115.128.6:5060 to XML[2675379325@default] 2008-11-09 15:59:58 [INFO] mod_dialplan_xml.c:233 dialplan_hunt() Processing 9172388084->2675379325 in context default 2008-11-09 15:59:59 [NOTICE] switch_ivr.c:1116 switch_ivr_session_transfer() Transfer sofia/internal/9172388084@64.115.128.6:5060 to XML[1001@default] 2008-11-09 15:59:59 [INFO] mod_dialplan_xml.c:233 dialplan_hunt() Processing 9172388084->1001 in context default 2008-11-09 15:59:59 [INFO] switch_ivr_async.c:1536 switch_ivr_bind_dtmf_meta_session() Bound B-Leg: 1 execute_extension::dx XML features 2008-11-09 15:59:59 [INFO] switch_ivr_async.c:1536 switch_ivr_bind_dtmf_meta_session() Bound B-Leg: 2 record_session::/usr/local/freeswitch/recordings/9172388084.2008-11-09-15-59-59.wav 2008-11-09 15:59:59 [INFO] switch_ivr_async.c:1536 switch_ivr_bind_dtmf_meta_session() Bound B-Leg: 3 execute_extension::cf XML features 2008-11-09 16:00:00 [NOTICE] switch_channel.c:551 switch_channel_set_name() New Channel sofia/internal/1001@192.168.216.104:2051;line=4lp4nzfu [ebe41989-0c8c-4cc6-8e2d-20c56907385f] 2008-11-09 16:00:00 [NOTICE] sofia.c:2784 sofia_handle_sip_i_state() Hangup sofia/internal/1001@192.168.216.104:2051;line=4lp4nzfu [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE] 2008-11-09 16:00:00 [ERR] switch_ivr_originate.c:1064 switch_ivr_originate() Cannot create outgoing channel of type [user] cause: [NORMAL_TEMPORARY_FAILURE] 2008-11-09 16:00:00 [INFO] mod_dptools.c:1848 audio_bridge_function() Originate Failed. Cause: NORMAL_TEMPORARY_FAILURE 2008-11-09 16:00:00 [NOTICE] switch_core_session.c:927 switch_core_session_thread() Session 4 (sofia/internal/1001@192.168.216.104:2051;line=4lp4nzfu) Ended 2008-11-09 16:00:00 [NOTICE] switch_core_session.c:929 switch_core_session_thread() Close Channel sofia/internal/1001@192.168.216.104:2051;line=4lp4nzfu [CS_HANGUP] Do you think I migrated the configuration settings incorrectly, or do you think this might be a bug in the trunk version of Freeswitch? Wellie On Mon, 3 Nov 2008, Anthony Minessale wrote:
Date: Mon, 3 Nov 2008 11:39:51 -0600 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
can you try latest trunk. I added a way to save the string into sofia_private so even after it's too late to get session you can get the name from there instead.
On Sun, Nov 2, 2008 at 11:40 PM, Wellie Chao <wchao@yahoo.com> wrote: I added some debug code and determined that session is null in sofia_reg.c in the sofia_reg_handle_sip_r_challenge function, which is called by sofia_event_callback in sofia.c. I added further debug code and found that sofia_event_callback only sets session if sofia_private->uuid exists. The strange thing is that during the call setup for a call from Metaswitch to Freeswitch (which is unauthenticated, remember), sofia_private->uuid exists and is a valid call ID, and session is also set to a valid value, but when I hang up from the Freeswitch side, sofia_private->uuid is null in that particular call to sofia_event_callback (and thus session is obviously left null). On the call setup, there are two legs (Metaswitch to Freeswitch, then Freeswitch to the extension). The call hangup is being performed by the extension. The session initiated by Metaswitch is unauthenticated, as I mentioned.
I can look into this further, but I wanted to see if you had any quick pointers before delving in more deeply.
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 10:16:25 -0500
From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
Yes i mean add it to the dial string inside the {} it only will work if the channel with the variable set is tied to the FS session obj.
sofia_reg.c 1122 is where it all happens so if session is null there the var code won't work.
you can add some debug code there and try to figure out what's wrong.
On Fri, Oct 31, 2008 at 10:06 AM, Wellie Chao <wchao@yahoo.com> wrote: I tried the following in conf/dialplan/extensions/7_inbound.xml:
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
Also tried the following in conf/dialplan/public.xml:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
Neither helped. When you say add it to the dial string directly that calls it, I'm not sure what you mean (I know the general format of {var_name=var_value}, so that's not my question). Do you mean add it in front of the 1001 as the target of the transfer?
By the way, hangup DOES work properly if I create another gateway and name it 64.115.128.6. However, I'd love to get it working without having to create a duplicate gateway with a non-intuitive name. It's definitely a lot better than nothing to do it that way, but I'd prefer to have it work with the sip_use_gateway scheme you mention. I'm assuming I'm just doing something wrong with how sip_use_gateway should be specified in the XML configuration files. Can you tell what I am doing wrong?
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 09:49:18 -0500
From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
try using "export" instead of "set" or add it to the dial string directly that calls it
{sip_use_gateway=broadview}sofia/.......
On Fri, Oct 31, 2008 at 9:42 AM, Wellie Chao <wchao@yahoo.com> wrote: Where do you recommend I put the sip_use_gateway=broadview action?
I have tried in the conf/dialplan/public.xml like so:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
I've also tried in conf/dialplan/extensions/7_inbound.xml (a file I created that is pulled in via an include pre-processor directive):
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
I have a gateway named broadview in conf/sip_profiles/external. In both cases, I still get the following error on the Freeswitch console:
2008-10-31 10:37:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 08:04:23 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
See what they said in the challenge?
WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth"
Since this is a spontaneous challenge (which i think is somewhat silly since it lets you talk on the phone for 40 minutes then makes you authenticate to hangup but *shrug*) FS does not know which gateway to use for credentials.
The realm they sent was SipLocal so FS is looking in its configuration for a gateway with that name. The 2nd thing it tries is the host from the To: header (64.115.128.6). if there was a gateway with either of those names, it would find it.
So try naming your gateway SipLocal or 64.115.128.6 or you can try setting the variable sip_use_gateway=<whatever> on the channel which can give it a hint which gateway to use.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org pstn:213-799-1400
try pressing f8 and try again you will see much more info. I believe your user is not properly registered and you may have the domain wrong in your config. You can try installing the default config and test using your box's ip as the domain. and id 1000 - 1016 with pass 1234 On Sun, Nov 9, 2008 at 3:11 PM, <wchao@yahoo.com> wrote:
OK, I retrieved the latest trunk and compiled and now I am having different problems. I noticed the configuration files changed somewhat, but I tried to carry over my configuration from version 1.0.1. It wasn't too hard, but I may have messed some things up.
In any case, here is what is happening now:
* I can make outbound calls from my snom 320 (configured to register on extension 1001 on Freeswitch). I can hang up my snom 320 phone and the other side (an external POTS line) will also get the signal to hang up and does so properly. However, if I hang up the other side first (the external POTS line), my snom 320 phone waits on the line forever -- it seems it's not receiving a hangup. This is the reverse of the problem I had before!
* I can receive inbound calls to the IVR, but not to my extension (1001, the snom 320 phone). Here is what the Freeswitch log says:
2008-11-09 15:59:58 [INFO] mod_dialplan_xml.c:233 dialplan_hunt() Processing 9172388084->2675379325 in context public 2008-11-09 15:59:58 [NOTICE] switch_ivr.c:1116 switch_ivr_session_transfer() Transfer sofia/internal/ 9172388084@64.115.128.6:5060 to XML[2675379325@default] 2008-11-09 15:59:58 [INFO] mod_dialplan_xml.c:233 dialplan_hunt() Processing 9172388084->2675379325 in context default 2008-11-09 15:59:59 [NOTICE] switch_ivr.c:1116 switch_ivr_session_transfer() Transfer sofia/internal/ 9172388084@64.115.128.6:5060 to XML[1001@default] 2008-11-09 15:59:59 [INFO] mod_dialplan_xml.c:233 dialplan_hunt() Processing 9172388084->1001 in context default 2008-11-09 15:59:59 [INFO] switch_ivr_async.c:1536 switch_ivr_bind_dtmf_meta_session() Bound B-Leg: 1 execute_extension::dx XML features 2008-11-09 15:59:59 [INFO] switch_ivr_async.c:1536 switch_ivr_bind_dtmf_meta_session() Bound B-Leg: 2 record_session::/usr/local/freeswitch/recordings/9172388084.2008-11-09-15-59-59.wav 2008-11-09 15:59:59 [INFO] switch_ivr_async.c:1536 switch_ivr_bind_dtmf_meta_session() Bound B-Leg: 3 execute_extension::cf XML features 2008-11-09 16:00:00 [NOTICE] switch_channel.c:551 switch_channel_set_name() New Channel sofia/internal/1001@192.168.216.104:2051;line=4lp4nzfu [ebe41989-0c8c-4cc6-8e2d-20c56907385f] 2008-11-09 16:00:00 [NOTICE] sofia.c:2784 sofia_handle_sip_i_state() Hangup sofia/internal/1001@192.168.216.104:2051;line=4lp4nzfu [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE] 2008-11-09 16:00:00 [ERR] switch_ivr_originate.c:1064 switch_ivr_originate() Cannot create outgoing channel of type [user] cause: [NORMAL_TEMPORARY_FAILURE] 2008-11-09 16:00:00 [INFO] mod_dptools.c:1848 audio_bridge_function() Originate Failed. Cause: NORMAL_TEMPORARY_FAILURE 2008-11-09 16:00:00 [NOTICE] switch_core_session.c:927 switch_core_session_thread() Session 4 (sofia/internal/1001@192.168.216.104:2051;line=4lp4nzfu) Ended 2008-11-09 16:00:00 [NOTICE] switch_core_session.c:929 switch_core_session_thread() Close Channel sofia/internal/1001@192.168.216.104:2051;line=4lp4nzfu [CS_HANGUP]
Do you think I migrated the configuration settings incorrectly, or do you think this might be a bug in the trunk version of Freeswitch?
Wellie
On Mon, 3 Nov 2008, Anthony Minessale wrote:
Date: Mon, 3 Nov 2008 11:39:51 -0600
From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
can you try latest trunk. I added a way to save the string into sofia_private so even after it's too late to get session you can get the name from there instead.
On Sun, Nov 2, 2008 at 11:40 PM, Wellie Chao <wchao@yahoo.com> wrote: I added some debug code and determined that session is null in sofia_reg.c in the sofia_reg_handle_sip_r_challenge function, which is called by sofia_event_callback in sofia.c. I added further debug code and found that sofia_event_callback only sets session if sofia_private->uuid exists. The strange thing is that during the call setup for a call from Metaswitch to Freeswitch (which is unauthenticated, remember), sofia_private->uuid exists and is a valid call ID, and session is also set to a valid value, but when I hang up from the Freeswitch side, sofia_private->uuid is null in that particular call to sofia_event_callback (and thus session is obviously left null). On the call setup, there are two legs (Metaswitch to Freeswitch, then Freeswitch to the extension). The call hangup is being performed by the extension. The session initiated by Metaswitch is unauthenticated, as I mentioned.
I can look into this further, but I wanted to see if you had any quick pointers before delving in more deeply.
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 10:16:25 -0500
From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
Yes i mean add it to the dial string inside the {} it only will work if the channel with the variable set is tied to the FS session obj.
sofia_reg.c 1122 is where it all happens so if session is null there the var code won't work.
you can add some debug code there and try to figure out what's wrong.
On Fri, Oct 31, 2008 at 10:06 AM, Wellie Chao <wchao@yahoo.com> wrote: I tried the following in conf/dialplan/extensions/7_inbound.xml:
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
Also tried the following in conf/dialplan/public.xml:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="export" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
Neither helped. When you say add it to the dial string directly that calls it, I'm not sure what you mean (I know the general format of {var_name=var_value}, so that's not my question). Do you mean add it in front of the 1001 as the target of the transfer?
By the way, hangup DOES work properly if I create another gateway and name it 64.115.128.6. However, I'd love to get it working without having to create a duplicate gateway with a non-intuitive name. It's definitely a lot better than nothing to do it that way, but I'd prefer to have it work with the sip_use_gateway scheme you mention. I'm assuming I'm just doing something wrong with how sip_use_gateway should be specified in the XML configuration files. Can you tell what I am doing wrong?
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 09:49:18 -0500
From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
try using "export" instead of "set" or add it to the dial string directly that calls it
{sip_use_gateway=broadview}sofia/.......
On Fri, Oct 31, 2008 at 9:42 AM, Wellie Chao <wchao@yahoo.com> wrote: Where do you recommend I put the sip_use_gateway=broadview action?
I have tried in the conf/dialplan/public.xml like so:
<extension name="public_did_broadview"> <condition field="destination_number" expression="^(12675379324|2675379324|12675379325|2675379325)$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="$1 XML default"/> </condition> </extension>
I've also tried in conf/dialplan/extensions/7_inbound.xml (a file I created that is pulled in via an include pre-processor directive):
<extension name="broadview_inbound_9325"> <condition field="destination_number" expression="^12675379325|2675379325$"> <action application="set" data="sip_use_gateway=broadview"/> <action application="transfer" data="1001"/> </condition> </extension>
I have a gateway named broadview in conf/sip_profiles/external. In both cases, I still get the following error on the Freeswitch console:
2008-10-31 10:37:28 [ERR] sofia_reg.c:1089 sofia_reg_handle_sip_r_challenge() No Matching gateway found
On Fri, 31 Oct 2008, Anthony Minessale wrote:
Date: Fri, 31 Oct 2008 08:04:23 -0500 From: Anthony Minessale <anthony.minessale@gmail.com> Reply-To: freeswitch-users@lists.freeswitch.org To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Hangup problem/SIP BYE lacking authentication
See what they said in the challenge?
WWW-Authenticate: Digest realm="SipLocal",nonce="3e952db60fb8",stale=false,algorithm=MD5,qop="auth"
Since this is a spontaneous challenge (which i think is somewhat silly since it lets you talk on the phone for 40 minutes then makes you authenticate to hangup but *shrug*) FS does not know which gateway to use for credentials.
The realm they sent was SipLocal so FS is looking in its configuration for a gateway with that name. The 2nd thing it tries is the host from the To: header (64.115.128.6). if there was a gateway with either of those names, it would find it.
So try naming your gateway SipLocal or 64.115.128.6 or you can try setting the variable sip_use_gateway=<whatever> on the channel which can give it a hint which gateway to use.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
participants (4)
-
Anthony Minessale
-
Brian West
-
wchao@yahoo.com
-
Wellie Chao