|Summary:||ASTERISK-04267: [patch] [post 1.2] Asterisk as a Voice Mail Server for Other Softswitches|
|Date Opened:||2005-05-24 15:16:13||Date Closed:||2011-06-07 14:05:28|
|Environment:||Attachments:||( 0) diff_unified2|
|Description:||Endpoints registered on Other Softswitches like Vocal or SER, can use Asterisk as their Voice Mail. I have modified teh chan_sip.c file to support this.|
****** ADDITIONAL INFORMATION ******
I have faxed the disclaimer under name Ujjval Karihaloo
My Screen name is jonty_11
|Comments:||By: Jeffrey C. Ollie (jcollie) 2005-05-24 15:19:50|
Could you please post your changes as a patch (unified diffs please) against CVS HEAD rather than posting the entire file?
By: jonty_11 (jonty_11) 2005-05-24 15:46:43
I has attached the Diff. Is there any thing else I need to do?
By: jonty_11 (jonty_11) 2005-05-24 15:57:13
Configuration Examples that go with the Code Changes
Adding a Configuration Example for a Softswitch that supports Voice Mail SIP interface on Port 5080. Providing a Port for such softswitches is mandatory in the first line (1) even if they use 5060.
Config Example of sip.conf
Config Example in voicemail.conf
12895551001 => 1234,Sipurauk Line1, email@example.com
12895551002 => 1234,Sipurauk Line2, firstname.lastname@example.org
12455551000 => 1234,XPRO 131245, email@example.com
By: Brian West (bkw918) 2005-05-24 16:08:31
diff -u format and do you have a disclaimer on file?
By: jonty_11 (jonty_11) 2005-05-24 17:49:23
This is my first time submitting code to Asterisk Open Source.
I have faxed a Disclaimer today.
By: twisted (twisted) 2005-05-25 00:00:40
I have two comments on this:
1) this seems to be more of an issue with asterisk's implimentaiton of chan_sip, where it will not allow for a port setting per-peer, as opposed to an interop problem with third-party softswitches. would just being able to set the port provide the necessary MWI notify's?
2) your diff looks backwards. make sure when using diff you always put the original file first, then the modified one. or, diff from cvs in the cvs tree. (cvs diff -u channels/chan_sip.c).
By: jonty_11 (jonty_11) 2005-05-25 11:32:16
Just adding a port will not work, as when sending a NOTIFY to a Third Pty Softswitch, the TO header should have teh Endpoint E164 Number for which the NOTIFY is destined.
Asterisk sends no Number in the TO header of the Notify msg that is sends to the Softswtich. So the Softswitch will never know which Endpoint to activate MWI for.
The Changes allow that to work properly
By: jonty_11 (jonty_11) 2005-05-25 14:40:25
Let me correct Myself....if we do not add PORT on line (1) .....The Asterisk seems to loose the SIP Port (src port) that the Softswitch sent the call from and then just sends the NOTIFY MWI indication to <IP addr>:0 (port 0)....This obviously is of no use.....
On top of this Asterisk does not send a Endpoint Identification in the TO header in the NOTIFY msg. I addded code so that it gets the Phone Number from the MailBox # defined for that Endpoint in voicemail.conf and adds that to the "To" header in the Notify message that it sends to the Softswitch.
By: Clod Patry (junky) 2005-05-25 19:37:25
jonty_11: do you autorize me to delete all files added before diff_unified2 ?
By: jonty_11 (jonty_11) 2005-05-26 00:24:59
Yes Junky....you can delete all those files.
By: Olle Johansson (oej) 2005-05-26 02:13:58
There must be a simpler way to do this than all this new code. Basically the current MWI system is also non-standard, since the client has to subscribe to MWI.
Will look into this after VON and see if I understand your requirements better, and if there's a better way to make this happen.
By: Olle Johansson (oej) 2005-05-26 02:19:06
Using the mailbox number in the SIP uri does not follow the Asterisk architecture. Using IP and port number in the user name is also basically a bad idea.
Your source code does not follow the coding guidelines.
Please tell us more on what your problem is and what you want to do so we can give you some idea on how to do this in an Asterisk-friendly way.
By: jonty_11 (jonty_11) 2005-05-26 12:20:19
Basic Idea is to use ASterisk as a SIP based voice mail Server for other SIP Registrars/B2BUAs/Softswitches.
Endpoints registered on other Softswitches use Asterisk for Voicemail.
E.g. (EP is Endpoint)
EP1 and EP2 are regsitered on Vocal.
EP1 calls EP2 and EP2 does not answer.
Vocal sends INVITE to Asterisk ; Asterisk sends back 200Ok ----(Dialog1)
ASterisk dial plan sends the call to voicemailmain
and then it follows teh voice mail path.
However, Asterisk does sends a NOTIFY to <softswitch IP Addr>:0; it looses the Softswitch Port in Dialog1 above and tries to use port 0.
In order for it to use the Softswitch Port we can specify that in the NAME in sip.conf.
Using mailbox number is a way to identify the Mailbox in the Asterisk, so that the Softswitch knows which SIP Endpoint to send the MWI (NOTIFY) to. The Asterisk has no direct knowledge of these Endpoints as they are not registered with it. All it knows it their Mailbox Numbers, which are configured under teh Softswitch configuration in sip.conf
By: Olle Johansson (oej) 2005-05-26 15:02:10
Well, we have to figure out a better way to do this than to break the Asterisk architecture. Does the phones subscribe for MWI?
By: jonty_11 (jonty_11) 2005-05-26 18:50:38
No Phones (Endpoints) do not subscribe, It is the Softswitch that sends a Subscribe and the Asterisk (Voice Mail Server) should send back a NOTIFY for each MailBox configured against that softswitch.
Regarding the Asterisk Architecture, what exactly is broke here ?
The MailBox Number (without the context) is being put in the SIP URI (TO header). Is that against the Asterisk Architecture? Can you please explain why?
Here waht we could do it store the NUmber in the sip uri To Header of the INVITE msg coming from the Softswitch (when call gets forwarded to Asterisk as a Voicemail call) and use that Number when Asterisk sends back the Notify to the Softswitch, rather than using it from the Mailbox info.
Any other pointers in this regard would help.
By: Chris A. Icide (cicide) 2005-06-02 14:33:06
I'm currently working with a metaswitch (using asterisk as teh voicemail server), and the metaswitch requires that in the voicemail MWI message, the URI look like:
sip:<subscriber-id>@<metaswitch-ip or name>
where the subscriber-id is the end location on the metaswitch for notification (usually matches the voicemail.conf entry)
So, if you want to function as a voicemail system for a metaswitch, sending the subscriber in the URI is required.
By: Chris A. Icide (cicide) 2005-06-21 16:16:01
I wanted to try and test this against a softswitch and after patching an april 6, 2005 CVS head version, asterisk immediately crashed with seg fault upon starting. Without the patch, no crash. Only error I noticed in compilation was a int to string cast warning.
jonty, any thoughts? I can be reached at chris at netgeeks dot net and we can post final results here instead of clogging comments.
By: Olle Johansson (oej) 2005-07-20 12:41:42
-- No feedback from reporter, current patch failed in many classes.
By: jonty_11 (jonty_11) 2005-09-22 11:21:31
I was travelling, but I have nto received any comments on this. Can I assist in actually fixing all the issues taht could have this code integrated with *.
Let me know,
By: Serge Vecher (serge-v) 2005-09-22 12:15:23
jonty_11, perhaps you could:
1) Update your patch to current CVS HEAD.
2) Review ./doc/CODING-GUIDELINES and modify patch accordingly (// comments, etc.) to pass Formating Review
3) Review patches to chan_sip since 05/26 (of which there were plenty) to see if they allow you to re-engineer your patch in a more Asterisk-architecture-friendly way.
By: Olle Johansson (oej) 2005-12-03 14:00:14.000-0600
This code breaks the architecture of Asterisk and fails in many categories. If someone comes up with something that would work with Asterisk, feel free to open a new issue report with a patch.