irontec / ivozprovider

IVOZ Provider - Multitenant solution for VoIP telephony providers
https://ivoz.irontec.com/
GNU General Public License v3.0
197 stars 79 forks source link

All DDI routing on 1st DDI only #1100

Closed rccess closed 5 years ago

rccess commented 5 years ago

i have 2 DDI configured!

141XXXXX100 >>>> IVR 141XXXXX101 >>>> bob (user)

but both are redirecting to IVR only

since i have 100 DDI on single trunk line ,


Troubleshooting

calling on 141XXXXX100 landing to ivr 141XXXXX101 landing to same ivr (should land to user bob) 141XXXXX100 >>>> IVR 141XXXXX101 >>>> bob (user)

sngrep output of both calls are attached called 141XXXXX100 image

called 141XXXXX101 image

Additional Information

i think we need to restrict DDI in dial plan , if user try any random DDI of 100 sequence of same trunk line in this series shouldn't work until it not assigned to any vpbx user -->

rccess commented 5 years ago

call 1 : 141xxx3812100


root@vdserver.telcob.live:~# ast Asterisk 13.17.0, Copyright (C) 1999 - 2014, Digium, Inc. and others. Created by Mark Spencer markster@digium.com Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details.

========================================================================= Version Art3mis de Asterisk 13.17.0 mantenida por Irontec S.L.

========================================================================= Connected to Asterisk 13.17.0 currently running on vdserver (pid = 12724) vdserver*CLI> core set verbose 25 Console verbose was 47 and is now 25. == Setting global variable 'SIPDOMAIN' to '10.17.118.25'

[b1][b8cb1356] Executing [+911413812100@trunks:1] NoOp("PJSIP/proxytrunks-00000002", "Incoming external call from "" <+919468673014> to +911413812100") in new stack [b1][b8cb1356] Executing [+911413812100@trunks:2] AGI("PJSIP/proxytrunks-00000002", "agi://127.0.0.1:4573/fastagi-runner.php?command=dialplan/trunks") in new stack [b1][b8cb1356] [Trunks.php:79 ] AGI SetVar("PJSIP/proxytrunks-00000002", "CALL_TYPE = external") [b1][b8cb1356] [Trunks.php:87 ] AGI SetVar("PJSIP/proxytrunks-00000002", "__CALL_ID = wFOsYO4ufNudbypK4bidf@zteims") [b1][b8cb1356] [Trunks.php:91 ] AGI SetVar("PJSIP/proxytrunks-00000002", "COMPANYID = 1") [b1][b8cb1356] [Trunks.php:92 ] AGI SetVar("PJSIP/proxytrunks-00000002", "CHANNEL(musicclass) = company1") [b1][b8cb1356] [Trunks.php:93 ] AGI SetVar("PJSIP/proxytrunks-00000002", "CHANNEL(language) = en") [b1][b8cb1356] [ChannelInfo.php:84 ] AGI SetVar("PJSIP/proxytrunks-00000002", "_CALLER = Ddi#1") [b1][b8cb1356] [DdiAction.php:72 ] AGI Notice("PJSIP/proxytrunks-00000002", "Processing DDI with +911413812100 [Ddi#1]") [b1][b8cb1356] [DdiAction.php:139 ] AGI SetVar("PJSIP/proxytrunks-00000002", "CALLERID(name) = s1") [b1][b8cb1356] [IvrAction.php:62 ] AGI Notice("PJSIP/proxytrunks-00000002", "Processing IVR ivr1 [Ivr#1]") -- AGI Script Executing Application: (Read) Options: (PRESSED,/opt/irontec/ivozprovider/storage/ivozprovider_model_locutions.encodedfile/0/2,0,,,6) -- <PJSIP/proxytrunks-00000002> Playing '/opt/irontec/ivozprovider/storage/ivozprovider_model_locutions.encodedfile/0/2.slin' (language 'en') -- User disconnected -- <PJSIP/proxytrunks-00000002>AGI Script agi://127.0.0.1:4573/fastagi-runner.php?command=dialplan/trunks completed, returning 4 == Spawn extension (trunks, +911413812100, 2) exited non-zero on 'PJSIP/proxytrunks-00000002' vdserver*CLI>



