Can't call extensions using an external FreePBX Server and MicroSIP Softphone

Just setting up a FreeBPX Server and I can register the softphones and access voicemail however I cant call the extensions. The network setup is:

FreePBX pbx.somewhere.com <---> Internet <----> Router my.home.com <----> 10.0.0.197 + 10.0.0.223 Softphone

I can register the softphones no problem. If try to call extension to extension it will want me to leave a voicemail. If I turn voice mail off try to call extension to extension it fails in the log as 200: Call (UDP:my.home.com:56133) to extension '*203' rejected because extension not found in context 'from-internal'.

I read that you don’t want to see internal IP’s (10.0.0.*) in your log (not sure how true this is) . So in MicroSIP - Allow IP rewrite = Yes. Then all the internal address become my.home.com addresses. With rewrite turned off there were a lot of 10.0.0.197 addresses but the results were the same.

So with my MicroSIP softphone my account settings are this.

Account Name:            Soth
SIP Server:              pbx.somewhere.com
SIP Proxy: 
Username:                200
Domain:                  pbx.somewhere.com
Login:
Password:                *****
Display Name:
Voicemail Number:
Dialing Prefix:
Dial Plan:
Media Encryption:        Optional
Transport:               UDP
Public Address:          Auto
Register Refresh:        300
Keep Alive:              15
Publish Presence: 
Allow IP Rewrite:        Yes
ICE: 
Disable Session Timers: 

I turned the Asterisk > SIP Settings > SIP Settings [chan_pjsip] > Enable Debug: Yes
and voicemail to Off on both extensions. I then called *203 from the 200 MicroSIP Softphone.

This is the log for Allow IP rewrite == Yes and the rejected error is on line 99:

