PJSIP does not use the term âtrunkâ. Everything is an âendpointâ.
If you donât want to SIP REGISTER with an endpoint (in your case the Avaya SIP server), then your pjsip.conf will not have a definition for an object of âtype=registerâ.associated with that endpoint.
If you donât want to authenticate with your endpoint, your pjsipi.conf will not have a definition for an object of âtype=authâ associated with that endpoint. However, your 1st post indicated that you do authenticate to the Avaya SIP server using the username name of â3000â and the password of â123456â.
You still need to have a definition for an object of âtype=endpointâ with all the setting necessary to communicate with the endpoint.
Your basic assumptions are:
- Avaya SIP server protocol/IPaddr/port: udp://192.168.100.191:5060
- Your credentials for authenticating with the Avaya SIP server are: 3000/123456 ;(userpass)
- When calls come from the Avaya SIP server, they will be trying to reach the extension â3000â within your Asterisk server.
- Your Asterisk protocol/IPaddr/port: udp://192.168.100.163:5060
Start with a definition of how Asterisk can use PJSIP to communicate:
[transpoirt-udp-nonat]
type=transport
protocol=udp
bind=0.0.0.0:5060
Next define the Avaya SIP Server endpoint:
[avaya_office]
type=endpoint
transport=transport-udp-nonat
context=from-avaya_office ; context for inbound communication FROM avaya_office
outbound_auth=auth_avaya_office ; definition for how to authenticate communication sent to avaya_office
disallow=all ; Disallow all codec
allow=ulaw,alaw,gsm ; Only support codecs ulaw, alaw, and gsm
aors=avaya_office ; Assign any communication coming from this endpoint should be associated with the "avaya_office" Address of Record (AOR)
Define how to authenticate to Avaya SIP server:
[auth_avaya_office]
type=auth
auth_type=userpass
password=123456
username=3000
Define an Address of Record that can map communication from an IP address to a specific endpoint since I donât think the Avaya SIP server will send authentication info along with any INVITE/OPTIONS to your Asterisk box:
[avaya_office]
type=aor
contact=sip:192.168.100.191:5060 ; Use this SIP URI to communicate with avaya_office
[avaya_office]
type=identity
endpoint=avaya_office
match=192.168.100.191 ; Any communication from 192.168.100.191 should be associated with the endpoint avaya_office
Now, if you do need to SIP REGISTER with the Avaya SIP server, you need to add a definition of the SIP REGISTER that will be sent to the Avaya SIP server:
[avaya_office]
type=registration
transport=transport-udp-nonat
outbound_auth=auth_avaya_office ; definition for how to authenticate communication sent to avaya_office
client_uri=sip:3000@192.168.100.163:5060
server_uri=sip:192.168.100.191:5060
contact_user=3000 ; Which extension to contact for communication coming FROM the avaya_office endpoint
Please note that all the above should be in the pjsip.conf.
In your extensions.conf, you should have the following context:
[from-avaya_office]
;;; Inbound call to extension 3000 will be answered, play the hello-world message, play goodbye message and then hangup the call.
exten => 3000,1,Verbose(3, Inbound call from avaya_office SIP server)
same => n,Answer()
same => n,Playback(hello-world)
same => n,Playback(goodbye)
same => n,Hangup()
For outbound calls from your Asterisk box to the Avaya SIP server, your extensions.conf should use the PJSIP method to Dial() out. For example, if you want to send a call to 1-800-555-1212 through the Avaya SIP server, your extensions.conf should use:
Dial(PJSIP/18005551212@avaya_office)
nishanth143, please try and define what you want to do and then do some research on how to do it. All I wrote above can be found on the mailing list, in the documentation, and many, many blog posts reachable through any web search. As a matter fact, I donât even know if my example will work 100% for you. I donât have your setup for me to test. Thatâs why it is imperative you understand what I wrote instead of cut/paste and assume it will work.
If you are not sure where to start, look up how SIP communication works. It will give you better undetrstanding of what everyone was saying while trying to help you.
See yaâŚ
d.c.