call 2 >> 141xxxxx12101


root@vdserver.telcob.live:~# ast Asterisk 13.17.0, Copyright (C) 1999 - 2014, Digium, Inc. and others. Created by Mark Spencer markster@digium.com Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details.

========================================================================= Version Art3mis de Asterisk 13.17.0 mantenida por Irontec S.L.

=========================================================================

Connected to Asterisk 13.17.0 currently running on vdserver (pid = 12724) vdserver*CLI> core set verbose 25 Console verbose was 47 and is now 25. == Setting global variable 'SIPDOMAIN' to '10.17.118.25'

[b1][a73afe58] Executing [+911413812100@trunks:1] NoOp("PJSIP/proxytrunks-00000003", "Incoming external call from "" <+919468673014> to +911413812100") in new stack [b1][a73afe58] Executing [+911413812100@trunks:2] AGI("PJSIP/proxytrunks-00000003", "agi://127.0.0.1:4573/fastagi-runner.php?command=dialplan/trunks") in new stack [b1][a73afe58] [Trunks.php:79 ] AGI SetVar("PJSIP/proxytrunks-00000003", "CALL_TYPE = external") [b1][a73afe58] [Trunks.php:87 ] AGI SetVar("PJSIP/proxytrunks-00000003", "__CALL_ID = g4BSlVUCacHcr5QjtYrTFLVWai0oqC4cagi@zteims") [b1][a73afe58] [Trunks.php:91 ] AGI SetVar("PJSIP/proxytrunks-00000003", "COMPANYID = 1") [b1][a73afe58] [Trunks.php:92 ] AGI SetVar("PJSIP/proxytrunks-00000003", "CHANNEL(musicclass) = company1") [b1][a73afe58] [Trunks.php:93 ] AGI SetVar("PJSIP/proxytrunks-00000003", "CHANNEL(language) = en") [b1][a73afe58] [ChannelInfo.php:84 ] AGI SetVar("PJSIP/proxytrunks-00000003", "_CALLER = Ddi#1") [b1][a73afe58] [DdiAction.php:72 ] AGI Notice("PJSIP/proxytrunks-00000003", "Processing DDI with +911413812100 [Ddi#1]") [b1][a73afe58] [DdiAction.php:139 ] AGI SetVar("PJSIP/proxytrunks-00000003", "CALLERID(name) = s1") [b1][a73afe58] [IvrAction.php:62 ] AGI Notice("PJSIP/proxytrunks-00000003", "Processing IVR ivr1 [Ivr#1]") -- AGI Script Executing Application: (Read) Options: (PRESSED,/opt/irontec/ivozprovider/storage/ivozprovider_model_locutions.encodedfile/0/2,0,,,6) -- <PJSIP/proxytrunks-00000003> Playing '/opt/irontec/ivozprovider/storage/ivozprovider_model_locutions.encodedfile/0/2.slin' (language 'en') -- User disconnected -- <PJSIP/proxytrunks-00000003>AGI Script agi://127.0.0.1:4573/fastagi-runner.php?command=dialplan/trunks completed, returning 4 == Spawn extension (trunks, +911413812100, 2) exited non-zero on 'PJSIP/proxytrunks-00000003' vdserver*CLI>


My Observation in both case call only land on 1st DDI (xxxxxxx100) , even i am calling on 2nd DDI xxxxxx101

Kaian commented 5 years ago

Hi @rccess

Calls are routed in SIP using the Requests URI and not the To: header. It's in the first line of the INVITE and is displayed in blue by sngrep.

Both calls are calling to the same number... And are handled based on that number configuration.

Regards

rccess commented 5 years ago

image

both calls are landing on different DDI but not routed as interface defined

image

Kaian commented 5 years ago

That is the SIP To header, not the SIP URI. Please read the RFCs to know at least how SIP works.