Call handling with two locations [Solved]

I have a DID trunk, that two premises register two.
Both locations get a call signalled to a certain extension.
However, the extension exists only at one location.
What is the proper dialplan function to use on the location, that cannot answer the call, as the extension does not exist there.
hangup() does not seem right by the name of it.
Is there a proper SIP reply (and its corresponding dialplan function) for “Not available here”
Thanks in advance

If it can be done at all, Hangup is the correct option, and 3 is probably the most accurate cause code. However, Asterisk is based on ISDN codes and those don’t distinguish the here and everywhere cases. In practice, I think Asterisk sends the here versions, when choosing SIP causes.

You might have to try several options, from to find one that produces a suitable SIP cause code, if there is one. 3 will give a SIP 404 (not found) response.

Thank you David for pointing me to the ISDN codes.
I tried and both
Code 1 ( Unallocated (unassigned) number) and
Code 3 ( No route to destination)
lead to a SIP 404 Not found
reply to the SIP INVITE.
404 Not found is the correct answer.
Code 6 and an empty code result in 603 Decline, which is not as appropriate.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.