3	[2022-04-30 18:53:23] VERBOSE[28232] res_pjsip_logger.c: <--- Received SIP request (1153 bytes) from UDP:my.home.com:56133 --->	
4	INVITE sip:*[email protected] SIP/2.0	
5	Via: SIP/2.0/UDP my.home.com:56133;rport;branch=z9hG4bKPj318f6d14d96e488cbc0aa01988d088e9	
6	Max-Forwards: 70	
7	From: <sip:[email protected]>;tag=c9e26f3f3dc248af8ffa3ef31616d42e	
8	To: <sip:*[email protected]>	
9	Contact: <sip:[email protected]:56133;ob>	
10	Call-ID: 1b4eac9f94984e4a824d61048a2144a9	
11	CSeq: 23681 INVITE	
12	Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS	
13	Supported: replaces, 100rel, timer, norefersub	
14	Session-Expires: 1800	
15	Min-SE: 90	
16	User-Agent: MicroSIP/3.20.7	
17	Content-Type: application/sdp	
18	Content-Length: 517	
19		
20	v=0	
21	o=- 3860333603 3860333603 IN IP4 my.home.com	
22	s=pjmedia	
23	b=AS:84	
24	t=0 0	
25	a=X-nat:0	
26	m=audio 4010 RTP/AVP 8 0 101	
27	c=IN IP4 my.home.com	
28	b=TIAS:64000	
29	a=rtcp:4011 IN IP4 my.home.com	
30	a=sendrecv	
31	a=rtpmap:8 PCMA/8000	
32	a=rtpmap:0 PCMU/8000	
33	a=rtpmap:101 telephone-event/8000	
34	a=fmtp:101 0-16	
35	a=ssrc:1214675798 cname:0a134f932b5d2b8d	
36	a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:mZHS9psfbP7aPmyU0XlXcWYWcpZYb5wbA5cejocr	
37	a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:ldY85ewWaOMhUdx/doS3DhindchnpvATJd6t0qG9	
38		
39	[2022-04-30 18:53:23] VERBOSE[28233] res_pjsip_logger.c: <--- Transmitting SIP response (566 bytes) to UDP:my.home.com:56133 --->	
40	SIP/2.0 401 Unauthorized	
41	Via: SIP/2.0/UDP my.home.com:56133;rport=56133;received=my.home.com;branch=z9hG4bKPj318f6d14d96e488cbc0aa01988d088e9	
42	Call-ID: 1b4eac9f94984e4a824d61048a2144a9	
43	From: <sip:[email protected]>;tag=c9e26f3f3dc248af8ffa3ef31616d42e	
44	To: <sip:*[email protected]>;tag=z9hG4bKPj318f6d14d96e488cbc0aa01988d088e9	
45	CSeq: 23681 INVITE	
46	WWW-Authenticate: Digest realm="asterisk",nonce="1651308803/6feb08039750fd0c1b42555c199db0f6",opaque="0c0fe1bd1ccdc9bd",algorithm=md5,qop="auth"	
47	Server: FPBX-16.0.19(18.11.3)	
48	Content-Length: 0	
49		
50		
51	[2022-04-30 18:53:23] VERBOSE[28232] res_pjsip_logger.c: <--- Received SIP request (387 bytes) from UDP:my.home.com:56133 --->	
52	ACK sip:*[email protected] SIP/2.0	
53	Via: SIP/2.0/UDP my.home.com:56133;rport;branch=z9hG4bKPj318f6d14d96e488cbc0aa01988d088e9	
54	Max-Forwards: 70	
55	From: <sip:[email protected]>;tag=c9e26f3f3dc248af8ffa3ef31616d42e	
56	To: <sip:*[email protected]>;tag=z9hG4bKPj318f6d14d96e488cbc0aa01988d088e9	
57	Call-ID: 1b4eac9f94984e4a824d61048a2144a9	
58	CSeq: 23681 ACK	
59	Content-Length: 0	
60		
61		
62	[2022-04-30 18:53:23] VERBOSE[28232] res_pjsip_logger.c: <--- Received SIP request (1449 bytes) from UDP:my.home.com:56133 --->	
63	INVITE sip:*[email protected] SIP/2.0	
64	Via: SIP/2.0/UDP my.home.com:56133;rport;branch=z9hG4bKPj9a20a067152d46058bec17684ddf2f21	
65	Max-Forwards: 70	
66	From: <sip:[email protected]>;tag=c9e26f3f3dc248af8ffa3ef31616d42e	
67	To: <sip:*[email protected]>	
68	Contact: <sip:[email protected]:56133;ob>	
69	Call-ID: 1b4eac9f94984e4a824d61048a2144a9	
70	CSeq: 23682 INVITE	
71	Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS	
72	Supported: replaces, 100rel, timer, norefersub	
73	Session-Expires: 1800	
74	Min-SE: 90	
75	User-Agent: MicroSIP/3.20.7	
76	Authorization: Digest username="200", realm="asterisk", nonce="1651308803/6feb08039750fd0c1b42555c199db0f6", uri="sip:*[email protected]", response="110cc9c7995362210d0de0a5eb735f07", algorithm=md5, cnonce="159368bb1b1f44d8b782079de64e9145", opaque="0c0fe1bd1ccdc9bd", qop=auth, nc=00000001	
77	Content-Type: application/sdp	
78	Content-Length: 517	
79		
80	v=0	
81	o=- 3860333603 3860333603 IN IP4 my.home.com	
82	s=pjmedia	
83	b=AS:84	
84	t=0 0	
85	a=X-nat:0	
86	m=audio 4010 RTP/AVP 8 0 101	
87	c=IN IP4 my.home.com	
88	b=TIAS:64000	
89	a=rtcp:4011 IN IP4 my.home.com	
90	a=sendrecv	
91	a=rtpmap:8 PCMA/8000	
92	a=rtpmap:0 PCMU/8000	
93	a=rtpmap:101 telephone-event/8000	
94	a=fmtp:101 0-16	
95	a=ssrc:1214675798 cname:0a134f932b5d2b8d	
96	a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:mZHS9psfbP7aPmyU0XlXcWYWcpZYb5wbA5cejocr	
97	a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:ldY85ewWaOMhUdx/doS3DhindchnpvATJd6t0qG9	
98		
99	[2022-04-30 18:53:23] NOTICE[28233] res_pjsip_session.c: 200: Call (UDP:my.home.com:56133) to extension '*203' rejected because extension not found in context 'from-internal'.	
100	[2022-04-30 18:53:23] VERBOSE[28233] res_pjsip_logger.c: <--- Transmitting SIP response (412 bytes) to UDP:my.home.com:56133 --->	
101	SIP/2.0 404 Not Found	
102	Via: SIP/2.0/UDP my.home.com:56133;rport=56133;received=my.home.com;branch=z9hG4bKPj9a20a067152d46058bec17684ddf2f21	
103	Call-ID: 1b4eac9f94984e4a824d61048a2144a9	
104	From: <sip:[email protected]>;tag=c9e26f3f3dc248af8ffa3ef31616d42e	
105	To: <sip:*[email protected]>;tag=1623d3d8-6d3d-44ec-9217-3379f2811567	
106	CSeq: 23682 INVITE	
107	Server: FPBX-16.0.19(18.11.3)	
108	Content-Length: 0	
109		
110		
111	[2022-04-30 18:53:23] VERBOSE[28232] res_pjsip_logger.c: <--- Received SIP request (382 bytes) from UDP:my.home.com:56133 --->	
112	ACK sip:*[email protected] SIP/2.0	
113	Via: SIP/2.0/UDP my.home.com:56133;rport;branch=z9hG4bKPj9a20a067152d46058bec17684ddf2f21	
114	Max-Forwards: 70	
115	From: <sip:[email protected]>;tag=c9e26f3f3dc248af8ffa3ef31616d42e	
116	To: <sip:*[email protected]>;tag=1623d3d8-6d3d-44ec-9217-3379f2811567	
117	Call-ID: 1b4eac9f94984e4a824d61048a2144a9	
118	CSeq: 23682 ACK	
119	Content-Length: 0	
120		
121	

