Allstate Computers Posted April 4, 2012 Report Share Posted April 4, 2012 We're running into an issue with a client's system - running snomONE Blue 4.3.0. We have 6 numbers for the domain and they are assigned as follows: To protect the innocent I've changed the names and numbers (111)111-1111 - Hunt Group 300 - Main Number (222)222-2222 - Hunt Group 301 - Back Line (333)333-3333 - Hunt Group 302 - Service Department (444)444-4444 - Hunt Group 303 - Shipping Department (555)555-5555 - Extension 202 - Service Manager (666)666-6666 - Extension 203 - Bookkeeper For the trunk I have the 'send to extension' field set to: !([0-9]*)!\1!t!300 No matter what I do all of the calls go to Hunt Group 300, but it's really weird because if I call (555)555-5555 it says 'Service Manager (202)' in the Call Log but it routes the call to the Hunt Group instead. The main number (111)111-1111 is the username for the trunk and the other numbers are aliases. My proxy server is set to make the alias the To: field in the SIP header. If I call (555)555-5555 from my cell phone (999)999-9999 the INVITE looks like this: INVITE sip:1111111111@{customersIP}:5060 SIP/2.0 Via: SIP/2.0/UDP {myProxyIP}:5060;rport;branch=z9hG4bK0dd8e0b61501b567ea47-dbf76dba-f7dfd81f Via: SIP/2.0/UDP {sipProviderIP}:5060;branch=z9hG4bK1e4b27fe;rport=5060 From: "9999999999" {sip:9999999999@sipProviderIP}>;tag=as1addfed2 To: <sip:5555555555@{myProxyIP}:5060> Contact: {sip:9999999999@208.115.60.141:5060} Call-ID: 49293b426af17c514b75865947d2976f@{sipProviderIP} CSeq: 102 INVITE User-Agent: Asterisk PBX Max-Forwards: 69 Date: Wed, 04 Apr 2012 01:42:56 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces Record-Route: <sip:{myProxyIP}:5060;lr> Content-Type: application/sdp Content-Length: 332 I'm at a loss, any assistance would be greatly appreciated. Thanks, Brian Quote Link to comment Share on other sites More sharing options...
pbx support Posted April 4, 2012 Report Share Posted April 4, 2012 If the country code is set, then the PBX formats the number and then compares it with the pattern. Try 1([0-9]*)!\1!t!300 If you see the PBX log(Log general at level 9), generally you will see what the formatted To is. Quote Link to comment Share on other sites More sharing options...
Allstate Computers Posted April 4, 2012 Author Report Share Posted April 4, 2012 I tried the 1 just for grins and it made no difference. The number in the To: field is just the 10 digit number, there is no 1 prepended to it. Here is the actual message from the log: [8] 2012/04/04 09:54:49: Incoming call: Request URI sip:1111111111@{customersIP}:5060, To is <sip:5555555555@{customersIP}:5060> [8] 2012/04/04 09:54:49: Set the To domain based on To user 300@{customersDomain} What is driving me in circles is if you look at the call log it says that the call went to that extension, but it doesn't it goes to the hunt group. Quote Link to comment Share on other sites More sharing options...
pbx support Posted April 4, 2012 Report Share Posted April 4, 2012 For some reason, the match is failing and the call is always going to the default destination 300. After the log Incoming call: Request URI sip:1111111111@{customersIP}:5060, To is <sip:5555555555@{customersIP}:5060> you should see something like Incoming: formatted To is.... . I wanted to see that. Quote Link to comment Share on other sites More sharing options...
Allstate Computers Posted April 4, 2012 Author Report Share Posted April 4, 2012 There is no line in the log like that. I did a search for 'Incoming' which only came up once for the first line I already mentioned, and I did a search for 'formatted' which yielded no results. Quote Link to comment Share on other sites More sharing options...
pbx support Posted April 5, 2012 Report Share Posted April 5, 2012 It's been logged at level 9 with "Log general events". Maybe you have level 8 turned on? Quote Link to comment Share on other sites More sharing options...
Allstate Computers Posted April 5, 2012 Author Report Share Posted April 5, 2012 Ok, now it's coming up - I had SIP events set to 9, sorry. [9] 2012/04/05 17:04:06: Incoming: formatted To is = <sip:+15555555555@{customersIP}:5060;user=phone> So how do you deal with a +1? Quote Link to comment Share on other sites More sharing options...
pbx support Posted April 6, 2012 Report Share Posted April 6, 2012 Use !(\+[0-9]*)!\1!t!300 for handling +. Quote Link to comment Share on other sites More sharing options...
Allstate Computers Posted April 6, 2012 Author Report Share Posted April 6, 2012 That worked, thanks very much . Brian Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.