Hello,
I’m following this page:
https://wiki.asterisk.org/wiki/display/AST/Exchanging+Device+and+Mailbox+State+Using+PJSIP
and the configuration works perfectly. I’d like know where can I find some example about add authentication.
Thank you.
Regards
jcolp
October 24, 2016, 7:58pm
#2
If you configure an inbound_auth on the endpoint it will challenge the PUBLISH request for those credentials. For the publish in the “outbound-publish” you can configure an outbound_auth which will contain the credentials to respond with when challenged.
Thank you,
my final configuration.
First Server:
[servidorA]
type=endpoint
auth=servidorA
[servidorA]
type=auth
auth_type=userpass
username=servidorA
password=servidorA1234
[servidorA-devicestate]
type=outbound-publish
server_uri=sip:servidorB@IPServidorB
event=asterisk-devicestate
outbound_auth=servidorB
[servidorA-mwi]
type=outbound-publish
server_uri=sip:servidorB@IPServidorB
event=asterisk-mwi
outbound_auth=servidorB
[servidorB]
type=auth
auth_type=userpass
username=servidorB
password=ServidorB1234
[servidorA]
type=inbound-publication
event_asterisk-devicestate=servidorA
event_asterisk-mwi=servidorA
[servidorA]
type=asterisk-publication
devicestate_publish=servidorA-devicestate
mailboxstate_publish=servidorA-mwi
device_state=yes
mailbox_state=yes
Second Server:
[servidorB]
type=endpoint
auth=servidorB
[servidorB]
type=auth
auth_type=userpass
username=servidorB
password=servidorB1234
[servidorB-devicestate]
type=outbound-publish
server_uri=sip:servidorA@IPServidorA
event=asterisk-devicestate
outbound_auth=servidorA
[servidorB-mwi]
type=outbound-publish
server_uri=sip:servidorA@IPServidorA
event=asterisk-mwi
outbound_auth=servidorA
[servidorA]
type=auth
auth_type=userpass
username=servidorA
password=servidorA1234
[servidorB]
type=inbound-publication
event_asterisk-devicestate=servidorB
event_asterisk-mwi=servidorB
[servidorB]
type=asterisk-publication
devicestate_publish=servidorB-devicestate
mailboxstate_publish=servidorB-mwi
device_state=yes
mailbox_state=yes
I hope this is the correct configuration.
Regards
2 Likes
jcolp
October 24, 2016, 9:20pm
#4
Seems like it is correct!
1 Like
Last question duplicated and answered on another thread.
1 Like