Building voidemail program

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Building voidemail program

Nathan Samson
Hi,

I know there is the voicemail plugin but that doesn't seem to handle the basic question.
Who was calling who in the first place (unless I missed something).


I can't use call.to for this, because that will be the voicemail number that accepts redirects from mobile phones.

I know my call has variables which contains diversion which contains the phone number that redirected to the voicemail system.

Problem is that this is in probably a "provider" specific format which might depend on the unerlying software used (freeswitch / asterisks) and the underlyting SIP / DID provider...

Is there any generic way to get the redirected number in between? Or is this diversion format quite generic to parse.
(in my case it is "<sip:MSISDN@SOMEIP>;reason=unknown")


Thanks,
Nathan

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Building voidemail program

Ben Klang-2
Il giorno Aug 29, 2014, alle ore 7:46 AM, Nathan Samson <[hidden email]> ha scritto:

Hi,

I know there is the voicemail plugin but that doesn't seem to handle the basic question.
Who was calling who in the first place (unless I missed something).


I can't use call.to for this, because that will be the voicemail number that accepts redirects from mobile phones.

I know my call has variables which contains diversion which contains the phone number that redirected to the voicemail system.

Problem is that this is in probably a "provider" specific format which might depend on the unerlying software used (freeswitch / asterisks) and the underlyting SIP / DID provider…

Unfortunately, that is a limitation not just of FreeSWITCH or Asterisk, but of SIP.  The address format isn’t standardized unless you’re using something like IMS.  However, by convention the user portion of the SIP URI in the “To” field (`call.to` in Adhearsion) is typically the called number.  Some providers only send a few digits (this is holdover from the bad old days of T-1s), but most now send all 10 digits in North America.

Complicating that further is that Asterisk and FreeSWITCH use different formats for that: FreeSWITCH on Rayo uses the SIP URI format while Asterisk uses SIP/<peer>/<extension>, where <extension> is the user portion of the “To” field.  There has been discussion in the past on normalizing this in Adhearsion, but it would be a breaking/non-backward compatible change.  We will likely look at this issue again in Adhearsion 3.

All of the above is only true when assuming that the calls are to/from the PSTN.  Of course, SIP can be used for non-PSTN calls, and the SIP URI could be anything in those cases.


Is there any generic way to get the redirected number in between? Or is this diversion format quite generic to parse.
(in my case it is "<<a href="sip:MSISDN@SOMEIP">sip:MSISDN@SOMEIP>;reason=unknown”)

As I mentioned above, yes, that’s usually safe.  Unfortunately it can vary from SIP carrier to SIP carrier so it’s nothing we can do for you at the Adhearsion layer.  I’d recommend testing with each new carrier with whom you exchange traffic before relying on it.

/BAK/

-- 
Ben Klang
Principal/Technology Strategist, Mojo Lingo
+1.404.475.4841

Mojo Lingo -- Voice applications that work like magic
Twitter: @MojoLingo





Thanks,
Nathan

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.


signature.asc (858 bytes) Download Attachment