Hi everyone,
That I want is when I call the number (+32) 2 899 20 18 on my mobile, we have my extension 102 (Ip Phone) who ring. But I change the diaplan like you said to me @david551 :
root@IPBX-Asterisk:/etc/asterisk#
root@IPBX-Asterisk:/etc/asterisk# asterisk -r
Asterisk 13.19.2, 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.
=========================================================================
Connected to Asterisk 13.19.2 currently running on IPBX-Asterisk (pid = 1427)
IPBX-Asterisk*CLI> dialplan reload
Dialplan reloaded.
IPBX-Asterisk*CLI> pjsip reload
Module 'res_pjsip.so' reloaded successfully.
Module 'res_pjsip_authenticator_digest.so' reloaded successfully.
Module 'res_pjsip_endpoint_identifier_ip.so' reloaded successfully.
Module 'res_pjsip_mwi.so' reloaded successfully.
Module 'res_pjsip_notify.so' reloaded successfully.
Module 'res_pjsip_outbound_publish.so' reloaded successfully.
Module 'res_pjsip_publish_asterisk.so' reloaded successfully.
Module 'res_pjsip_outbound_registration.so' reloaded successfully.
[Mar 20 10:39:03] NOTICE[1804]: sorcery.c:1427 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
IPBX-Asterisk*CLI>
When I call the number since my mobile by typing the number (+32) 2 899 20 18, I have this message in the Asterisk Console CLI :
[Mar 20 10:39:50] NOTICE[1804]: res_pjsip_session.c:2142 new_invite: Call from 'belgium-voip-provider' (UDP:188.66.8.19:5060) to extension 's' rejected because extension not found in context 'from-belgium-voip'.
IPBX-Asterisk*CLI>
My extensions.conf :
[general]
static=yes
writeprotect=no
clearglobalvars=no
[globals]
CONSOLE=Console/dsp ; Console interface for demo
IAXINFO=guest ; IAXtel username/password
TRUNK=DAHDI/G2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
[from-internal]
;======================================= Internal Calls between extensions
exten => _10X,1,NoOp(###### First Line ######)
same => n,Dial(PJSIP/${EXTEN})
same => n,VoiceMail(${EXTEN},u)
same => n,Hangup()
;======================================= Call to a extension 103
exten => 103,1,Answer()
same => n,Set(CHANNEL(language)=fr)
same => n,Wait(1)
same => n,Playback(hello-world)
same => n,Wait(1)
same => n,Playback(goodbye)
same => n,Hangup()
;======================================= Other numbers to outbound trunk
exten => _XXXX,1,NoOp(####### [from-internal] ########)
same => n,Set(CALLERID(num)=042771412)
same => n,Dial(PJSIP/${EXTEN}@belgium-voip-provider)
same => n,Hangup()
exten => _XXXXXXXXX,1,Dial(PJSIP/${EXTEN}@belgium-voip-provider)
same => n,Set(CALLERID(num)=042771412)
same => n,Dial(PJSIP/${EXTEN}@belgium-voip-provider)
same => n,Hangup()
exten => _XXXXXXXXXX,1,Dial(PJSIP/${EXTEN}@belgium-voip-provider)
same => n,Set(CALLERID(num)=042771412)
same => n,Dial(PJSIP/${EXTEN}@belgium-voip-provider)
same => n,Hangup()
;====================================== All Incoming Calls
[from-belgium-voip]
exten => _028992018.,1,NoOp(## Incoming Call To Public Number 028992018 ##)
same => n,Dial(PJSIP/102,20)
same => n,Hangup()