Solved All rules ignored for DIDs from same trunk.

Status
Not open for further replies.

AGidi

Gold Partner
Basic Certified
Joined
Jun 30, 2017
Messages
96
Reaction score
20
Hello 3CX gurus

Im puzzled with this issue and would appreciate your comments , ideas or suggestions.

We have a Netelip Sip trunk with 3 DIDs at the moment.
The trunk asks for the Main Trunk No..
We set it up, on its main page with the correct Routes calls to: for that specific DID
Then we set up in inbound rules the rules for the other 2 DIDs.

When a call comes in, regardless of the DID, it is treated as the Main Trunk No.

We watched the log and we see the call coming and the first logic we see taken is the hourly rule.
It seems to be ignoring the DID.
It just checks the hour
01/16/2018 5:57:45 PM - [CM503012]: Inbound office hours rule (unnamed) for 10001 forwards to DN:802

That "unnamed rule is the one setup in the trunk.

Why can't we have rules for the rest of the DIDs?
please advise , all comments and opinions are welcomed.
 
You must make sure that the format i which you have entered the DIDs in the SIP Trunk settings match exactly the format your Provider is sending them on incoming INVITE messages in the "To" header.

To check this, what you can do is enable Verbose Logging from the Activity Log settings, restart the services once, then make an incoming call. Hang up, go back to the Activity Log and you should see a whole SIP message there.
If you haven't see one before it may be a bit daunting, but take it line by line. Look for the line that starts with "To:" and you should see the DID number there that you dialed. That is how you must enter the number in the "DIDs" tab of your SIP Trunk settings.
 
  • Like
Reactions: AGidi
When a call is received, 3CX looks for certain headers in the INVITE that it can use to route the call to the desired destination, with the desired destination possibly changing as a result of time. In your case, it is checking to see if the call should be routed according to office hours or out of office hours, and when the call you referenced arrived, it was in office hours and was routed to what I assume to be a system extension at 802 (ring group or digital receptionist).

In the SIP trunk, you had to enter the DIDs and the format needs to be correct or if unknown you might be able to use a wildcard (*). You also need to know examine an Invite coming from your provider and see how the message is structured so that the inbound parameters (also in the trunk settings) can be made to work with your provider. This is easily accomplished using the capture function and then examining same using wireshark.

Finally, you need to create the inbound rules for the DID so that they get to the desired destination
 
  • Like
Reactions: AGidi and NickD_3CX
I appreciate the replies.

Im seing the following, im blanking some info.
From bottom to top I see the PBX sending the call to 802, Before checking for the DID.
(users, numbers and IPs have been changed)

The DID we need to catch is 8717200406
Im calling from 0052871275555
What i find confusing is the from line:1001 and sends it to 802 instead of using the DID.

all ideas are welcomed.


Code:
01/17/2018 10:40:20 AM - [Flow] Target endpoint for 802 is Ivr:802
01/17/2018 10:40:20 AM - [CM503010]: Call(C:114): Making route(s) from Line:10001<<8717275555 to <sip:[email protected]:5060>
01/17/2018 10:40:20 AM - [CM505003]: Provider:[Netelip DIDs y Salientes] Device info: Device Not Identified: User Agent not matched; Capabilities:[reinvite, replaces, able-no-sdp, recvonly] UserAgent: [Netelip] PBX contact: [sip:[email protected]:5060]
01/17/2018 10:40:20 AM - [CM500002]: Call(C:114): Info on incoming INVITE from Line:10001<<8717275555:
Invite-IN Recv Req INVITE from 194.140.125.81:5060 tid=182cdd53 [email protected]:5060:
INVITE sip:[email protected]:5060;rinstance=eaecebfc6d927904 SIP/2.0
Via: SIP/2.0/UDP 194.140.125.81:5060;branch=z9hG4bK182cdd53;rport=5060
Max-Forwards: 70
Contact: <sip:[email protected]:5060>
To: <sip:[email protected]:5060;rinstance=eaecebfc6d927904>
From: "00528717275555" <sip:[email protected]>;tag=as21262973
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Content-Type: application/sdp
Date: Wed, 17 Jan 2018 16:40:19 GMT
Supported: replaces, timer
User-Agent: Netelip
X-Called-DDI: 528717200406
Diversion: <sip:[email protected]>;reason=unconditional
Content-Length: 518

v=0
o=root 784663244 784663244 IN IP4 194.140.125.81
s=Netelip Media Gateway
c=IN IP4 194.140.125.81
b=CT:384
t=0 0
m=audio 27918 RTP/AVP 8 3 97 0 18 4 9 101
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
m=video 22772 RTP/AVP 34
a=rtpmap:34 H263/90000
a=sendrecv
01/17/2018 10:40:20 AM - [CM503001]: Call(C:114): Incoming call from Line:10001<<8717275555 to <sip:[email protected]:5060>
01/17/2018 10:40:20 AM - Line limit check: Current # of calls for line Lc:10001(@Netelip DIDs y Salientes[<sip:[email protected]:5060>]) is 1; limit is 8
01/17/2018 10:40:20 AM - [CM503012]: Inbound office hours rule (unnamed) for 10001 forwards to DN:802
01/17/2018 10:40:20 AM - [Flow] Looking for inbound target: called=0718689032; caller="0052871275555" <sip:8717275555@:5060>
 
I'm assuming you created an inbound rule for this using the DID correct? If this is not the main DID did you put an * in front of the number? The order of the inbound rules need adjusting?
 

Attachments

  • example.PNG
    example.PNG
    17 KB · Views: 33
I did create the inbound rule.
What does the * do? im confused on that.
About the rule order, since it is an exact match, for every DID i have, im asuming the order is not important. is this correct?

This is my inbound
https://screencast.com/t/2oKnys06yVf5

thanks
 
The order does matter, the * tells the PBX to match all the numbers after the *.

If you follow my screenshot you should be working. Order should be Main DID, then all other DID's with * in front of number downward. It's real easy to fix go into the trunk/DID and edit the other DID's with * in front.
 
  • Like
Reactions: AGidi
Brian, I appreciate the help. Its now working It was not a 3CX issue, my provider Netelip does not do e164 by default. We enabled it to the DID on the netelip panel and it started routing correctly.
odd.

I really appreciate the prompt replies. They are very valuable when one is frustrated with a problem. You are very kind.

thanks!
 
Cool glad you got it sorted out.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,880
Messages
589,533
Members
164,736
Latest member
david_9daa