This is the log with Allow IP Rewrite == No:

3	[2022-04-30 20:52:54] VERBOSE[28232] res_pjsip_logger.c: <--- Received SIP request (1127 bytes) from UDP:my.home.com:56133 --->	
4	INVITE sip:*[email protected] SIP/2.0	
5	Via: SIP/2.0/UDP 10.0.0.179:56133;rport;branch=z9hG4bKPja7ea7e8f9f2042cf9d851ac6116fc7e8	
6	Max-Forwards: 70	
7	From: <sip:[email protected]>;tag=d47fd164317d45b986a271b0606f327a	
8	To: <sip:*[email protected]>	
9	Contact: <sip:[email protected]:56133;ob>	
10	Call-ID: 5cd97c8f46bf40e3be88c25425f903c5	
11	CSeq: 16603 INVITE	
12	Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS	
13	Supported: replaces, 100rel, timer, norefersub	
14	Session-Expires: 1800	
15	Min-SE: 90	
16	User-Agent: MicroSIP/3.20.7	
17	Content-Type: application/sdp	
18	Content-Length: 501	
19		
20	v=0	
21	o=- 3860340774 3860340774 IN IP4 10.0.0.179	
22	s=pjmedia	
23	b=AS:84	
24	t=0 0	
25	a=X-nat:0	
26	m=audio 4000 RTP/AVP 8 0 101	
27	c=IN IP4 10.0.0.179	
28	b=TIAS:64000	
29	a=rtcp:4001 IN IP4 10.0.0.179	
30	a=sendrecv	
31	a=rtpmap:8 PCMA/8000	
32	a=rtpmap:0 PCMU/8000	
33	a=rtpmap:101 telephone-event/8000	
34	a=fmtp:101 0-16	
35	a=ssrc:581904697 cname:513e731d32172dd6	
36	a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:O+a2A7wgLlz+hlCG7xGJuehAYaPh0sDj5rKr+04w	
37	a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:r1zc0esLAqHmryXJuvBcp4DZYCy6xpQ4hk3f2kmZ	
38		
39	[2022-04-30 20:52:54] VERBOSE[29673] res_pjsip_logger.c: <--- Transmitting SIP response (561 bytes) to UDP:my.home.com:56133 --->	
40	SIP/2.0 401 Unauthorized	
41	Via: SIP/2.0/UDP 10.0.0.179:56133;rport=56133;received=my.home.com;branch=z9hG4bKPja7ea7e8f9f2042cf9d851ac6116fc7e8	
42	Call-ID: 5cd97c8f46bf40e3be88c25425f903c5	
43	From: <sip:[email protected]>;tag=d47fd164317d45b986a271b0606f327a	
44	To: <sip:*[email protected]>;tag=z9hG4bKPja7ea7e8f9f2042cf9d851ac6116fc7e8	
45	CSeq: 16603 INVITE	
46	WWW-Authenticate: Digest realm="asterisk",nonce="1651315974/08873f898611aca62085e6fcb7168d7b",opaque="54e74df836dbfa48",algorithm=md5,qop="auth"	
47	Server: FPBX-16.0.19(18.11.3)	
48	Content-Length: 0	
49		
50		
51	[2022-04-30 20:52:54] VERBOSE[28232] res_pjsip_logger.c: <--- Received SIP request (382 bytes) from UDP:my.home.com:56133 --->	
52	ACK sip:*[email protected] SIP/2.0	
53	Via: SIP/2.0/UDP 10.0.0.179:56133;rport;branch=z9hG4bKPja7ea7e8f9f2042cf9d851ac6116fc7e8	
54	Max-Forwards: 70	
55	From: <sip:[email protected]>;tag=d47fd164317d45b986a271b0606f327a	
56	To: <sip:*[email protected]>;tag=z9hG4bKPja7ea7e8f9f2042cf9d851ac6116fc7e8	
57	Call-ID: 5cd97c8f46bf40e3be88c25425f903c5	
58	CSeq: 16603 ACK	
59	Content-Length: 0	
60		
61		
62	[2022-04-30 20:52:54] VERBOSE[28232] res_pjsip_logger.c: <--- Received SIP request (1423 bytes) from UDP:my.home.com:56133 --->	
63	INVITE sip:*[email protected] SIP/2.0	
64	Via: SIP/2.0/UDP 10.0.0.179:56133;rport;branch=z9hG4bKPje007873679444dd8b9a3d93df0c4407f	
65	Max-Forwards: 70	
66	From: <sip:[email protected]>;tag=d47fd164317d45b986a271b0606f327a	
67	To: <sip:*[email protected]>	
68	Contact: <sip:[email protected]:56133;ob>	
69	Call-ID: 5cd97c8f46bf40e3be88c25425f903c5	
70	CSeq: 16604 INVITE	
71	Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS	
72	Supported: replaces, 100rel, timer, norefersub	
73	Session-Expires: 1800	
74	Min-SE: 90	
75	User-Agent: MicroSIP/3.20.7	
76	Authorization: Digest username="200", realm="asterisk", nonce="1651315974/08873f898611aca62085e6fcb7168d7b", uri="sip:*[email protected]", response="09976b0ad09daf327a2ea6c6df4f5ffc", algorithm=md5, cnonce="d3c38b5a31574b7387f863a672f0c8a0", opaque="54e74df836dbfa48", qop=auth, nc=00000001	
77	Content-Type: application/sdp	
78	Content-Length: 501	
79		
80	v=0	
81	o=- 3860340774 3860340774 IN IP4 10.0.0.179	
82	s=pjmedia	
83	b=AS:84	
84	t=0 0	
85	a=X-nat:0	
86	m=audio 4000 RTP/AVP 8 0 101	
87	c=IN IP4 10.0.0.179	
88	b=TIAS:64000	
89	a=rtcp:4001 IN IP4 10.0.0.179	
90	a=sendrecv	
91	a=rtpmap:8 PCMA/8000	
92	a=rtpmap:0 PCMU/8000	
93	a=rtpmap:101 telephone-event/8000	
94	a=fmtp:101 0-16	
95	a=ssrc:581904697 cname:513e731d32172dd6	
96	a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:O+a2A7wgLlz+hlCG7xGJuehAYaPh0sDj5rKr+04w	
97	a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:r1zc0esLAqHmryXJuvBcp4DZYCy6xpQ4hk3f2kmZ	
98		
99	[2022-04-30 20:52:54] NOTICE[29673] res_pjsip_session.c: 200: Call (UDP:my.home.com:56133) to extension '*203' rejected because extension not found in context 'from-internal'.	
100	[2022-04-30 20:52:54] VERBOSE[29673] res_pjsip_logger.c: <--- Transmitting SIP response (407 bytes) to UDP:my.home.com:56133 --->	
101	SIP/2.0 404 Not Found	
102	Via: SIP/2.0/UDP 10.0.0.179:56133;rport=56133;received=my.home.com;branch=z9hG4bKPje007873679444dd8b9a3d93df0c4407f	
103	Call-ID: 5cd97c8f46bf40e3be88c25425f903c5	
104	From: <sip:[email protected]>;tag=d47fd164317d45b986a271b0606f327a	
105	To: <sip:*[email protected]>;tag=0d67dfe2-ba11-41a0-8211-e76e47c42b0c	
106	CSeq: 16604 INVITE	
107	Server: FPBX-16.0.19(18.11.3)	
108	Content-Length: 0	
109		
110		
111	[2022-04-30 20:52:54] VERBOSE[28232] res_pjsip_logger.c: <--- Received SIP request (377 bytes) from UDP:my.home.com:56133 --->	
112	ACK sip:*[email protected] SIP/2.0	
113	Via: SIP/2.0/UDP 10.0.0.179:56133;rport;branch=z9hG4bKPje007873679444dd8b9a3d93df0c4407f	
114	Max-Forwards: 70	
115	From: <sip:[email protected]>;tag=d47fd164317d45b986a271b0606f327a	
116	To: <sip:*[email protected]>;tag=0d67dfe2-ba11-41a0-8211-e76e47c42b0c	
117	Call-ID: 5cd97c8f46bf40e3be88c25425f903c5	
118	CSeq: 16604 ACK	
119	Content-Length: 0	
120		
121	

