Sunr1ses / google-voice-sipsorcery-dialplans

Automatically exported from code.google.com/p/google-voice-sipsorcery-dialplans
1 stars 0 forks source link

(complex-cnam) Dialplan doesn't recognize "%40" as "@" #82

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Pretty self-explanatory. My new SIP client sends "@" as "%40", causing the 
complex-CNAM dialplan to flip out. Is there a quick fix in ruby that'll replace 
"%40" with "@"?

Original issue reported on code.google.com by hmmwhats...@gmail.com on 19 Jul 2010 at 2:30

GoogleCodeExporter commented 9 years ago
I need to leave this one to our resident scripting expert.

Original comment by easter...@gmail.com on 19 Jul 2010 at 2:53

GoogleCodeExporter commented 9 years ago
It must be something else, because I do have %xx -> char conversion in the 
dialplan:

@num.gsub!(/%(..)/) {$1.to_i(16).chr} # Convert %hh into ASCII

Probably it's '%' char itself... I need to see Console log of the failed call.

Original comment by mte...@gmail.com on 19 Jul 2010 at 3:01

GoogleCodeExporter commented 9 years ago
DialPlan 03:04:32:637 sip1: New call from udp:75.100.187.109:64887 successfully 
authenticated by digest.
DialPlan 03:04:32:652 sip1: Using dialplan GV-SIP Sorcery-Complex-CNAM for Out 
call to sip:904%40mouselike.org@sip.sipsorcery.com:5060.
NewCall 03:04:32:668 sip1: Executing script dial plan for call to 
904%40mouselike.org.
DialPlan 03:04:32:777 sip1: ** Call from 
<sip:ssuser@sip.sipsorcery.com:5060>;tag=b629ce02 to 904%40mouselike.org **
DialPlan 03:04:32:777 sip1: Local time: 07/18/2010 21:04
DialPlan 03:04:32:840 sip1: UAS call failed with a response status of 603 and 
Wrong number, check & dial again.
DialPlan 03:04:32:871 sip1: Dial plan execution completed with normal clearing.

The number was 904@mouselike.org. adding "sip:" to the front of the string lets 
the call complete just fine.

Original comment by hmmwhats...@gmail.com on 19 Jul 2010 at 3:06

GoogleCodeExporter commented 9 years ago
Oh, I see. The problem is that the SIP client sends TWO '@' signs in the string:

sip:904%40mouselike.org@sip.sipsorcery.com:5060
       ^^^             ^

sip.sipsorcery.com is "our" domain (see Domains array) and we treat it as 
number dialing instead of URI dialing. I believe it's the SIP client's fault. 
Anyway, I'll check to see if it's possible to fix it.

Original comment by mte...@gmail.com on 19 Jul 2010 at 3:17

GoogleCodeExporter commented 9 years ago
I'm trying to duplicate the problem using Bria but apparently they have 
built-in workaround to avoid issues like this. Could you please name the SIP 
client you're having problems with?

Original comment by mte...@gmail.com on 19 Jul 2010 at 3:41

GoogleCodeExporter commented 9 years ago
And ... are you using complex or simple dialplan? The thing is that simple 
dialplan does not support URI dialing unless the URI is entered in Speeddial 
table.

Original comment by mte...@gmail.com on 19 Jul 2010 at 3:47

GoogleCodeExporter commented 9 years ago
Okay, seems like I have nailed it down, update your Complex dialplan with CNAM.

Original comment by mte...@gmail.com on 19 Jul 2010 at 6:10

GoogleCodeExporter commented 9 years ago
Ah, thank you! BTW, the client was the 3CX Phone SIP client. It's designed to 
work with an SIP PBX, but it can be linked to SIP Sorcery. I was using X-lite 4 
Beta (a free version of Bria), but it expired. I was also using NinjaLite, but 
there were some problems with the UI. 

Original comment by hmmwhats...@gmail.com on 19 Jul 2010 at 9:38

GoogleCodeExporter commented 9 years ago
You're welcome! Actually, I managed to duplicate the issue with Bria but it's 
good to know which SIP client is doing what.

BTW, when you prepend URI with sip: your softphone communicates with the server 
@URI directly (bypassing Sipsorcery and the dialplan). That's why it worked.

Original comment by mte...@gmail.com on 20 Jul 2010 at 4:46