[Vtigercrm-developers] Asterisk Integration

Alan Lord (News) alanslists at gmail.com
Fri Jul 24 08:09:34 PDT 2009

Can someone explain what this chunk of code is for in function function 
transfer($from,$to) in /modules/PBXManager/utils/AsteriskClass.php?

                 $arr = explode(":", $to);
                         $typeCalled = $arr[0];
                         $to = trim($arr[1]);

This is being called via the Ajax stuff for initiating outbound calls.

Our telephone numbers for contacts/leads etc are usually in the form of 


or they have an international prefix:


explode() always results in an Array.

As we do *not* have a colon in our phone numbers this chunk of code 
mangles them and afterwards $to is empty.

I don't think it should be called for an outgoing call.


More information about the vtigercrm-developers mailing list