<DIV>Hi All,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; Have not gotten any response/pointers on the best way to implement this - Here is what I found....looking at the code...</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; Everytime SIP socket reads a packet &gt; 2 bytes , it spawns a new thread, to deal with the REGISTER/INVITE whatever is coming into the UDP socket.....</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;I am thinking of creating a TYPE= friend for teh Softswitch (host = x.x.x.x). and create many mailboxes under taht for each Endpoint registered on that Softswtich.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; When some one&nbsp; calls an Endpoint on the 3rd Pty Sofswitch...and it gets forwarded to the VoiceMail (Asterisk - *)...* recvs an INVITE....with the Mailbox # in the To header.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; I can check the Diversion header in the INVITE&nbsp; and then based on that <BR>I can store INVITE details and other peer&nbsp;details from sip.conf&nbsp;in a NEW Structure called sip_peer_vm_info ( in addition to peer info, I shud store IP and Port of the Softswitch sending the INVITE in that structure).&nbsp;&nbsp; Then after the person deposits the msg...I check for NEW MSGS and send the NOTIFY to the Softswitch based on info in the new structure....Makign sure I put voicemailbox # in the To header of the NOTIFY as per RFC.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Now, when the Endpoint on the&nbsp; Softswitch wants to check VoiceMail...he calls a VoiceMailMain NUmber, I check teh Dialed Number in INVITE, coming from Softswitch...and if it matches the VoiceMailMain NUmber, then get the number from the From Field and map that to a Mailbox account (if I want to allow voicemail retieval w/o entering VM Box #)</DIV>
<DIV>&nbsp;</DIV>
<DIV>Again, I check for new msgs, and send a NOTIFY appropriately.....</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Comments are highly appreciated.......</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thx,</DIV>
<DIV>Jay</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR><B><I>Jay Ray &lt;jonty_11@yahoo.com&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<DIV>Hi All,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; I want to use Asterisk for VoiceMail for a softswitch. </DIV>
<DIV>&nbsp;</DIV>
<DIV>I can dial in to leave voicemail and retrieve. Now there are many SIP Endpoints registered to the Softswitch. The Asterisk is sending a NOTIFY msg to the Softswitch on &lt;ip addr&gt;:0</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Somehow Asterisk Looses the port from where the INVITE came in, this NOTIFY msg is not going out of the Asterisk, I cannot see in Ethereal. here is the Error I get constantly on the CLI prompt...</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#8000ff>Mar 28 13:27:38 WARNING[2044]: chan_sip.c:682 __sip_xmit: sip_xmit of 0x9204bd4 (len 457) to 12.42.87.60 returned -1: Invalid argument<BR>Scheduling destruction of call </FONT><A href="mailto:'5f2dfa2f1f539aa603700b4c760e628d@12.42.87.193'"><FONT color=#8000ff>'5f2dfa2f1f539aa603700b4c760e628d@12.42.87.193'</FONT></A><FONT color=#8000ff> in 15000 ms<BR>Retransmitting #1 (no NAT):<BR></FONT><FONT color=#8000ff><STRONG>NOTIFY sip:12.42.87.60:0 SIP/2.0<BR></STRONG>Via: SIP/2.0/UDP 12.42.87.193:5060;branch=z9hG4bK4301f53f<BR>From: "asterisk" &lt;sip:asterisk@12.42.87.193&gt;;tag=as644a3ae7<BR><STRONG>To: &lt;sip:12.42.87.60:0&gt;</STRONG><BR>Contact: &lt;sip:asterisk@12.42.87.193&gt;<BR>Call-ID: </FONT><A href="mailto:5f2dfa2f1f539aa603700b4c760e628d@12.42.87.193"><FONT color=#8000ff>5f2dfa2f1f539aa603700b4c760e628d@12.42.87.193</FONT></A><BR><FONT color=#8000ff>CSeq: 102 NOTIFY<BR>User-Agent: Asterisk 193<BR>Event: message-summary<BR>Content-Type:
 application/simple-message-summary<BR>Content-Length: 44</FONT></DIV>
<DIV><FONT color=#8000ff>Messages-Waiting: yes<BR>Voice-Message: 11/0</FONT></DIV>
<DIV><FONT color=#8000ff>to 12.42.87.60:0<BR>Mar 28 13:27:39 WARNING[2044]: chan_sip.c:682 __sip_xmit: sip_xmi</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Can someone direct me to the portion of the Code where Asterisk Generates reponses for Voice Mail Call Flow. I would think goes through the Normal SIP stack.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Another thing I want to do it send the MailBox Number back in the "To" header of the NOTIFY that is being sent to the Softswitch. The Softswitch will then direct the Notify to the Appropriate Endpoint.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any help or guidance appreciated.</DIV>
<DIV>Jay</DIV>
<P>
<HR SIZE=1>
Do you Yahoo!?<BR>Yahoo! Small Business - <A href="http://us.rd.yahoo.com/evt=31637/*http://smallbusiness.yahoo.com/resources/">Try our new resources site!</A> 
<P>
<HR SIZE=1>
Do you Yahoo!?<BR>Yahoo! Small Business - <A href="http://us.rd.yahoo.com/evt=31637/*http://smallbusiness.yahoo.com/resources/">Try our new resources site!</A> _______________________________________________<BR>Asterisk-Dev mailing list<BR>Asterisk-Dev@lists.digium.com<BR>http://lists.digium.com/mailman/listinfo/asterisk-dev<BR>To UNSUBSCRIBE or update options visit:<BR>http://lists.digium.com/mailman/listinfo/asterisk-dev</BLOCKQUOTE><p>
                <hr size=1>Do you Yahoo!?<br> 
Better first dates. More second dates. <a href="http://us.rd.yahoo.com/evt=27808/*http://personals.yahoo.com">Yahoo! Personals</a>