Hoping someone can help. Thanks in advance.

What is your configuration for extension 203? Asterisk is saying there is no such extension!

I just create a quick extension with:
type: SIP [chan_pjsip]
Extension: 203
Display name: Emily
Outbound Caller ID:
Email address:
Enable Findme Follow me: No
Parking Lot: Default Lot
Create User manager: No
Enable Voicemail: No

Thats it.

Here is Reports > Asterisk Info

Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
I/OAuth:  <AuthId/UserName...........................................................>
Aor:  <Aor............................................>  <MaxContact>
Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
Identify:  <Identify/Endpoint.........................................................>
Match:  <criteria.........................>
Channel:  <ChannelId......................................>  <State.....>  <Time.....>
Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

Endpoint:  200/200                                              Not in use    0 of inf
InAuth:  200-auth/200
Aor:  200                                                1
Contact:  200/sip:[email protected]:49602;ob       e206237f3b Avail        29.829

Endpoint:  203/203                                              Not in use    0 of inf
InAuth:  203-auth/203
Aor:  203                                                1
Contact:  203/sip:[email protected]:59004;ob       cc99e72e22 Avail        87.792

Endpoint:  anonymous                                            Unavailable   0 of inf


Objects found: 3

The Asterisk log is missing from the second part.

It seems like you have voicemail direct dialing disabled?

