本帖最後由 bubblestar 於 2011-12-23 17:35 編輯
For security sake and as a rule of thumb, it is suggested to make the "allowguest = no" in general section of our sip.conf. However, we sometimes encounter connection (dial-in)problem when multiple accounts with same service provider is involved. Some of us (including me) are compelled to "allowguest=yes" to resolve the problem in the past or at present. For example, IPKall.
The resolution to avoid us from this dangerous situation is not so difficult. We just need to merge all these accounts into one single context and thats it.
For example:
[from-ipkall] ; all 4 ipkall accounts coming into this same context.
exten => ipkall_01,1,NoOp(Incoming call from IPKall account 1) ; Calling via IPKall 425-123-1111
exten => ipkall_01,n,Dial(SIP/6001,30,Ttr)
exten => ipkall_01,n,Hangup()
exten => ipkall_02,1,NoOp(Incoming call from IPKall account 2) ; Calling via IPKall 425-123-2222
exten => ipkall_02,n,Dial(SIP/6002,30,Ttr)
exten => ipkall_02,n,Hangup()
exten => ipkall_03,1,NoOp(Incoming call from IPKall account 3) ; Calling via IPKall 425-123-3333
exten => ipkall_03,n,Dial(SIP/6003,30,Ttr)
exten => ipkall_03,n,Hangup()
exten => ipkall_04,1,NoOp(Incoming call from IPKall account 4) ; Calling via IPKall 425-123-4444
exten => ipkall_04,n,Dial(SIP/6004,30,Ttr)
exten => ipkall_04,n,Hangup()
Now, we can specify "allowguest=no" in sip.conf and reload our dialplan under CLI.
One more last setting must be made in our own IPKall account setting page. Please make the Sip Phone Number corresponds to the account name as your settings in extensions. conf. i.e., ipkall_01, ipkall_02, ipkall_03 and ipkall_04. Save and that is all.
All incoming call can now be forwarded to our internal extension as expected. We can also identify which IPKall number is being used.
Happy sharing.
I think the same logic can be applied to IPTEL and other service providers' accounts. |