We are testing on a private non-internet connected network.
I have always be able to anonymously connect to the demo for testing Internally on the LAN
without having to authenticate.
This is a handy test and I wish to continue using this.
Asterisk 18.1 /pjsip has some kind of problem where this no longer works.
If I send an INVITE to IP address it does not work.
It always used to in older versions of asterisk and chan_sip.
I have to now send an INVITE to “s@X.X.X.X” port 5060 instead of only the IP address.
This is extremely inconvenient in our use case.
If I try to make a call to just the IP address I get:
localhostCLI> pjsip show history
No. Timestamp (Dir) Address SIP Message
===== ========== ============================== ===================================
localhostCLI> pjsip show history
No. Timestamp (Dir) Address SIP Message
===== ========== ============================== ===================================
00000 1606350838 * <== 10.73.73.134:5060 INVITE sip:10.73.73.133 SIP/2.0
00001 1606350838 * ==> 10.73.73.134:5060 SIP/2.0 484 Address Incomplete
00002 1606350838 * <== 10.73.73.134:5060 ACK sip:10.73.73.133 SIP/2.0
But if I dial “s@IPaddress” I get the demo as would also be expected with just the IP.
Single endoint/context [Public] and demo.
there is only one s and it is in demo.
I have been doing this for many years and up to Asterisk Version 16.
It stopped working just now with a clean install of Asterisk 18.1
This is our first time installing V18.
No clues at all but pasting those two lines ahead of:
Demo makes it work.
And I have no idea why.
Or why it does not work without.
You seem to be onto something here but I am in the dark and not sure what it is doing.
exten = _!.,1, verbose(1,[{EXTEN}@{CONTEXT}])
same = n, hangup()
;
;
exten => s,1,Wait(1) ; Wait a second, just for fun
exten => s,n,Answer() ; Answer the line
exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
exten => s,n(restart),BackGround(demo-congrats) ; Play a congratulatory message
exten => s,n(instruct),BackGround(demo-instruct) ; Play some instructions
exten => s,n,WaitExten() ; Wait for an extension to be dialed.
== Setting global variable ‘SIPDOMAIN’ to ‘10.73.73.133’
– Executing [s@public:1] Wait(“PJSIP/anonymous-00000003”, “1”) in new stack
– Executing [s@public:2] Answer(“PJSIP/anonymous-00000003”, “”) in new stack
> 0x7f43980414f0 – Strict RTP learning after remote address set to: 10.73.73.134:2228
> 0x7f43980414f0 – Strict RTP switching to RTP target address 10.73.73.134:2228 as source
– Executing [s@public:3] Set(“PJSIP/anonymous-00000003”, “TIMEOUT(digit)=5”) in new stack
– Digit timeout set to 5.000
– Executing [s@public:4] Set(“PJSIP/anonymous-00000003”, “TIMEOUT(response)=10”) in new stack
– Response timeout set to 10.000
– Executing [s@public:5] BackGround(“PJSIP/anonymous-00000003”, “demo-congrats”) in new stack
– <PJSIP/anonymous-00000003> Playing ‘demo-congrats.ulaw’ (language ‘en’)
== Spawn extension (public, s, 5) exited non-zero on ‘PJSIP/anonymous-00000003’
– Executing [h@public:1] Verbose(“PJSIP/anonymous-00000003”, “1,[h@public]”) in new stack
[h@public]
– Executing [h@public:2] Hangup(“PJSIP/anonymous-00000003”, “”) in new stack
So the wildcard works but the s extension does not work at all and I can;t find any further info or answers
as to why it is not working in pjsip/Asterisk 18.1
Might be time to file a bug report.
Because I think it should work and have not found any solid info as to any reason that it should not work.
I’m still running ‘17’ so I can’t cobble up a relevant test.
My intent with the ‘_!.’ snippet was for you to try it as the only steps in the context – just to make sure you were really receiving a ‘s’ as the extension.
I have no clue why adding it to the context makes your other stuff work. From your log, it doesn’t look like it is executed until it catches the hangup.
Yes makes absolutely no sense.
And does not work if taken out and nothing is logged!
Also the Polycom phone does something I have never seen before.
When you hit dial it just gives you another dialtone.
It does not try to dial not does it get rejected in any way.
Nothing is logged.
I included some info on the packet capture when this happens above.
Apparently I’m the only one out there using this feature.
Still looks like I need to file a bug report on it.
Yes, I am configuring the phone to dial by IP address.
This is for testing.
It has always worked on older versions of Asterisk with chan_sip.
Not working now and I don’t see any reason why it should not.
Equally confusing is that adding the two line shown above cause it to work
But really should not. as the next command in sequence is Hangup.
But it could be that “same = n, hangup()”
Is not supposed to be in there literal like he typed it.
But so many new things that are different with pjsip I have no idea of knowing if that is true or not.
All I was saying is that the Hangup does not execute.
And probably because It was not supposed to be entered literally the way the other person commented
with “same = n, hangup()”
When I think they meant something like
exten = _!.,n,Hangup
Instead of:
same = n, hangup()
The point of this whole post is that “s” s extension is NOT working
when the system is dialed by IP.
What kind of phone do you have?
I’m testing with Polycom.