Voice mailbox,how to differential different user (invite)

hi all,

i am configuring voice mailbox function. the following is the invite message from MSC.

INVITE sip:52350000@;user=phone SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bKnsstn1da1q999rrstgrno3rkg;X-DispMsg=1400
Route: sip:;transport=udp;lr
Call-ID: q8ornt3t1g1us3kg1rta1rusasnngktr@
From: “35689951”<sip:35689951 :bulb: @21vianet.com>;tag=ig8udqit-CC-1003-TRC-256804-OFC-5
To: “52350000”<sip:52350000 :bulb: @>
Max-Forwards: 70
Contact: sip:
P-Asserted-Identity: tel:35689951
History-Info: <sip:52354454 :bulb: @anonymous.invalid?reason=SIP%3Bcause%3D503%3Btext%3D%22Subscriber%20Not%20Reachable%22&Privacy=history>;index=1
History-Info: sip:52350000@;index=1.1
Supported: 100rel,timer,histinfo,precondition
Min-SE: 90
Session-Expires: 1800;refresher=uac
P-Early-Media: supported
Content-Length: 465
Content-Type: application/sdp

35689951 is the calling number.
the 52350000 is the voice mail box number, 52354454 is the called number which want to be regarded as voice mail account in asterisk for the user.

However,the asterisk side only see the extension “mailbox number 52350000”.
NOTICE[23474][C-000034a3]: chan_sip.c:25545 handle_request_invite: Call from ‘sipserver’ ( to extension '52350000 :bulb: ’ rejected because extension not found in context ‘incoming’.

the situation is i can’t configure different users with their own account, how can i use the called number to configure their own account?

can i use the history number in invite message ?


Define an extension number or extension pattern that matches the relevant called numbers and have that invoke voice mail.


thanks for your support.

i settled this problem by using “SIP_HEADER()” function.