13.10.0: SIP messaging with guests - outofcall_message_context fails

Hi,

I have “allowguest=yes” set in sip.conf and would like to send SIP calls from those guests to one context in extensions.conf and SIP messages to another. Calls will go to voicemail and messages will be answered with an “out of office” statement.

With my current sip.conf however all guest communication goes to the “guests-call-in” context, including the messages. I suspect that my first “domain=” statement overrules the “outofcall_message_context=” but have not found an alternative so far. Does anyone have a suggestion on how to achieve this split in sip.conf or extensions.conf?

relevant sections from sip.conf:

[general]

alwaysauthreject=yes
transport=udp
callcounter=yes

;[guests-calling] ;for SIP voice-calls

allowguest=yes
nat=yes
domain=192.168.1.16,guests-call-in

;[guests-writing] ;for SIP messages

accept_outofcall_message=yes
outofcall_message_context=guests-message-in
domain=192.168.1.16,guests-message-in
auth_message_requests=yes

and from extensions.conf:

[guests-call-in] ;UNAUTHENTICATED CALLS !!!!

exten => _.,1,Verbose(Guest Call)
        same => n,Goto(get-caller-id-voip,s,1)

[guests-message-in] ;UNAUTHENTICATED MESSAGES !!!!

exten => _.,1,Verbose(Guest Message)
        same => n,Goto(get-caller-id-voip-message,s,1)

Greetings from Switzerland,

swisspbx

1 Like

This is correct - the domain context will override the context specified in outofcall_message_context. There isn’t really a way to not have this happen, as the domain context is simply applied after the context specified in outofcall_message_context.

One thing you could do is to handle this yourself in your dialplan. Since out of call messages will always be handled by the special Message channel driver, you can check for this in the guests-call-in context:

[guests-call-in]

exten => _.,1,Verbose(Guest Call)
 same => n,GotoIf($["${CHANNEL(channeltype)}" = "Message"]?guests-message-in,s,1)
 same => n,Goto(get-caller-id-voip,s,1)

[guests-message-in]

exten => s,1,Verbose(Guest message)
 ...
1 Like

Thank you very much for your solution - I’ve just implemented it into my dialplan and it works as expected.