What is the output of:

asterisk -x"dialplan show *[email protected]"

In MicroSIP, Allow IP Rewrite should be left off and (at least for now) Media Encryption should be left at Disabled.

However, the main (or only) problem is
INVITE sip:*[email protected] SIP/2.0
Are you dialing the * before the extension number? That tells FreePBX to go directly to extension 203 voicemail; if that is disabled it is normal for you to get an error. If you are trying to call extension 203, you should just dial 203.

If you are dialing 203, something unrelated to FreePBX is inserting the unwanted *, perhaps an obscure setting in MicroSIP or the OS.

Looks like *203 vs 203 are producing different results:

[[email protected] ~]# asterisk -x"dialplan show *[email protected]"
There is no existence of *[email protected] extension
Command 'dialplan show *[email protected]' failed.
[[email protected] ~]# asterisk -x"dialplan show [email protected]"
[ Included context 'ext-findmefollow' created by 'pbx_config' ]
  '203' =>          1. GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1) [extensions_additional.conf:1265]
                    2. GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1) [extensions_additional.conf:1266]

[ Included context 'ext-local' created by 'pbx_config' ]
  '203' =>          hint: PJSIP/203&Custom:DND203,CustomPresence:203 [extensions_additional.conf:2875]
                    1. Set(__RINGTIMER=${IF($["${DB(AMPUSER/203/ringtimer)}" > "0"]?${DB(AMPUSER/203/ringtimer)}:${RINGTIMER_DEFAULT})}) [extensions_additional.conf:2870]
                    2. ExecIf($["${REGEX("from-queue" ${CHANNEL})}"="1" && "${CONTEXT}"="from-internal-xfer"]?Set(__CWIGNORE=)) [extensions_additional.conf:2871]
                    3. Macro(exten-vm,novm,203,0,0,0)             [extensions_additional.conf:2872]
     [dest]         4. Set(__PICKUPMARK=)                         [extensions_additional.conf:2873]
                    5. GotoIf($["${IVR_CONTEXT}" != ""]?${IVR_CONTEXT},return,1) [extensions_additional.conf:2874]

