SOLVED Inbound Routes issue

Status
Not open for further replies.

albert-g

Member
Aug 11, 2020
83
2
8
44
Hello,
I installed and configured FusionPBX (v. 4.5.15) all is undertandable for me and all is working as expected but one thing is that I have one siptrunk number and 2 numbers, and want to point one number to one department and second one to second department. But when I creating "Inbound Routes" with numbers (!not siptrunk number) it is not working and showing busy, but when I creating Inbound Route with siptrunk number it is working (actually all 3 numbers starts working). I am a newbie in VOIP, please point me to which direction see (maybe it is related to my SIP operator).

P.S. If need more details please let me know.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
In the gateway record, under the "Advanced" button, you may need to set the Extension field to "auto_to_user". Screenshot below:

Screenshot from 2020-08-12 09-37-58.png
 
  • Like
Reactions: albert-g

albert-g

Member
Aug 11, 2020
83
2
8
44
Thank for response,
I added this line but it is showing busy,
Let me show you what I did, in Destinations I have added route with one of numbers (not siptrunk)

1597222867707.png
If I also adding with this route, one more route with siptrunk number, it is working, and no matter another number routes created or not.
Maybe I am missing something, please advise.
 

albert-g

Member
Aug 11, 2020
83
2
8
44
One more thing, I called and tailing (tail -f /var/log/freeswitch/freeswitch.log) the log file (but I dont have such experience and cant retreive what the problem), and see some output, the call reaching the server, let me attach this log part (I change some confidential IP address and numbers. sorry for that)
 

Attachments

  • log.txt
    16.5 KB · Views: 7
Last edited:

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
Can you get a packet capture of the inbound call. I would love to know where "THE_TARGET_NUMBER_SHORT_VERSION" is coming from.
 
  • Like
Reactions: albert-g

albert-g

Member
Aug 11, 2020
83
2
8
44
I used sngrep and see this result when try to call (if there is another effective way please let me know)

[ ] 4 INVITE anonymous@anonymous.inval 048****570@10.7.1.163 4 91.121.129.23:5060 192.168.11.204:5080 BUSY

P.S. THE_TARGET_NUMBER_SHORT_VERSION that i masked on previus log is this 048****570
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
Ok, what is the difference between THE_TARGET_NUMBER and THE_TARGET_NUMBER_SHORT_VERSION?

The following line in the log is showing a regex fail where I probably would have expected to see a pass:

Code:
b2147af5-89b3-4a7b-ae30-68cd8a8e9dcd Dialplan: sofia/external/anonymous@anonymous.invalid Regex (FAIL) [THE_TARGET_NUMBER] destination_number(THE_TARGET_NUMBER_SHORT_VERSION) =~ /^(THE_TARGET_NUMBER)$/ break=on-false
 
  • Like
Reactions: albert-g

albert-g

Member
Aug 11, 2020
83
2
8
44
Let me not mask and show how it looks like originally, inbound route is the following, and also I attached original log, without masking anything, to avoid confusion.

1597315502576.png
1597315544582.png
 

Attachments

  • log.txt
    16.4 KB · Views: 2

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
OK, so your only destination in the public context is 0033486571570 but the inbound destination number that is trying to be matched is 0033972406315.

The clue to the actual inbound number is in the following log line:
Code:
7dfe19f3-995f-4ddb-aedb-4ac21d56961a 2020-08-13 12:43:07.720851 [INFO] mod_dialplan_xml.c:637 Processing Anonymous <anonymous>->0033972406315 in context public

Not sure where or why the following is being set, I don't see this on my test boxes, but then the Fusion Master is rapidly changing:
Code:
7dfe19f3-995f-4ddb-aedb-4ac21d56961a Dialplan: sofia/external/anonymous@anonymous.invalid Action set(caller_destination=${sip_to_user}) INLINE

Mine looks more like:
Code:
cb8681f5-237c-42bd-9dac-54f889e13d74 Dialplan: sofia/external/xxxxxx44236@my.provider.co.uk Action set(caller_destination=${destination_number}) INLINE
 
  • Like
Reactions: albert-g

albert-g

Member
Aug 11, 2020
83
2
8
44
Please note that this 0033972406315 number is my siptrunk number.
Also I found one place in my Inbound routes -> caller-details
1597322825794.png
1597322909132.png

Tried to change it to like this ( caller_destination=${destination_number} ), but it still showing busy, and the log
af0e5554-0479-42c5-9351-c93de83d1e42 Dialplan: sofia/external/anonymous@anonymous.invalid Regex (FAIL) [0033486571570] destination_number(0033972406315) =~ /^(0033486571570)$/ break=on-false

Looks like this siptrunk number automatically setting to destination_number in some place?
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
Yes, that is normally what happens when you do not have auto_to_user set in the gateway record.

I know you did try to set this, but may be the change did not take effect. Your could try stopping the gateway, then in Status->SIP Status do a Flush Cache and a Reload XML. See if that makes a difference for you.
 
  • Like
Reactions: albert-g

albert-g

Member
Aug 11, 2020
83
2
8
44
Looks like now it make effect still showing busy but log was changed:

Code:
285d9ea5-9db2-4e68-b2d6-6651cfd96881 Dialplan: sofia/external/anonymous@anonymous.invalid Action set(caller_destination=${sip_to_user}) INLINE
285d9ea5-9db2-4e68-b2d6-6651cfd96881 EXECUTE [depth=0] sofia/external/anonymous@anonymous.invalid set(caller_destination=0486571570)
285d9ea5-9db2-4e68-b2d6-6651cfd96881 2020-08-13 15:25:32.909462 [DEBUG] mod_dptools.c:1672 SET sofia/external/anonymous@anonymous.invalid [caller_destination]=[0486571570]
285d9ea5-9db2-4e68-b2d6-6651cfd96881 Dialplan: sofia/external/anonymous@anonymous.invalid Action set(caller_id_name=${caller_id_name}) INLINE
285d9ea5-9db2-4e68-b2d6-6651cfd96881 EXECUTE [depth=0] sofia/external/anonymous@anonymous.invalid set(caller_id_name=Anonymous)
285d9ea5-9db2-4e68-b2d6-6651cfd96881 2020-08-13 15:25:32.909462 [DEBUG] mod_dptools.c:1672 SET sofia/external/anonymous@anonymous.invalid [caller_id_name]=[Anonymous]
285d9ea5-9db2-4e68-b2d6-6651cfd96881 Dialplan: sofia/external/anonymous@anonymous.invalid Action set(caller_id_number=${caller_id_number})
285d9ea5-9db2-4e68-b2d6-6651cfd96881 Dialplan: sofia/external/anonymous@anonymous.invalid parsing [public->0033486571570] continue=false
285d9ea5-9db2-4e68-b2d6-6651cfd96881 Dialplan: sofia/external/anonymous@anonymous.invalid Regex (FAIL) [0033486571570] destination_number(0486571570) =~ /^(0033486571570)$/ break=on-false
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,414
376
83
So now inbound 0486571570 is being tested against 0033486571570. So your destination should probably be 0486571570. I hope that makes sense.
 
  • Like
Reactions: albert-g

albert-g

Member
Aug 11, 2020
83
2
8
44
Great, now it is finally working as expected.
Thank you so much, I spent a few days, until you point me in right direction, really appreciate.
 
Status
Not open for further replies.