Summary: | ASTERISK-24499: Need more explicit debug when PJSIP dialstring is invalid | ||
Reporter: | Rusty Newton (rnewton) | Labels: | |
Date Opened: | 2014-11-05 09:44:50.000-0600 | Date Closed: | 2015-02-21 12:52:39.000-0600 |
Priority: | Trivial | Regression? | |
Status: | Closed/Complete | Components: | Applications/app_dial Resources/res_pjsip |
Versions: | SVN 12.6.1 13.0.0 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I forgot how to form a PJSIP dialstring and wrote the one below:
{noformat} exten => _91NXXXXXXXXX,1,Dial(PJSIP/mytrunk_endpoint/${EXTEN:1}) {noformat} Where as I should have written: {noformat} exten => _91NXXXXXXXXX,1,Dial(PJSIP/${EXTEN:1}@mytrunk_endpoint) {noformat} The issue is console logger output didn't help me figure out what I did wrong. With all log channels and verbosity up you see the following: {noformat} [Nov 5 09:31:38] DEBUG[3871]: chan_pjsip.c:2118 pbx_start_incoming_request: Started PBX on new PJSIP channel PJSIP/6001-00000000 [Nov 5 09:31:38] DEBUG[3991][C-00000000]: pbx.c:3723 ast_str_retrieve_variable: Result of 'EXTEN' is '912561234567' [Nov 5 09:31:38] DEBUG[3991][C-00000000]: pbx.c:4921 pbx_extension_helper: Launching 'Dial' -- Executing [912561234567@from-internal:1] Dial("PJSIP/6001-00000000", "PJSIP/mytrunk_endpoint/12561234567") in new stack [Nov 5 09:31:38] WARNING[3991][C-00000000]: app_dial.c:2431 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination) == Everyone is busy/congested at this time (1:0/0/1) [Nov 5 09:31:38] DEBUG[3991][C-00000000]: app_dial.c:3090 dial_exec_full: Exiting with DIALSTATUS=CHANUNAVAIL. -- Auto fallthrough, channel 'PJSIP/6001-00000000' status is 'CHANUNAVAIL' [Nov 5 09:31:38] DEBUG[3871]: res_pjsip_session.c:1852 handle_outgoing_response: Method is INVITE, Response is 503 Service Unavailable {noformat} I'm told Asterisk can't create a channel of type PJSIP and I can see that a 503 goes out to the originating channel. Fortunately I realized after this what I did wrong as I've done this a few times before, however it could be frustrating for those moving from chan_sip to res_pjsip. I'm wondering if there is a way we could get a more explicit message to help out the user. | ||
Comments: | By: Friendly Automation (friendly-automation) 2016-12-19 23:27:14.023-0600 Change 4628 merged by zuul: res_pjsip: Add/update ERROR msg if invalid URI. [https://gerrit.asterisk.org/4628|https://gerrit.asterisk.org/4628] By: Friendly Automation (friendly-automation) 2016-12-20 05:30:36.951-0600 Change 4626 merged by Joshua Colp: res_pjsip: Add/update ERROR msg if invalid URI. [https://gerrit.asterisk.org/4626|https://gerrit.asterisk.org/4626] By: Friendly Automation (friendly-automation) 2016-12-20 05:31:02.322-0600 Change 4624 merged by Joshua Colp: res_pjsip: Add/update ERROR msg if invalid URI. [https://gerrit.asterisk.org/4624|https://gerrit.asterisk.org/4624] By: Friendly Automation (friendly-automation) 2016-12-20 05:31:16.861-0600 Change 4622 merged by Joshua Colp: res_pjsip: Add/update ERROR msg if invalid URI. [https://gerrit.asterisk.org/4622|https://gerrit.asterisk.org/4622] |