Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] How to set the global setting for each pjsip endpoint


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
engthyda at gmail.com
Guest





PostPosted: Tue Sep 22, 2015 10:11 am    Post subject: [asterisk-users] How to set the global setting for each pjsi Reply with quote

I have many endpoints and each endpoint has some parameter in common so i wonder is there any way to config one for all endpoints? Like in my example I have two endpoints and I repeat the same thing,


[100]
type=endpoint
aors=100
auth=100-auth
allow=ulaw,alaw,gsm,g726
context=from-internal
callerid=device <100>
dtmf_mode=rfc4733
use_avpf=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
message_context=astsms


[200]
type=endpoint
aors=200
auth=200-auth
allow=ulaw,alaw,gsm,g726
context=from-internal
callerid=device <200>
dtmf_mode=rfc4733
use_avpf=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
message_context=astsms



how could I avoid duplicate thing like this ?
Back to top
ish at pack-net.co.uk
Guest





PostPosted: Tue Sep 22, 2015 10:14 am    Post subject: [asterisk-users] How to set the global setting for each pjsi Reply with quote

On 22 September 2015 at 16:04, Thyda ENG <engthyda@gmail.com (engthyda@gmail.com)> wrote:
Quote:
I have many endpoints and each endpoint has some parameter in common so i wonder is there any way to config one for all endpoints? Like in my example I have two endpoints and I repeat the same thing,


[100]
type=endpoint
aors=100
auth=100-auth
allow=ulaw,alaw,gsm,g726
context=from-internal
callerid=device <100>
dtmf_mode=rfc4733
use_avpf=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
message_context=astsms


[200]
type=endpoint
aors=200
auth=200-auth
allow=ulaw,alaw,gsm,g726
context=from-internal
callerid=device <200>
dtmf_mode=rfc4733
use_avpf=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
message_context=astsms



how could I avoid duplicate thing like this ?


--



From my brief look at pjsip.conf it uses the same template concept as the sip.conf.


Here's the relevant instructions from the sip.conf in asteris13


 ;
; Because you might have a large number of similar sections, it is generally
; convenient to use templates for the common parameters, and add them
; the the various sections. Examples are below, and we can even leave
; the templates uncommented as they will not harm:


[basic-options](!)                ; a template
        dtmfmode=rfc2833
        context=from-office
        type=friend


[natted-phone](!,basic-options)   ; another template inheriting basic-options
        directmedia=no
        host=dynamic


[public-phone](!,basic-options)   ; another template inheriting basic-options
        directmedia=yes


[my-codecs](!)                    ; a template for my preferred codecs
        disallow=all
        allow=ilbc
        allow=g729
        allow=gsm
        allow=g723
        allow=ulaw
        ; Or, more simply:
        ;allow=!all,ilbc,g729,gsm,g723,ulaw


[ulaw-phone](!)                   ; and another one for ulaw-only
        disallow=all
        allow=ulaw
        ; Again, more simply:
        ;allow=!all,ulaw


; and finally instantiate a few phones
;
; [2133](natted-phone,my-codecs)
;        secret = peekaboo
; [2134](natted-phone,ulaw-phone)
;        secret = not_very_secret
; [2136](public-phone,ulaw-phone)
;        secret = not_very_secret_either
; ...
;


Regards


Ish

--
Quote:
Ishfaq Malik
Department: VOIP Support
Company: Packnet Limited
t: +44 (0)161 660 2350
f: +44 (0)161 660 9825
e: ish@pack-net.co.uk (ish@pack-net.co.uk)
w: http://www.pack-net.co.uk

Registered Address: PACKNET LIMITED, Duplex 2, Ducie House
37 Ducie Street
Manchester, M1 2JW
COMPANY REG NO. 04920552
Back to top
engthyda at gmail.com
Guest





PostPosted: Tue Sep 22, 2015 10:23 am    Post subject: [asterisk-users] How to set the global setting for each pjsi Reply with quote