[ Included context 'bad-number' created by 'pbx_config' ]
  '_X.' =>          1. ResetCDR()                                 [extensions_additional.conf:2979]
                    2. NoCDR()                                    [extensions_additional.conf:2980]
                    3. Progress()                                 [extensions_additional.conf:2981]
                    4. Wait(1)                                    [extensions_additional.conf:2982]
                    5. Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer) [extensions_additional.conf:2983]
                    6. Wait(1)                                    [extensions_additional.conf:2984]
                    7. Congestion(20)                             [extensions_additional.conf:2985]
                    8. Hangup()                                   [extensions_additional.conf:2986]

-= 3 extensions (16 priorities) in 3 contexts. =-

Please show Asterisk log (including pjsip logger) when dialing 203.

Under Admin > Feature codes, do you have this enabled?

If so, it should look like this:

[[email protected] ~]# asterisk -x"dialplan show *[email protected]"
[ Included context 'ext-local' created by 'pbx_config' ]
  '*2547' =>        1. Set(CONNECTEDLINE(name-charset,i)=utf8)    [extensions_additional.conf:4939]
                    2. Set(CONNECTEDLINE(name,i)=2547 Voicemail)  [extensions_additional.conf:4940]
                    3. Set(CONNECTEDLINE(num,i)=2547)             [extensions_additional.conf:4941]
                    4. Macro(vm,2547,DIRECTDIAL,${IVR_RETVM})     [extensions_additional.conf:4942]
                    5. Goto(vmret,1)                              [extensions_additional.conf:4943]

If you are trying to call extension 203, you should just dial 203.

Omg… I’m an idiot. Thank you. When I first heard that voice mail with *203 I was permanently on the wrong path.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.