how if I use the auto generate once from freepbx ?

On Tue, Sep 22, 2015 at 10:12 PM, Ishfaq Malik <ish@pack-net.co.uk (ish@pack-net.co.uk)> wrote:
Quote:


On 22 September 2015 at 16:04, Thyda ENG <engthyda@gmail.com (engthyda@gmail.com)> wrote:


Quote:
I have many endpoints and each endpoint has some parameter in common so i wonder is there any way to config one for all endpoints? Like in my example I have two endpoints and I repeat the same thing,


[100]
type=endpoint
aors=100
auth=100-auth
allow=ulaw,alaw,gsm,g726
context=from-internal
callerid=device <100>
dtmf_mode=rfc4733
use_avpf=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
message_context=astsms


[200]
type=endpoint
aors=200
auth=200-auth
allow=ulaw,alaw,gsm,g726
context=from-internal
callerid=device <200>
dtmf_mode=rfc4733
use_avpf=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
message_context=astsms



how could I avoid duplicate thing like this ?




--



From my brief look at pjsip.conf it uses the same template concept as the sip.conf.


Here's the relevant instructions from the sip.conf in asteris13


 ;
; Because you might have a large number of similar sections, it is generally
; convenient to use templates for the common parameters, and add them
; the the various sections. Examples are below, and we can even leave
; the templates uncommented as they will not harm:


[basic-options](!)                ; a template
        dtmfmode=rfc2833
        context=from-office
        type=friend


[natted-phone](!,basic-options)   ; another template inheriting basic-options
        directmedia=no
        host=dynamic


[public-phone](!,basic-options)   ; another template inheriting basic-options
        directmedia=yes


[my-codecs](!)                    ; a template for my preferred codecs
        disallow=all
        allow=ilbc
        allow=g729
        allow=gsm
        allow=g723
        allow=ulaw
        ; Or, more simply:
        ;allow=!all,ilbc,g729,gsm,g723,ulaw


[ulaw-phone](!)                   ; and another one for ulaw-only
        disallow=all
        allow=ulaw
        ; Again, more simply:
        ;allow=!all,ulaw


; and finally instantiate a few phones
;
; [2133](natted-phone,my-codecs)
;        secret = peekaboo
; [2134](natted-phone,ulaw-phone)
;        secret = not_very_secret
; [2136](public-phone,ulaw-phone)
;        secret = not_very_secret_either
; ...
;


Regards


Ish

--
Quote:
Ishfaq Malik
Department: VOIP Support
Company: Packnet Limited
t: [url=tel:%2B44%20%280%29161%20660%202350]+44 (0)161 660 2350[/url]
f: [url=tel:%2B44%20%280%29161%20660%209825]+44 (0)161 660 9825[/url]
e: ish@pack-net.co.uk (ish@pack-net.co.uk)
w: http://www.pack-net.co.uk

Registered Address: PACKNET LIMITED, Duplex 2, Ducie House
37 Ducie Street
Manchester, M1 2JW
COMPANY REG NO. 04920552







--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
engthyda at gmail.com
Guest





PostPosted: Tue Sep 22, 2015 10:14 pm    Post subject: [asterisk-users] How to set the global setting for each pjsi Reply with quote

My pjsip.conf is the auto_generated file from freepbx and it should not be modified. I really cannot find where to set the messge_context in freepbx UI at all. could you please show me where?


On Tue, Sep 22, 2015 at 10:22 PM, Thyda ENG <engthyda@gmail.com (engthyda@gmail.com)> wrote:
Quote:
how if I use the auto generate once from freepbx ?

On Tue, Sep 22, 2015 at 10:12 PM, Ishfaq Malik <ish@pack-net.co.uk (ish@pack-net.co.uk)> wrote:


Quote:


On 22 September 2015 at 16:04, Thyda ENG <engthyda@gmail.com (engthyda@gmail.com)> wrote:


Quote:
I have many endpoints and each endpoint has some parameter in common so i wonder is there any way to config one for all endpoints? Like in my example I have two endpoints and I repeat the same thing,


[100]
type=endpoint
aors=100
auth=100-auth
allow=ulaw,alaw,gsm,g726
context=from-internal
callerid=device <100>
dtmf_mode=rfc4733
use_avpf=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
message_context=astsms


[200]
type=endpoint
aors=200
auth=200-auth
allow=ulaw,alaw,gsm,g726
context=from-internal
callerid=device <200>
dtmf_mode=rfc4733
use_avpf=no
ice_support=no
media_use_received_transport=no
trust_id_inbound=yes
send_pai=yes
rtp_symmetric=yes
rewrite_contact=yes
message_context=astsms



how could I avoid duplicate thing like this ?




--



From my brief look at pjsip.conf it uses the same template concept as the sip.conf.


Here's the relevant instructions from the sip.conf in asteris13


 ;
; Because you might have a large number of similar sections, it is generally
; convenient to use templates for the common parameters, and add them
; the the various sections. Examples are below, and we can even leave
; the templates uncommented as they will not harm:


[basic-options](!)                ; a template
        dtmfmode=rfc2833
        context=from-office
        type=friend


[natted-phone](!,basic-options)   ; another template inheriting basic-options
        directmedia=no
        host=dynamic


[public-phone](!,basic-options)   ; another template inheriting basic-options
        directmedia=yes


[my-codecs](!)                    ; a template for my preferred codecs
        disallow=all
        allow=ilbc
        allow=g729
        allow=gsm
        allow=g723
        allow=ulaw
        ; Or, more simply:
        ;allow=!all,ilbc,g729,gsm,g723,ulaw


[ulaw-phone](!)                   ; and another one for ulaw-only
        disallow=all
        allow=ulaw
        ; Again, more simply:
        ;allow=!all,ulaw


; and finally instantiate a few phones
;
; [2133](natted-phone,my-codecs)
;        secret = peekaboo
; [2134](natted-phone,ulaw-phone)
;        secret = not_very_secret
; [2136](public-phone,ulaw-phone)
;        secret = not_very_secret_either
; ...
;


Regards


Ish

--
Quote:
Ishfaq Malik
Department: VOIP Support
Company: Packnet Limited
t: [url=tel:%2B44%20%280%29161%20660%202350]+44 (0)161 660 2350[/url]
f: [url=tel:%2B44%20%280%29161%20660%209825]+44 (0)161 660 9825[/url]
e: ish@pack-net.co.uk (ish@pack-net.co.uk)
w: http://www.pack-net.co.uk

Registered Address: PACKNET LIMITED, Duplex 2, Ducie House
37 Ducie Street
Manchester, M1 2JW
COMPANY REG NO. 04920552









--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



Back to top
el.es.cr at gmail.com
Guest





PostPosted: Wed Sep 23, 2015 3:00 am    Post subject: [asterisk-users] How to set the global setting for each pjsi Reply with quote

( fixed top-posting order )

Quote:
On Tue, Sep 22, 2015 at 10:22 PM, Thyda ENG <engthyda@gmail.com
<mailto:engthyda@gmail.com>> wrote:

how if I use the auto generate once from freepbx ?


On 23/09/15 04:13, Thyda ENG wrote:
Quote:
My pjsip.conf is the auto_generated file from freepbx and it should
not be modified. I really cannot find where to set the messge_context
in freepbx UI at all. could you please show me where?


Most FreePBX config generated files (can) have the _custom additions that can
be edited by hand and are not overwritten by the config creator.

And pjsip_endpoint_custom.conf can add options to whatever extension:
http://community.freepbx.org/t/pjsip-endpoint-custom-conf-not-working-resolved/30321
(provided you run a recent enough version of FreePBX)

el es


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services